init backend presensi
This commit is contained in:
37
app/Modules/Academic/Entities/ClassEntity.php
Normal file
37
app/Modules/Academic/Entities/ClassEntity.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Modules\Academic\Entities;
|
||||
|
||||
use CodeIgniter\Entity\Entity;
|
||||
|
||||
/**
|
||||
* Class Entity
|
||||
*
|
||||
* Represents a class/kelas in the system.
|
||||
*/
|
||||
class ClassEntity extends Entity
|
||||
{
|
||||
/**
|
||||
* Attributes that can be mass assigned
|
||||
*
|
||||
* @var array<string>
|
||||
*/
|
||||
protected $allowedFields = [
|
||||
'name',
|
||||
'grade',
|
||||
'major',
|
||||
'wali_user_id',
|
||||
];
|
||||
|
||||
/**
|
||||
* Attributes that should be cast to specific types
|
||||
*
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected $casts = [
|
||||
'id' => 'integer',
|
||||
'wali_user_id' => '?integer',
|
||||
'created_at' => 'datetime',
|
||||
'updated_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
24
app/Modules/Academic/Entities/LessonSlot.php
Normal file
24
app/Modules/Academic/Entities/LessonSlot.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Modules\Academic\Entities;
|
||||
|
||||
use CodeIgniter\Entity\Entity;
|
||||
|
||||
/**
|
||||
* Lesson Slot Entity
|
||||
*/
|
||||
class LessonSlot extends Entity
|
||||
{
|
||||
protected $allowedFields = [
|
||||
'slot_number',
|
||||
'start_time',
|
||||
'end_time',
|
||||
'is_active',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'id' => 'integer',
|
||||
'slot_number' => 'integer',
|
||||
'is_active' => 'boolean',
|
||||
];
|
||||
}
|
||||
50
app/Modules/Academic/Entities/Schedule.php
Normal file
50
app/Modules/Academic/Entities/Schedule.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace App\Modules\Academic\Entities;
|
||||
|
||||
use CodeIgniter\Entity\Entity;
|
||||
|
||||
/**
|
||||
* Schedule Entity
|
||||
*
|
||||
* Represents a class schedule in the system.
|
||||
*/
|
||||
class Schedule extends Entity
|
||||
{
|
||||
/**
|
||||
* Attributes that can be mass assigned
|
||||
*
|
||||
* @var array<string>
|
||||
*/
|
||||
protected $allowedFields = [
|
||||
'class_id',
|
||||
'subject_id',
|
||||
'teacher_user_id',
|
||||
'teacher_name',
|
||||
'lesson_slot_id',
|
||||
'day_of_week',
|
||||
'start_time',
|
||||
'end_time',
|
||||
'room',
|
||||
'is_active',
|
||||
];
|
||||
|
||||
/**
|
||||
* Attributes that should be cast to specific types
|
||||
*
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected $casts = [
|
||||
'id' => 'integer',
|
||||
'class_id' => 'integer',
|
||||
'subject_id' => 'integer',
|
||||
'teacher_user_id' => 'integer',
|
||||
'lesson_slot_id' => 'integer',
|
||||
'day_of_week' => 'integer',
|
||||
'is_active' => 'boolean',
|
||||
'start_time' => 'string',
|
||||
'end_time' => 'string',
|
||||
'created_at' => 'datetime',
|
||||
'updated_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
44
app/Modules/Academic/Entities/Student.php
Normal file
44
app/Modules/Academic/Entities/Student.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace App\Modules\Academic\Entities;
|
||||
|
||||
use CodeIgniter\Entity\Entity;
|
||||
|
||||
/**
|
||||
* Student Entity
|
||||
*
|
||||
* Represents a student in the system.
|
||||
*/
|
||||
class Student extends Entity
|
||||
{
|
||||
/**
|
||||
* Attributes that can be mass assigned
|
||||
*
|
||||
* @var array<string>
|
||||
*/
|
||||
protected $allowedFields = [
|
||||
'nisn',
|
||||
'name',
|
||||
'gender',
|
||||
'class_id',
|
||||
'is_active',
|
||||
'face_external_id',
|
||||
'face_hash',
|
||||
'dapodik_id',
|
||||
'parent_link_code',
|
||||
];
|
||||
|
||||
/**
|
||||
* Attributes that should be cast to specific types
|
||||
*
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected $casts = [
|
||||
'id' => 'integer',
|
||||
'class_id' => '?integer',
|
||||
'is_active' => 'integer',
|
||||
'face_hash' => '?string',
|
||||
'created_at' => 'datetime',
|
||||
'updated_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
34
app/Modules/Academic/Entities/Subject.php
Normal file
34
app/Modules/Academic/Entities/Subject.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Modules\Academic\Entities;
|
||||
|
||||
use CodeIgniter\Entity\Entity;
|
||||
|
||||
/**
|
||||
* Subject Entity
|
||||
*
|
||||
* Represents a subject/mata pelajaran in the system.
|
||||
*/
|
||||
class Subject extends Entity
|
||||
{
|
||||
/**
|
||||
* Attributes that can be mass assigned
|
||||
*
|
||||
* @var array<string>
|
||||
*/
|
||||
protected $allowedFields = [
|
||||
'name',
|
||||
'code',
|
||||
];
|
||||
|
||||
/**
|
||||
* Attributes that should be cast to specific types
|
||||
*
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected $casts = [
|
||||
'id' => 'integer',
|
||||
'created_at' => 'datetime',
|
||||
'updated_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user