RoleModel.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. namespace App\Models;
  3. use CodeIgniter\Model;
  4. // Modelo que representa la tabla de roles de los usuarios.
  5. class RoleModel extends Model
  6. {
  7. protected $table = 'roles';
  8. // protected $primaryKey = 'id';
  9. protected $primaryKey = 'idRol';
  10. // protected $useAutoIncrement = true;
  11. protected $useAutoIncrement = false;
  12. protected $returnType = 'array';
  13. protected $useSoftDeletes = false;
  14. protected $protectFields = true;
  15. protected $allowedFields = [];
  16. protected bool $allowEmptyInserts = false;
  17. protected bool $updateOnlyChanged = true;
  18. protected array $casts = [];
  19. protected array $castHandlers = [];
  20. // Dates
  21. protected $useTimestamps = false;
  22. protected $dateFormat = 'datetime';
  23. protected $createdField = 'created_at';
  24. protected $updatedField = 'updated_at';
  25. protected $deletedField = 'deleted_at';
  26. // Validation
  27. protected $validationRules = [];
  28. protected $validationMessages = [];
  29. protected $skipValidation = false;
  30. protected $cleanValidationRules = true;
  31. // Callbacks
  32. protected $allowCallbacks = true;
  33. protected $beforeInsert = [];
  34. protected $afterInsert = [];
  35. protected $beforeUpdate = [];
  36. protected $afterUpdate = [];
  37. protected $beforeFind = [];
  38. protected $afterFind = [];
  39. protected $beforeDelete = [];
  40. protected $afterDelete = [];
  41. }