init backend presensi

This commit is contained in:
mwpn
2026-03-05 14:37:36 +07:00
commit b4fda6b9c9
319 changed files with 27261 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
<?php
namespace App\Modules\Discipline\Models;
use CodeIgniter\Model;
class DisciplineLevelModel extends Model
{
protected $table = 'discipline_levels';
protected $primaryKey = 'id';
protected $useAutoIncrement = true;
protected $returnType = 'array';
protected $useSoftDeletes = false;
protected $protectFields = true;
protected $allowedFields = [
'min_score',
'max_score',
'title',
'school_action',
'executor',
'is_active',
];
protected $useTimestamps = true;
protected $createdField = 'created_at';
protected $updatedField = 'updated_at';
}

View File

@@ -0,0 +1,28 @@
<?php
namespace App\Modules\Discipline\Models;
use CodeIgniter\Model;
class StudentViolationModel extends Model
{
protected $table = 'student_violations';
protected $primaryKey = 'id';
protected $useAutoIncrement = true;
protected $returnType = 'array';
protected $useSoftDeletes = false;
protected $protectFields = true;
protected $allowedFields = [
'student_id',
'class_id',
'violation_id',
'reported_by_user_id',
'occurred_at',
'notes',
];
protected $useTimestamps = true;
protected $createdField = 'created_at';
protected $updatedField = 'updated_at';
}

View File

@@ -0,0 +1,25 @@
<?php
namespace App\Modules\Discipline\Models;
use CodeIgniter\Model;
class ViolationCategoryModel extends Model
{
protected $table = 'violation_categories';
protected $primaryKey = 'id';
protected $useAutoIncrement = true;
protected $returnType = 'array';
protected $useSoftDeletes = false;
protected $protectFields = true;
protected $allowedFields = [
'code',
'name',
'description',
];
protected $useTimestamps = true;
protected $createdField = 'created_at';
protected $updatedField = 'updated_at';
}

View File

@@ -0,0 +1,28 @@
<?php
namespace App\Modules\Discipline\Models;
use CodeIgniter\Model;
class ViolationModel extends Model
{
protected $table = 'violations';
protected $primaryKey = 'id';
protected $useAutoIncrement = true;
protected $returnType = 'array';
protected $useSoftDeletes = false;
protected $protectFields = true;
protected $allowedFields = [
'category_id',
'code',
'title',
'description',
'score',
'is_active',
];
protected $useTimestamps = true;
protected $createdField = 'created_at';
protected $updatedField = 'updated_at';
}