Files
alrahma_sunday_school/app/Models/InvoiceStudentListModel.php
T
root 38644b32ae
Deploy to Shared Hosting / Shared hosting deploy (push) Failing after 48s
Tests / PHPUnit (push) Failing after 1m19s
fix invoice and enrollment fees
2026-08-27 18:34:36 -04:00

49 lines
1.1 KiB
PHP

<?php
namespace App\Models;
use CodeIgniter\Model;
use App\Models\Concerns\SchoolYearAutoFillTrait;
class InvoiceStudentListModel extends Model
{
use SchoolYearAutoFillTrait;
// Specify the table name
protected $table = 'invoice_students_list';
// Primary key for the table
protected $primaryKey = 'id';
// Specify which fields are allowed for mass assignment
protected $allowedFields = [
'invoice_id',
'student_id',
'student_firstname',
'student_lastname',
'school_id',
'enrolled',
'tuition_fee',
'created_at',
'updated_at',
'school_year',
];
protected $validationRules = [
'school_year' => 'required|string|max_length[9]',
];
// Enable auto-incrementing primary key
protected $useAutoIncrement = true;
// Specify return type as an array
protected $returnType = 'array';
// Automatically set `created_at` and `updated_at` fields
protected $useTimestamps = true;
// Specify the names of the timestamp fields
protected $createdField = 'created_at';
protected $updatedField = 'updated_at';
}