Initial commit - CMS Gov Bapenda Garut dengan EditorJS
This commit is contained in:
29
app/Models/RoleModel.php
Normal file
29
app/Models/RoleModel.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use CodeIgniter\Model;
|
||||
|
||||
class RoleModel extends Model
|
||||
{
|
||||
protected $table = 'roles';
|
||||
protected $primaryKey = 'id';
|
||||
protected $useAutoIncrement = true;
|
||||
protected $returnType = 'array';
|
||||
protected $useSoftDeletes = false;
|
||||
protected $protectFields = true;
|
||||
protected $allowedFields = ['name'];
|
||||
|
||||
protected bool $allowEmptyInserts = false;
|
||||
|
||||
protected $useTimestamps = false;
|
||||
|
||||
protected $validationRules = [
|
||||
'name' => 'required|max_length[50]|is_unique[roles.name,id,{id}]',
|
||||
];
|
||||
|
||||
protected $validationMessages = [];
|
||||
protected $skipValidation = false;
|
||||
protected $cleanValidationRules = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user