init backend presensi
This commit is contained in:
29
app/Modules/Mobile/Models/StudentMobileAccountModel.php
Normal file
29
app/Modules/Mobile/Models/StudentMobileAccountModel.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Modules\Mobile\Models;
|
||||
|
||||
use CodeIgniter\Model;
|
||||
|
||||
class StudentMobileAccountModel extends Model
|
||||
{
|
||||
protected $table = 'student_mobile_accounts';
|
||||
protected $primaryKey = 'id';
|
||||
protected $useAutoIncrement = true;
|
||||
protected $returnType = 'array';
|
||||
protected $useSoftDeletes = false;
|
||||
protected $protectFields = true;
|
||||
protected $allowedFields = [
|
||||
'student_id',
|
||||
'pin_hash',
|
||||
];
|
||||
|
||||
protected $useTimestamps = true;
|
||||
protected $createdField = 'created_at';
|
||||
protected $updatedField = 'updated_at';
|
||||
|
||||
protected $validationRules = [
|
||||
'student_id' => 'required|integer|is_not_unique[students.id]',
|
||||
'pin_hash' => 'required|max_length[255]',
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user