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,34 @@
<?php
namespace App\Modules\Notification\Entities;
use CodeIgniter\Entity\Entity;
/**
* Parent Entity
*
* Represents a parent in the system.
*/
class Parent extends Entity
{
/**
* Attributes that can be mass assigned
*
* @var array<string>
*/
protected $allowedFields = [
'name',
'phone_number',
];
/**
* Attributes that should be cast to specific types
*
* @var array<string, string>
*/
protected $casts = [
'id' => 'integer',
'created_at' => 'datetime',
'updated_at' => 'datetime',
];
}

View File

@@ -0,0 +1,44 @@
<?php
namespace App\Modules\Notification\Entities;
use CodeIgniter\Entity\Entity;
/**
* Student Parent Entity
*
* Represents the relationship between a student and a parent.
*/
class StudentParent extends Entity
{
/**
* Relationship constants
*/
public const RELATIONSHIP_AYAH = 'AYAH';
public const RELATIONSHIP_IBU = 'IBU';
public const RELATIONSHIP_WALI = 'WALI';
/**
* Attributes that can be mass assigned
*
* @var array<string>
*/
protected $allowedFields = [
'student_id',
'parent_id',
'relationship',
];
/**
* Attributes that should be cast to specific types
*
* @var array<string, string>
*/
protected $casts = [
'id' => 'integer',
'student_id' => 'integer',
'parent_id' => 'integer',
'created_at' => 'datetime',
'updated_at' => 'datetime',
];
}

View File

@@ -0,0 +1,51 @@
<?php
namespace App\Modules\Notification\Entities;
use CodeIgniter\Entity\Entity;
/**
* Telegram Account Entity
*
* Represents a Telegram account linked to the system.
*/
class TelegramAccount extends Entity
{
/**
* Attributes that can be mass assigned
*
* @var array<string>
*/
protected $allowedFields = [
'telegram_user_id',
'username',
'first_name',
'last_name',
'is_verified',
'parent_id',
];
/**
* Attributes that should be cast to specific types
*
* @var array<string, string>
*/
protected $casts = [
'id' => 'integer',
'telegram_user_id' => 'integer',
'parent_id' => 'integer',
'is_verified' => 'boolean',
'created_at' => 'datetime',
'updated_at' => 'datetime',
];
/**
* Check if account is verified
*
* @return bool
*/
public function isVerified(): bool
{
return (bool) $this->attributes['is_verified'];
}
}