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 @@
# Attendance Module - Entities

View File

@@ -0,0 +1,63 @@
<?php
namespace App\Modules\Attendance\Entities;
use CodeIgniter\Entity\Entity;
/**
* Attendance Session Entity
*
* Represents an attendance check-in session.
*/
class AttendanceSession extends Entity
{
/**
* Attributes that can be mass assigned
*
* @var array<string>
*/
protected $allowedFields = [
'student_id',
'schedule_id',
'checkin_type',
'attendance_date',
'device_id',
'checkin_at',
'latitude',
'longitude',
'confidence',
'status',
];
/**
* Attributes that should be cast to specific types
*
* @var array<string, string>
*/
protected $casts = [
'id' => 'integer',
'student_id' => 'integer',
'schedule_id' => 'integer',
'checkin_type' => 'string',
'attendance_date' => 'date',
'device_id' => 'integer',
'checkin_at' => 'datetime',
'latitude' => 'float',
'longitude' => 'float',
'confidence' => 'float',
'created_at' => 'datetime',
'updated_at' => 'datetime',
];
/**
* Status constants
*/
public const STATUS_PRESENT = 'PRESENT';
public const STATUS_LATE = 'LATE';
public const STATUS_OUTSIDE_ZONE = 'OUTSIDE_ZONE';
public const STATUS_NO_SCHEDULE = 'NO_SCHEDULE';
public const STATUS_INVALID_DEVICE = 'INVALID_DEVICE';
public const STATUS_ALREADY_CHECKED_IN = 'ALREADY_CHECKED_IN';
public const STATUS_ABSENCE_WINDOW_CLOSED = 'ABSENCE_WINDOW_CLOSED';
public const STATUS_SESSION_CLOSED = 'SESSION_CLOSED';
}