42 lines
979 B
PHP
42 lines
979 B
PHP
<?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';
|
|
}
|