Files
alrahma_sunday_school/app/Models/InvoiceStudentListModel.php
T
2026-05-16 13:44:12 -04:00

42 lines
979 B
PHP
Executable File

<?php
namespace App\Models;
use CodeIgniter\Model;
class InvoiceStudentListModel extends Model
{
// 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',
'school_year',
'semester',
'created_at',
'updated_at'
];
// 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';
}