Start Point al 2026
This commit is contained in:
commit
8a76e1db3b
371 files changed
+160283
No files matched your search
@@ -0,0 +1,82 @@
|
||||
<?php namespace App\Models;
|
||||
|
||||
|
||||
/*
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `CSiCoCarEvents` (
|
||||
`ecaIDcarEvent` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Identificativo univoco dell''evento',
|
||||
`ecaIDcar` int(11) NOT NULL COMMENT 'Identificativo univoco del veicolo',
|
||||
`ecaIDlavoratore` int(11) NOT NULL COMMENT 'Identificativo univoco del lavoratore che utilizza il veicolo',
|
||||
`ecaDescrizione` text NOT NULL COMMENT 'Descrizione esplicativa del motivo per cui si utilizza il veicolo',
|
||||
`ecaData` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Data in cui si è utilizzato il veicolo',
|
||||
`ecaKm` float NOT NULL DEFAULT '0' COMMENT 'Kilometraggio totale alla data dell''evento',
|
||||
`ecaTipologia` enum('Presa','Restituita','Dismessa') NOT NULL DEFAULT 'Presa' COMMENT 'Tipologia dell''evento',
|
||||
`ecaStato` varchar(255) NOT NULL DEFAULT 'Tutto OK' COMMENT 'Annotazioni sullo stato del veicolo',
|
||||
PRIMARY KEY (`ecaIDcarEvent`),
|
||||
UNIQUE KEY `ecaIDcarEvent` (ecaIDcarEvent),
|
||||
KEY `FK_CarEvents-CSiCoCars` (`ecaIDcar`),
|
||||
KEY `FK_CarEvents-Lavoratori` (`ecaIDlavoratore`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=93 DEFAULT CHARSET=utf8 COMMENT='Tabella con tutti gli eventi riferiti alle macchina.';
|
||||
|
||||
|
||||
Fields:
|
||||
Tab: CSiCoCarEvents = ['ecaIDcarEvent', 'ecaIDcar', 'ecaIDlavoratore', 'ecaDescrizione', 'ecaData', 'ecaKm', 'ecaTipologia', 'ecaStato'];
|
||||
|
||||
*/
|
||||
|
||||
|
||||
use CodeIgniter\Model;
|
||||
|
||||
|
||||
|
||||
class CSiCoCarEvents_Model extends Model {
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Property
|
||||
|
||||
|
||||
protected $table = 'CSiCoCarEvents';
|
||||
protected $primaryKey = 'ecaIDcarEvent';
|
||||
|
||||
protected $returnType = 'App\Entities\CSiCoCarEvnt';
|
||||
//protected $returnType = 'array';
|
||||
|
||||
protected $allowedFields = ['ecaIDcar', 'ecaIDlavoratore', 'ecaDescrizione', 'ecaData', 'ecaKm', 'ecaTipologia', 'ecaStato'];
|
||||
|
||||
protected $useSoftDeletes = false;
|
||||
protected $useTimestamps = false;
|
||||
//protected $createdField = 'spCreatedAt';
|
||||
//protected $updatedField = 'spUpdatedAt';
|
||||
//protected $deletedField = 'spDeletedAt';
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Events
|
||||
|
||||
|
||||
//protected $beforeInsert = ['beforeInsert'];
|
||||
//protected $afterInsert = ['afterInsert'];
|
||||
//protected $beforeUpdate = ['beforeUpdate'];
|
||||
//protected $afterUpdate = ['afterUpdate'];
|
||||
//protected $beforeDelete = ['beforeDelete'];
|
||||
//protected $afterDelete = ['afterDelete'];
|
||||
//protected $afterFind = ['afterFind'];
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Methods
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
}//class CSiCoCarEvents_Model
|
||||
|
||||
Reference in new issue
Block a user