fix unittests issues
API CI/CD / Validate (composer + pint) (push) Successful in 3m6s
API CI/CD / Test (PHPUnit) (push) Failing after 4m53s
API CI/CD / Build frontend assets (push) Successful in 1m2s
API CI/CD / Security audit (push) Failing after 59s
API CI/CD / Deploy to shared hosting (PHP) (push) Has been skipped
API CI/CD / Validate (composer + pint) (push) Successful in 3m6s
API CI/CD / Test (PHPUnit) (push) Failing after 4m53s
API CI/CD / Build frontend assets (push) Successful in 1m2s
API CI/CD / Security audit (push) Failing after 59s
API CI/CD / Deploy to shared hosting (PHP) (push) Has been skipped
This commit is contained in:
@@ -35,7 +35,6 @@ class AttendanceData extends BaseModel
|
||||
'school_id' => 'integer',
|
||||
'student_id' => 'integer',
|
||||
'modified_by' => 'integer',
|
||||
'date' => 'datetime', // ✅ DATETIME column
|
||||
];
|
||||
|
||||
/* =========================
|
||||
@@ -57,8 +56,8 @@ class AttendanceData extends BaseModel
|
||||
private static function dayRange(string $day): array
|
||||
{
|
||||
$day = substr($day, 0, 10); // YYYY-MM-DD
|
||||
$start = Carbon::parse($day)->startOfDay();
|
||||
$endEx = Carbon::parse($day)->addDay()->startOfDay(); // exclusive
|
||||
$start = $day;
|
||||
$endEx = Carbon::parse($day)->addDay()->toDateString(); // exclusive
|
||||
|
||||
return [$start, $endEx];
|
||||
}
|
||||
|
||||
@@ -11,20 +11,7 @@ class AttendanceRecord extends BaseModel
|
||||
// ✅ legacy uses created_at / updated_at
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'class_section_id',
|
||||
'student_id',
|
||||
'school_id',
|
||||
'total_absence',
|
||||
'total_late',
|
||||
'total_presence',
|
||||
'total_attendance',
|
||||
'semester',
|
||||
'school_year',
|
||||
'modified_by',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
protected $fillable = ['class_section_id', 'student_id', 'school_id', 'total_absence', 'total_late', 'total_presence', 'total_attendance', 'semester', 'school_year', 'modified_by', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'class_section_id' => 'integer',
|
||||
|
||||
@@ -12,17 +12,7 @@ class AttendanceTracking extends BaseModel
|
||||
// ✅ legacy: useTimestamps = true (created_at/updated_at)
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'student_id',
|
||||
'date',
|
||||
'is_reported',
|
||||
'reason',
|
||||
'is_notified',
|
||||
'notif_counter',
|
||||
'semester',
|
||||
'school_year',
|
||||
'note',
|
||||
];
|
||||
protected $fillable = ['student_id', 'date', 'is_reported', 'reason', 'note', 'is_notified', 'notif_counter', 'semester', 'school_year', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'student_id' => 'integer',
|
||||
|
||||
@@ -9,20 +9,7 @@ class AuthorizedUser extends BaseModel
|
||||
// ✅ auto-manage created_at / updated_at
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'authorized_user_id',
|
||||
'firstname',
|
||||
'lastname',
|
||||
'phone_number',
|
||||
'gender',
|
||||
'email',
|
||||
'relation_to_user',
|
||||
'token',
|
||||
'status',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
protected $fillable = ['user_id', 'authorized_user_id', 'firstname', 'lastname', 'phone_number', 'gender', 'email', 'relation_to_user', 'token', 'status', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'user_id' => 'integer',
|
||||
|
||||
@@ -13,15 +13,7 @@ class BadgePrintLog extends BaseModel
|
||||
// legacy: useTimestamps = false
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'printed_by',
|
||||
'school_year',
|
||||
'printed_at',
|
||||
'role',
|
||||
'class_section_name',
|
||||
'copies',
|
||||
];
|
||||
protected $fillable = ['user_id', 'printed_by', 'school_year', 'printed_at', 'role', 'class_section_name', 'copies'];
|
||||
|
||||
protected $casts = [
|
||||
'user_id' => 'integer',
|
||||
|
||||
@@ -2,4 +2,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
class Calendar extends CalendarEvent {}
|
||||
class Calendar extends CalendarEvent
|
||||
{
|
||||
protected $fillable = ['title', 'date', 'description', 'notify_parent', 'notify_admin', 'notify_teacher', 'no_school', 'semester', 'school_year', 'notification_sent', 'created_at', 'updated_at'];
|
||||
}
|
||||
|
||||
@@ -6,16 +6,9 @@ class ClassPrepAdjustment extends BaseModel
|
||||
{
|
||||
protected $table = 'class_prep_adjustments';
|
||||
|
||||
// legacy model didn't use timestamps; keep off unless your table has updated_at/created_at auto-managed.
|
||||
public $timestamps = true;
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'class_section_id',
|
||||
'item_name',
|
||||
'adjustment',
|
||||
'school_year',
|
||||
'created_at',
|
||||
];
|
||||
protected $fillable = ['class_section_id', 'item_name', 'adjustment', 'adjustable', 'school_year', 'created_at'];
|
||||
|
||||
protected $casts = [
|
||||
'class_section_id' => 'integer',
|
||||
|
||||
@@ -6,16 +6,9 @@ class ClassPreparationLog extends BaseModel
|
||||
{
|
||||
protected $table = 'class_preparation_log';
|
||||
|
||||
// legacy: useTimestamps = false
|
||||
public $timestamps = true;
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'class_section_id',
|
||||
'class_section',
|
||||
'school_year',
|
||||
'prep_data',
|
||||
'created_at',
|
||||
];
|
||||
protected $fillable = ['class_section_id', 'class_section', 'school_year', 'prep_data', 'created_at'];
|
||||
|
||||
protected $casts = [
|
||||
'class_section_id' => 'integer',
|
||||
|
||||
@@ -13,14 +13,7 @@ class ClassProgressAttachment extends BaseModel
|
||||
// legacy: useTimestamps = false
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'report_id',
|
||||
'file_path',
|
||||
'original_name',
|
||||
'mime_type',
|
||||
'file_size',
|
||||
'created_at',
|
||||
];
|
||||
protected $fillable = ['report_id', 'file_path', 'original_name', 'mime_type', 'file_size', 'created_at'];
|
||||
|
||||
protected $casts = [
|
||||
'report_id' => 'integer',
|
||||
|
||||
@@ -13,26 +13,7 @@ class ClassProgressReport extends BaseModel
|
||||
// ✅ legacy: useTimestamps = true (created_at/updated_at)
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'class_section_id',
|
||||
'teacher_id',
|
||||
'school_year',
|
||||
'semester',
|
||||
'week_start',
|
||||
'week_end',
|
||||
'subject',
|
||||
'unit_title',
|
||||
'covered',
|
||||
'homework',
|
||||
'assessment',
|
||||
'status',
|
||||
'status_notes',
|
||||
'class_notes',
|
||||
'next_week_plan',
|
||||
'support_needed',
|
||||
'flags_json',
|
||||
'attachment_path',
|
||||
];
|
||||
protected $fillable = ['class_section_id', 'teacher_id', 'week_start', 'week_end', 'subject', 'unit_title', 'materials', 'covered', 'homework', 'assessment', 'status', 'status_notes', 'class_notes', 'next_week_plan', 'support_needed', 'flags_json', 'attachment_path', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'class_section_id' => 'integer',
|
||||
|
||||
@@ -15,13 +15,7 @@ class ClassSection extends BaseModel
|
||||
// ✅ legacy: useTimestamps = true
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'class_id',
|
||||
'class_section_id',
|
||||
'class_section_name',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
protected $fillable = ['class_id', 'class_section_id', 'class_section_name', 'created_at', 'updated_at', 'semester', 'school_year'];
|
||||
|
||||
protected $casts = [
|
||||
'class_id' => 'integer',
|
||||
|
||||
@@ -7,24 +7,9 @@ class CommunicationLog extends BaseModel
|
||||
protected $table = 'communication_logs';
|
||||
|
||||
// legacy model didn't enable timestamps; keep off unless your table has created_at/updated_at.
|
||||
public $timestamps = true;
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'student_id',
|
||||
'family_id',
|
||||
'student_name',
|
||||
'template_key',
|
||||
'subject',
|
||||
'body',
|
||||
'recipients',
|
||||
'cc',
|
||||
'bcc',
|
||||
'attachments',
|
||||
'status',
|
||||
'error_message',
|
||||
'sent_by',
|
||||
'metadata',
|
||||
];
|
||||
protected $fillable = ['student_id', 'family_id', 'student_name', 'template_key', 'subject', 'body', 'recipients', 'cc', 'bcc', 'attachments', 'status', 'error_message', 'sent_by', 'metadata'];
|
||||
|
||||
public function getFillable(): array
|
||||
{
|
||||
|
||||
@@ -14,22 +14,7 @@ class Competition extends BaseModel
|
||||
// ✅ legacy: useTimestamps = true (created_at/updated_at) + deleted_at for soft deletes
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'title',
|
||||
'semester',
|
||||
'school_year',
|
||||
'class_section_id',
|
||||
'start_date',
|
||||
'end_date',
|
||||
'winners_count',
|
||||
'prize_per_point',
|
||||
'is_published',
|
||||
'published_at',
|
||||
'is_locked',
|
||||
'locked_at',
|
||||
'locked_by',
|
||||
'created_by',
|
||||
];
|
||||
protected $fillable = ['title', 'semester', 'school_year', 'class_section_id', 'start_date', 'end_date', 'winners_count', 'prize_per_point', 'is_published', 'published_at', 'created_by', 'created_at', 'updated_at', 'deleted_at', 'is_locked', 'locked_at', 'locked_by'];
|
||||
|
||||
protected $casts = [
|
||||
'class_section_id' => 'integer',
|
||||
|
||||
@@ -9,18 +9,7 @@ class CompetitionClassWinner extends BaseModel
|
||||
// ✅ legacy: useTimestamps = true (created_at/updated_at)
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'competition_id',
|
||||
'class_section_id',
|
||||
'winners_override',
|
||||
'question_count',
|
||||
'prize_1',
|
||||
'prize_2',
|
||||
'prize_3',
|
||||
'prize_4',
|
||||
'prize_5',
|
||||
'prize_6',
|
||||
];
|
||||
protected $fillable = ['competition_id', 'class_section_id', 'winners_override', 'created_at', 'updated_at', 'question_count', 'prize_1', 'prize_2', 'prize_3', 'prize_4', 'prize_5', 'prize_6'];
|
||||
|
||||
protected $casts = [
|
||||
'competition_id' => 'integer',
|
||||
|
||||
@@ -9,13 +9,7 @@ class CompetitionScore extends BaseModel
|
||||
// ✅ legacy: useTimestamps = true (created_at/updated_at)
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'competition_id',
|
||||
'student_id',
|
||||
'class_section_id',
|
||||
'score',
|
||||
'notes',
|
||||
];
|
||||
protected $fillable = ['competition_id', 'student_id', 'class_section_id', 'score', 'notes', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'competition_id' => 'integer',
|
||||
|
||||
@@ -9,15 +9,7 @@ class CompetitionWinner extends BaseModel
|
||||
// legacy: useTimestamps = false
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'competition_id',
|
||||
'student_id',
|
||||
'class_section_id',
|
||||
'rank',
|
||||
'score',
|
||||
'prize_amount',
|
||||
'created_at',
|
||||
];
|
||||
protected $fillable = ['competition_id', 'student_id', 'class_section_id', 'rank', 'score', 'prize_amount', 'created_at'];
|
||||
|
||||
protected $casts = [
|
||||
'competition_id' => 'integer',
|
||||
|
||||
@@ -12,10 +12,7 @@ class Configuration extends BaseModel
|
||||
public $timestamps = false;
|
||||
public $incrementing = true;
|
||||
|
||||
protected $fillable = [
|
||||
'config_key',
|
||||
'config_value',
|
||||
];
|
||||
protected $fillable = ['config_key', 'config_value'];
|
||||
|
||||
/* =========================
|
||||
* legacy method equivalents
|
||||
|
||||
@@ -9,16 +9,7 @@ class ContactUs extends BaseModel
|
||||
// ✅ legacy: useTimestamps = true (created_at/updated_at)
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'sender_id',
|
||||
'reciever_id',
|
||||
'subject',
|
||||
'message',
|
||||
'semester',
|
||||
'school_year',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
protected $fillable = ['sender_id', 'reciever_id', 'subject', 'message', 'created_at', 'updated_at', 'semester', 'school_year'];
|
||||
|
||||
protected $casts = [
|
||||
'sender_id' => 'integer',
|
||||
|
||||
@@ -10,25 +10,7 @@ class CurrentFlag extends BaseModel
|
||||
// you can enable auto-management. If your table does NOT actually have them, set false.
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'student_id',
|
||||
'student_name',
|
||||
'grade',
|
||||
'flag',
|
||||
'flag_datetime',
|
||||
'flag_state',
|
||||
'updated_by_open',
|
||||
'open_description',
|
||||
'updated_by_closed',
|
||||
'close_description',
|
||||
'action_taken',
|
||||
'updated_by_canceled',
|
||||
'cancel_description',
|
||||
'semester',
|
||||
'school_year',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
protected $fillable = ['student_id', 'student_name', 'grade', 'flag', 'flag_datetime', 'flag_state', 'updated_by_open', 'open_description', 'updated_by_closed', 'close_description', 'action_taken', 'updated_by_canceled', 'cancel_description', 'semester', 'school_year', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'student_id' => 'integer',
|
||||
|
||||
@@ -11,16 +11,7 @@ class DiscountUsage extends BaseModel
|
||||
// ✅ legacy: timestamps enabled (created_at / updated_at)
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'voucher_id',
|
||||
'invoice_id',
|
||||
'discount_amount',
|
||||
'school_year',
|
||||
'semester',
|
||||
'updated_by',
|
||||
'parent_id',
|
||||
'used_at',
|
||||
];
|
||||
protected $fillable = ['voucher_id', 'invoice_id', 'parent_id', 'discount_amount', 'description', 'school_year', 'updated_by', 'used_at', 'created_at', 'updated_at', 'semester'];
|
||||
|
||||
protected $casts = [
|
||||
'voucher_id' => 'integer',
|
||||
|
||||
@@ -11,21 +11,7 @@ class DiscountVoucher extends BaseModel
|
||||
// ✅ legacy manages created_at / updated_at
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'code',
|
||||
'discount_type',
|
||||
'discount_value',
|
||||
'max_uses',
|
||||
'times_used',
|
||||
'valid_from',
|
||||
'valid_until',
|
||||
'semester',
|
||||
'school_year',
|
||||
'is_active',
|
||||
'description',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
protected $fillable = ['code', 'discount_type', 'description', 'discount_value', 'max_uses', 'times_used', 'valid_from', 'valid_until', 'is_active', 'created_at', 'updated_at', 'school_year', 'semester'];
|
||||
|
||||
protected $casts = [
|
||||
'discount_value' => 'decimal:2',
|
||||
|
||||
@@ -9,16 +9,7 @@ class EarlyDismissalSignature extends BaseModel
|
||||
// ✅ legacy: timestamps enabled (created_at/updated_at)
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'report_date',
|
||||
'school_year',
|
||||
'semester',
|
||||
'filename',
|
||||
'original_name',
|
||||
'mime_type',
|
||||
'file_size',
|
||||
'uploaded_by',
|
||||
];
|
||||
protected $fillable = ['report_date', 'school_year', 'semester', 'filename', 'original_name', 'mime_type', 'file_size', 'uploaded_by', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
// report_date is stored as Y-m-d in legacy validation; keep as date
|
||||
|
||||
@@ -9,17 +9,7 @@ class EmergencyContact extends BaseModel
|
||||
// ✅ legacy: useTimestamps = true (created_at/updated_at)
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'parent_id',
|
||||
'emergency_contact_name',
|
||||
'cellphone',
|
||||
'email',
|
||||
'relation',
|
||||
'semester',
|
||||
'school_year',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
protected $fillable = ['emergency_contact_name', 'parent_id', 'cellphone', 'email', 'relation', 'semester', 'school_year', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'parent_id' => 'integer',
|
||||
|
||||
@@ -11,20 +11,7 @@ class Enrollment extends BaseModel
|
||||
// ✅ legacy: useTimestamps = true
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'student_id',
|
||||
'class_section_id',
|
||||
'parent_id',
|
||||
'school_year',
|
||||
'enrollment_date',
|
||||
'enrollment_status',
|
||||
'withdrawal_date',
|
||||
'is_withdrawn',
|
||||
'admission_status',
|
||||
'semester',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
protected $fillable = ['student_id', 'class_section_id', 'parent_id', 'enrollment_date', 'enrollment_status', 'withdrawal_date', 'is_withdrawn', 'admission_status', 'semester', 'school_year', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'student_id' => 'integer',
|
||||
|
||||
+1
-13
@@ -9,19 +9,7 @@ class Event extends BaseModel
|
||||
// ✅ legacy: timestamps enabled (created_at/updated_at)
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'event_name',
|
||||
'event_category',
|
||||
'description',
|
||||
'amount',
|
||||
'flyer',
|
||||
'expiration_date',
|
||||
'semester',
|
||||
'school_year',
|
||||
'created_by',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
protected $fillable = ['event_name', 'event_category', 'description', 'amount', 'flyer', 'expiration_date', 'semester', 'school_year', 'created_by', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'amount' => 'decimal:2', // adjust precision if needed
|
||||
|
||||
@@ -11,33 +11,7 @@ class EventCharges extends BaseModel
|
||||
// ✅ legacy: useTimestamps = true (created_at/updated_at)
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'event_id',
|
||||
'event_name',
|
||||
'description',
|
||||
'amount',
|
||||
'parent_id',
|
||||
'student_id',
|
||||
'participation',
|
||||
'charged',
|
||||
'waiver_signed',
|
||||
'event_paid',
|
||||
'event_payment_id',
|
||||
'class_section_id',
|
||||
'external_firstname',
|
||||
'external_lastname',
|
||||
'external_note',
|
||||
'external_parent_firstname',
|
||||
'external_parent_lastname',
|
||||
'external_parent_phone',
|
||||
'external_parent_email',
|
||||
'semester',
|
||||
'school_year',
|
||||
'created_by',
|
||||
'updated_by',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
protected $fillable = ['event_id', 'parent_id', 'student_id', 'participation', 'charged', 'semester', 'school_year', 'updated_by', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'event_id' => 'integer',
|
||||
|
||||
+2
-8
@@ -13,17 +13,11 @@ class Exam extends BaseModel
|
||||
*
|
||||
* We'll keep auto created_at, no updated_at:
|
||||
*/
|
||||
public $timestamps = true;
|
||||
public $timestamps = false;
|
||||
|
||||
const UPDATED_AT = null; // ✅ no updated_at column
|
||||
|
||||
protected $fillable = [
|
||||
'student_id',
|
||||
'school_id',
|
||||
'class_section_id',
|
||||
'exam_name',
|
||||
'created_at',
|
||||
];
|
||||
protected $fillable = ['student_id', 'student_school_id', 'class_section_id', 'exam_name', 'created_at'];
|
||||
|
||||
protected $casts = [
|
||||
'student_id' => 'integer',
|
||||
|
||||
@@ -9,36 +9,7 @@ class ExamDraft extends BaseModel
|
||||
// ✅ legacy: useTimestamps = true (created_at/updated_at)
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'teacher_id',
|
||||
'author_id',
|
||||
'class_section_id',
|
||||
'semester',
|
||||
'school_year',
|
||||
'exam_type',
|
||||
'draft_title',
|
||||
'author_comment',
|
||||
'description',
|
||||
'teacher_file',
|
||||
'teacher_filename',
|
||||
'author_file',
|
||||
'author_filename',
|
||||
'status',
|
||||
'acceptance_type',
|
||||
'review_revision',
|
||||
'reviewer_id',
|
||||
'admin_id',
|
||||
'is_legacy',
|
||||
'reviewer_comment',
|
||||
'reviewer_comments',
|
||||
'admin_comments',
|
||||
'reviewed_at',
|
||||
'final_file',
|
||||
'final_filename',
|
||||
'final_pdf_file',
|
||||
'version',
|
||||
'previous_draft_id',
|
||||
];
|
||||
protected $fillable = ['teacher_id', 'class_section_id', 'semester', 'school_year', 'exam_type', 'draft_title', 'description', 'teacher_file', 'teacher_filename', 'status', 'admin_id', 'admin_comments', 'reviewed_at', 'final_file', 'final_filename', 'version', 'previous_draft_id', 'is_legacy', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'teacher_id' => 'integer',
|
||||
|
||||
+1
-17
@@ -11,23 +11,7 @@ class Expense extends BaseModel
|
||||
// ✅ legacy: useTimestamps = true (created_at/updated_at)
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'category',
|
||||
'amount',
|
||||
'receipt_path',
|
||||
'description',
|
||||
'retailor',
|
||||
'date_of_purchase',
|
||||
'purchased_by',
|
||||
'added_by',
|
||||
'school_year',
|
||||
'semester',
|
||||
'status',
|
||||
'status_reason',
|
||||
'reimbursement_id',
|
||||
'approved_by',
|
||||
'updated_by',
|
||||
];
|
||||
protected $fillable = ['category', 'amount', 'receipt_path', 'description', 'retailor', 'purchased_by', 'date_of_purchase', 'added_by', 'created_at', 'updated_at', 'school_year', 'semester', 'status', 'status_reason', 'updated_by', 'approved_by', 'reimbursement_id'];
|
||||
|
||||
protected $casts = [
|
||||
'amount' => 'decimal:2', // adjust precision if needed
|
||||
|
||||
+1
-14
@@ -9,20 +9,7 @@ class Family extends BaseModel
|
||||
// legacy model didn't specify timestamps
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'family_code',
|
||||
'household_name',
|
||||
'address_line1',
|
||||
'address_line2',
|
||||
'city',
|
||||
'state',
|
||||
'postal_code',
|
||||
'country',
|
||||
'primary_phone',
|
||||
'preferred_lang',
|
||||
'preferred_contact_method',
|
||||
'is_active',
|
||||
];
|
||||
protected $fillable = ['family_code', 'household_name', 'address_line1', 'address_line2', 'city', 'state', 'postal_code', 'country', 'primary_phone', 'preferred_lang', 'preferred_contact_method', 'is_active', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'is_active' => 'boolean',
|
||||
|
||||
@@ -9,13 +9,7 @@ class FamilyCommPref extends BaseModel
|
||||
// legacy model didn't specify timestamps
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'family_id',
|
||||
'category',
|
||||
'via_email',
|
||||
'via_sms',
|
||||
'cc_all_guardians',
|
||||
];
|
||||
protected $fillable = ['family_id', 'category', 'via_email', 'via_sms', 'cc_all_guardians', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'family_id' => 'integer',
|
||||
|
||||
@@ -9,15 +9,7 @@ class FamilyGuardian extends BaseModel
|
||||
// legacy model didn't specify timestamps
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'family_id',
|
||||
'user_id',
|
||||
'relation',
|
||||
'is_primary',
|
||||
'receive_emails',
|
||||
'receive_sms',
|
||||
'custody_notes',
|
||||
];
|
||||
protected $fillable = ['family_id', 'user_id', 'relation', 'is_primary', 'receive_emails', 'receive_sms', 'custody_notes', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'family_id' => 'integer',
|
||||
|
||||
@@ -11,12 +11,7 @@ class FamilyStudent extends BaseModel
|
||||
// legacy model didn't specify timestamps
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'family_id',
|
||||
'student_id',
|
||||
'is_primary_home',
|
||||
'notes',
|
||||
];
|
||||
protected $fillable = ['family_id', 'student_id', 'is_primary_home', 'notes', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'family_id' => 'integer',
|
||||
|
||||
@@ -10,25 +10,9 @@ class FinalExam extends BaseModel
|
||||
* legacy: useTimestamps = false (even though table has created_at/updated_at fields).
|
||||
* So we keep timestamps OFF and you can set created_at/updated_at manually if needed.
|
||||
*/
|
||||
public $timestamps = false;
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'student_id',
|
||||
'school_id',
|
||||
'class_section_id',
|
||||
'updated_by',
|
||||
'score',
|
||||
'max_points',
|
||||
'status',
|
||||
'excused_reason',
|
||||
'locked_at',
|
||||
'locked_by',
|
||||
'comment',
|
||||
'semester',
|
||||
'school_year',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
protected $fillable = ['student_id', 'school_id', 'class_section_id', 'updated_by', 'score', 'semester', 'school_year', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'student_id' => 'integer',
|
||||
|
||||
@@ -10,19 +10,7 @@ class FinalScore extends BaseModel
|
||||
// If you want Laravel to auto-manage them, keep true (recommended).
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'student_id',
|
||||
'school_id',
|
||||
'class_section_id',
|
||||
'teacher_id',
|
||||
'score',
|
||||
'score_letter',
|
||||
'comment',
|
||||
'semester',
|
||||
'school_year',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
protected $fillable = ['student_id', 'school_id', 'class_section_id', 'updated_by', 'score', 'score_letter', 'comment', 'school_year', 'created_at', 'updated_at', 'semester'];
|
||||
|
||||
protected $casts = [
|
||||
'student_id' => 'integer',
|
||||
|
||||
@@ -9,16 +9,7 @@ class GradingLock extends BaseModel
|
||||
// ✅ legacy: useTimestamps = true
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'class_section_id',
|
||||
'semester',
|
||||
'school_year',
|
||||
'is_locked',
|
||||
'locked_by',
|
||||
'locked_at',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
protected $fillable = ['class_section_id', 'semester', 'school_year', 'is_locked', 'locked_by', 'locked_at', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'class_section_id' => 'integer',
|
||||
|
||||
+2
-19
@@ -12,26 +12,9 @@ class Homework extends BaseModel
|
||||
* legacy: useTimestamps = false (even though created_at/updated_at columns exist).
|
||||
* Keep it OFF to match behavior. If you want Laravel to auto-manage, tell me.
|
||||
*/
|
||||
public $timestamps = false;
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'student_id',
|
||||
'school_id',
|
||||
'class_section_id',
|
||||
'updated_by',
|
||||
'homework_index',
|
||||
'score',
|
||||
'max_points',
|
||||
'status',
|
||||
'excused_reason',
|
||||
'locked_at',
|
||||
'locked_by',
|
||||
'comment',
|
||||
'semester',
|
||||
'school_year',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
protected $fillable = ['student_id', 'school_id', 'class_section_id', 'updated_by', 'homework_index', 'score', 'comment', 'semester', 'school_year', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'student_id' => 'integer',
|
||||
|
||||
+1
-19
@@ -9,25 +9,7 @@ class Incident extends BaseModel
|
||||
// Table contains created_at/updated_at; enable auto timestamps (recommended).
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'student_id',
|
||||
'student_name',
|
||||
'grade',
|
||||
'incident',
|
||||
'incident_datetime',
|
||||
'incident_state',
|
||||
'updated_by_open',
|
||||
'open_description',
|
||||
'updated_by_closed',
|
||||
'close_description',
|
||||
'action_taken',
|
||||
'updated_by_canceled',
|
||||
'cancel_description',
|
||||
'semester',
|
||||
'school_year',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
protected $fillable = ['student_id', 'student_name', 'grade', 'incident', 'incident_datetime', 'incident_state', 'updated_by_open', 'open_description', 'updated_by_closed', 'close_description', 'action_taken', 'updated_by_canceled', 'cancel_description', 'semester', 'school_year', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'student_id' => 'integer',
|
||||
|
||||
@@ -9,15 +9,7 @@ class InventoryCategory extends BaseModel
|
||||
// ✅ legacy: useTimestamps = true (created_at/updated_at)
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'type',
|
||||
'name',
|
||||
'description',
|
||||
'grade_min',
|
||||
'grade_max',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
protected $fillable = ['type', 'name', 'description', 'grade_min', 'grade_max', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'grade_min' => 'integer',
|
||||
|
||||
@@ -9,37 +9,7 @@ class InventoryItem extends BaseModel
|
||||
// ✅ legacy: useTimestamps = true
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'type',
|
||||
'category_id',
|
||||
'name',
|
||||
'description',
|
||||
'quantity',
|
||||
'unit',
|
||||
'condition',
|
||||
'isbn',
|
||||
'edition',
|
||||
'sku',
|
||||
'notes',
|
||||
'semester',
|
||||
'school_year',
|
||||
'updated_by',
|
||||
'good_qty',
|
||||
'needs_repair_qty',
|
||||
'need_replace_qty',
|
||||
'cannot_find_qty',
|
||||
// Supplier/reorder fields
|
||||
'preferred_supplier_id',
|
||||
'last_purchase_price',
|
||||
'average_unit_cost',
|
||||
'reorder_point',
|
||||
'reorder_quantity',
|
||||
'lead_time_days',
|
||||
// Barcode/QR fields
|
||||
'barcode',
|
||||
'qr_code',
|
||||
'asset_tag',
|
||||
];
|
||||
protected $fillable = ['type', 'category_id', 'name', 'description', 'quantity', 'good_qty', 'needs_repair_qty', 'need_replace_qty', 'cannot_find_qty', 'unit', 'condition', 'isbn', 'edition', 'sku', 'notes', 'semester', 'school_year', 'updated_by', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'category_id' => 'integer',
|
||||
|
||||
@@ -9,26 +9,7 @@ class InventoryMovement extends BaseModel
|
||||
// ✅ legacy: useTimestamps = true (created_at/updated_at)
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'item_id',
|
||||
'qty_change',
|
||||
'movement_type',
|
||||
'reason',
|
||||
'note',
|
||||
'semester',
|
||||
'school_year',
|
||||
'performed_by',
|
||||
'teacher_id',
|
||||
'student_id',
|
||||
'class_section_id',
|
||||
// Audit/correction fields
|
||||
'voided_at',
|
||||
'voided_by',
|
||||
'void_reason',
|
||||
'corrects_movement_id',
|
||||
'source_type',
|
||||
'source_id',
|
||||
];
|
||||
protected $fillable = ['item_id', 'qty_change', 'movement_type', 'reason', 'note', 'semester', 'school_year', 'performed_by', 'teacher_id', 'student_id', 'class_section_id', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'item_id' => 'integer',
|
||||
|
||||
+2
-18
@@ -13,25 +13,9 @@ class Invoice extends BaseModel
|
||||
* legacy: useTimestamps = false because DB defaults/triggers manage created_at/updated_at.
|
||||
* In Laravel, keep timestamps OFF and let DB handle them.
|
||||
*/
|
||||
public $timestamps = false;
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'parent_id',
|
||||
'invoice_number',
|
||||
'total_amount',
|
||||
'school_year',
|
||||
'semester',
|
||||
'balance',
|
||||
'paid_amount',
|
||||
'has_discount',
|
||||
'issue_date',
|
||||
'due_date',
|
||||
'status',
|
||||
'description',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
'updated_by',
|
||||
];
|
||||
protected $fillable = ['parent_id', 'invoice_number', 'total_amount', 'balance', 'paid_amount', 'has_discount', 'issue_date', 'due_date', 'status', 'description', 'school_year', 'created_at', 'updated_at', 'updated_by', 'semester'];
|
||||
|
||||
protected $casts = [
|
||||
'parent_id' => 'integer',
|
||||
|
||||
@@ -9,17 +9,7 @@ class InvoiceEvent extends BaseModel
|
||||
// ✅ legacy: useTimestamps = true (created_at/updated_at)
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'invoice_id',
|
||||
'event_name',
|
||||
'description',
|
||||
'amount',
|
||||
'semester',
|
||||
'school_year',
|
||||
'updated_by',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
protected $fillable = ['invoice_id', 'event_name', 'description', 'amount', 'semester', 'school_year', 'updated_by', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'invoice_id' => 'integer',
|
||||
|
||||
@@ -9,18 +9,7 @@ class InvoiceStudentList extends BaseModel
|
||||
// ✅ legacy: useTimestamps = true (created_at/updated_at)
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'invoice_id',
|
||||
'student_id',
|
||||
'student_firstname',
|
||||
'student_lastname',
|
||||
'school_id',
|
||||
'enrolled',
|
||||
'school_year',
|
||||
'semester',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
protected $fillable = ['invoice_id', 'student_id', 'student_firstname', 'student_lastname', 'school_id', 'enrolled', 'school_year', 'created_at', 'updated_at', 'semester'];
|
||||
|
||||
protected $casts = [
|
||||
'invoice_id' => 'integer',
|
||||
|
||||
@@ -9,14 +9,7 @@ class IpAttempt extends BaseModel
|
||||
// ✅ legacy: useTimestamps = true (created_at/updated_at)
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'ip_address',
|
||||
'attempts',
|
||||
'last_attempt_at',
|
||||
'semester',
|
||||
'school_year',
|
||||
'blocked_until',
|
||||
];
|
||||
protected $fillable = ['ip_address', 'attempts', 'last_attempt_at', 'blocked_until', 'created_at', 'updated_at', 'school_year', 'semester'];
|
||||
|
||||
protected $casts = [
|
||||
'attempts' => 'integer',
|
||||
|
||||
@@ -12,18 +12,7 @@ class LateSlipLog extends BaseModel
|
||||
// legacy: useTimestamps = false (printed_at is controlled explicitly)
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'school_year',
|
||||
'semester',
|
||||
'student_name',
|
||||
'slip_date',
|
||||
'time_in',
|
||||
'grade',
|
||||
'reason',
|
||||
'admin_name',
|
||||
'printed_by',
|
||||
'printed_at',
|
||||
];
|
||||
protected $fillable = ['school_year', 'semester', 'student_name', 'slip_date', 'time_in', 'grade', 'reason', 'admin_name', 'printed_by', 'printed_at'];
|
||||
|
||||
protected $casts = [
|
||||
'printed_by' => 'integer',
|
||||
|
||||
@@ -9,18 +9,7 @@ class LoginActivity extends BaseModel
|
||||
// ✅ legacy: useTimestamps = true (created_at/updated_at)
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'email',
|
||||
'login_time',
|
||||
'logout_time',
|
||||
'ip_address',
|
||||
'user_agent',
|
||||
'school_year',
|
||||
'semester',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
protected $fillable = ['user_id', 'email', 'login_time', 'logout_time', 'ip_address', 'user_agent', 'created_at', 'updated_at', 'semester', 'school_year'];
|
||||
|
||||
protected $casts = [
|
||||
'user_id' => 'integer',
|
||||
|
||||
@@ -9,16 +9,7 @@ class ManualPayment extends BaseModel
|
||||
// legacy: useTimestamps = false
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'invoice_number',
|
||||
'amount',
|
||||
'payment_method',
|
||||
'reference',
|
||||
'proof_path',
|
||||
'semester',
|
||||
'school_year',
|
||||
'created_at',
|
||||
];
|
||||
protected $fillable = ['invoice_number', 'amount', 'payment_method', 'reference', 'discount_number', 'proof_path', 'created_at', 'school_year', 'semester'];
|
||||
|
||||
protected $casts = [
|
||||
'amount' => 'decimal:2', // adjust precision if needed
|
||||
|
||||
+1
-15
@@ -9,21 +9,7 @@ class Message extends BaseModel
|
||||
// legacy: useTimestamps = false (manual date fields)
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'sender_id',
|
||||
'recipient_id',
|
||||
'subject',
|
||||
'message',
|
||||
'sent_datetime',
|
||||
'read_status',
|
||||
'read_datetime',
|
||||
'message_number',
|
||||
'priority',
|
||||
'attachment',
|
||||
'status',
|
||||
'semester',
|
||||
'school_year',
|
||||
];
|
||||
protected $fillable = ['sender_id', 'recipient_id', 'subject', 'message', 'sent_datetime', 'read_status', 'read_datetime', 'message_number', 'priority', 'attachment', 'status', 'semester', 'school_year'];
|
||||
|
||||
protected $casts = [
|
||||
'sender_id' => 'integer',
|
||||
|
||||
@@ -10,25 +10,9 @@ class MidtermExam extends BaseModel
|
||||
* legacy: useTimestamps = false (even though created_at/updated_at columns exist).
|
||||
* Keep it OFF to match behavior (you can still store created_at/updated_at manually).
|
||||
*/
|
||||
public $timestamps = false;
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'student_id',
|
||||
'school_id',
|
||||
'class_section_id',
|
||||
'updated_by',
|
||||
'score',
|
||||
'max_points',
|
||||
'status',
|
||||
'excused_reason',
|
||||
'locked_at',
|
||||
'locked_by',
|
||||
'comment',
|
||||
'semester',
|
||||
'school_year',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
protected $fillable = ['student_id', 'school_id', 'class_section_id', 'updated_by', 'score', 'comment', 'semester', 'school_year', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'student_id' => 'integer',
|
||||
|
||||
@@ -11,18 +11,7 @@ class MissingScoreOverride extends BaseModel
|
||||
// ✅ legacy: useTimestamps = true (created_at/updated_at)
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'student_id',
|
||||
'class_section_id',
|
||||
'semester',
|
||||
'school_year',
|
||||
'item_type',
|
||||
'item_index',
|
||||
'is_allowed',
|
||||
'updated_by',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
protected $fillable = ['student_id', 'class_section_id', 'semester', 'school_year', 'item_type', 'item_index', 'is_allowed', 'updated_by', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'student_id' => 'integer',
|
||||
|
||||
@@ -13,15 +13,7 @@ class NavItem extends BaseModel
|
||||
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'menu_parent_id',
|
||||
'label',
|
||||
'url',
|
||||
'icon_class',
|
||||
'target',
|
||||
'sort_order',
|
||||
'is_enabled',
|
||||
];
|
||||
protected $fillable = ['menu_parent_id', 'label', 'url', 'icon_class', 'target', 'sort_order', 'is_enabled', 'created_at', 'updated_at', 'deleted_at'];
|
||||
|
||||
protected $casts = [
|
||||
'menu_parent_id' => 'integer',
|
||||
|
||||
@@ -14,19 +14,7 @@ class Notification extends BaseModel
|
||||
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'title',
|
||||
'message',
|
||||
'target_group',
|
||||
'delivery_channels',
|
||||
'priority',
|
||||
'status',
|
||||
'action_url',
|
||||
'attachment_path',
|
||||
'semester',
|
||||
'school_year',
|
||||
'scheduled_at',
|
||||
];
|
||||
protected $fillable = ['title', 'message', 'target_group', 'delivery_channels', 'priority', 'status', 'action_url', 'attachment_path', 'scheduled_at', 'sent_at', 'expires_at', 'created_at', 'updated_at', 'deleted_at', 'school_year', 'semester'];
|
||||
|
||||
protected $casts = [
|
||||
'scheduled_at' => 'datetime',
|
||||
|
||||
@@ -11,25 +11,12 @@ class ParentAttendanceReport extends BaseModel
|
||||
// ✅ legacy: useTimestamps = true
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'parent_id',
|
||||
'student_id',
|
||||
'class_section_id',
|
||||
'report_date',
|
||||
'type',
|
||||
'arrival_time',
|
||||
'dismiss_time',
|
||||
'reason',
|
||||
'semester',
|
||||
'school_year',
|
||||
'status',
|
||||
];
|
||||
protected $fillable = ['parent_id', 'student_id', 'class_section_id', 'report_date', 'type', 'arrival_time', 'dismiss_time', 'reason', 'semester', 'school_year', 'status', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'parent_id' => 'integer',
|
||||
'student_id' => 'integer',
|
||||
'class_section_id' => 'integer',
|
||||
'report_date' => 'date',
|
||||
];
|
||||
|
||||
/* Optional relationships */
|
||||
|
||||
@@ -9,20 +9,7 @@ class ParentMeetingSchedule extends BaseModel
|
||||
// ✅ legacy: useTimestamps = true (created_at/updated_at)
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'student_id',
|
||||
'parent_user_id',
|
||||
'parent_name',
|
||||
'student_name',
|
||||
'class_section_name',
|
||||
'date',
|
||||
'time',
|
||||
'notes',
|
||||
'semester',
|
||||
'school_year',
|
||||
'status',
|
||||
'created_by',
|
||||
];
|
||||
protected $fillable = ['student_id', 'parent_user_id', 'parent_name', 'student_name', 'class_section_name', 'date', 'time', 'notes', 'semester', 'school_year', 'status', 'created_by', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'student_id' => 'integer',
|
||||
|
||||
@@ -9,16 +9,7 @@ class ParentModel extends BaseModel
|
||||
// legacy model didn't specify timestamps
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'secondparent_firstname',
|
||||
'secondparent_lastname',
|
||||
'secondparent_gender',
|
||||
'secondparent_email',
|
||||
'secondparent_phone',
|
||||
'firstparent_id',
|
||||
'semester',
|
||||
'school_year',
|
||||
];
|
||||
protected $fillable = ['secondparent_firstname', 'secondparent_lastname', 'secondparent_gender', 'secondparent_email', 'secondparent_phone', 'firstparent_id', 'secondparent_id', 'semester', 'school_year', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'firstparent_id' => 'integer',
|
||||
|
||||
@@ -9,18 +9,7 @@ class ParentNotification extends BaseModel
|
||||
// ✅ legacy: useTimestamps = true (created_at/updated_at)
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'student_id',
|
||||
'code',
|
||||
'incident_date',
|
||||
'channel',
|
||||
'to_address',
|
||||
'subject',
|
||||
'status',
|
||||
'response',
|
||||
'semester',
|
||||
'school_year',
|
||||
];
|
||||
protected $fillable = ['student_id', 'code', 'incident_date', 'channel', 'to_address', 'subject', 'status', 'response', 'semester', 'school_year', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'student_id' => 'integer',
|
||||
|
||||
@@ -10,25 +10,9 @@ class Participation extends BaseModel
|
||||
* legacy: useTimestamps = false (even though created_at/updated_at columns exist).
|
||||
* Keep OFF to match behavior (you can still set created_at/updated_at manually).
|
||||
*/
|
||||
public $timestamps = false;
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'student_id',
|
||||
'school_id',
|
||||
'class_section_id',
|
||||
'updated_by',
|
||||
'score',
|
||||
'max_points',
|
||||
'status',
|
||||
'excused_reason',
|
||||
'locked_at',
|
||||
'locked_by',
|
||||
'comment',
|
||||
'semester',
|
||||
'school_year',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
protected $fillable = ['student_id', 'school_id', 'class_section_id', 'updated_by', 'score', 'comment', 'semester', 'school_year', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'student_id' => 'integer',
|
||||
|
||||
@@ -18,18 +18,13 @@ class PasswordReset extends BaseModel
|
||||
* This will auto-set expires_at whenever you call save()/update().
|
||||
* (Only do this if that’s truly what you want.)
|
||||
*/
|
||||
public $timestamps = true;
|
||||
public $timestamps = false;
|
||||
|
||||
const CREATED_AT = 'created_at';
|
||||
|
||||
const UPDATED_AT = 'expires_at';
|
||||
|
||||
protected $fillable = [
|
||||
'email',
|
||||
'token',
|
||||
'created_at',
|
||||
'expires_at',
|
||||
];
|
||||
protected $fillable = ['email', 'token', 'created_at', 'expires_at'];
|
||||
|
||||
protected $casts = [
|
||||
'created_at' => 'datetime',
|
||||
|
||||
@@ -7,12 +7,9 @@ class PasswordResetRequest extends BaseModel
|
||||
protected $table = 'password_reset_requests';
|
||||
|
||||
// legacy: timestamps off
|
||||
public $timestamps = true;
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'ip_address',
|
||||
'requested_at',
|
||||
];
|
||||
protected $fillable = ['ip_address', 'requested_at'];
|
||||
|
||||
protected $casts = [
|
||||
'requested_at' => 'datetime',
|
||||
|
||||
@@ -10,30 +10,11 @@ class PayPalPayment extends BaseModel
|
||||
* legacy: created_at is managed, updated_at is NOT used.
|
||||
* In Laravel: enable timestamps but disable UPDATED_AT.
|
||||
*/
|
||||
public $timestamps = true;
|
||||
public $timestamps = false;
|
||||
|
||||
const UPDATED_AT = null;
|
||||
|
||||
protected $fillable = [
|
||||
'webhook_id',
|
||||
'parent_school_id',
|
||||
'order_id',
|
||||
'transaction_id',
|
||||
'status',
|
||||
'amount',
|
||||
'currency',
|
||||
'paypal_fee',
|
||||
'net_amount',
|
||||
'payer_email',
|
||||
'merchant_id',
|
||||
'event_type',
|
||||
'summary',
|
||||
'raw_payload',
|
||||
'synced',
|
||||
'semester',
|
||||
'school_year',
|
||||
'sync_attempts',
|
||||
];
|
||||
protected $fillable = ['webhook_id', 'parent_school_id', 'order_id', 'transaction_id', 'status', 'amount', 'currency', 'paypal_fee', 'net_amount', 'payer_email', 'merchant_id', 'event_type', 'summary', 'raw_payload', 'synced', 'sync_attempts', 'created_at'];
|
||||
|
||||
protected $casts = [
|
||||
'parent_school_id' => 'integer',
|
||||
|
||||
+2
-18
@@ -12,25 +12,9 @@ class Payment extends BaseModel
|
||||
* legacy: useTimestamps = false because DB handles created_at/updated_at (defaults/triggers).
|
||||
* Keep OFF in Laravel too.
|
||||
*/
|
||||
public $timestamps = false;
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'parent_id',
|
||||
'invoice_id',
|
||||
'total_amount',
|
||||
'paid_amount',
|
||||
'balance',
|
||||
'number_of_installments',
|
||||
'transaction_id',
|
||||
'check_file',
|
||||
'check_number',
|
||||
'payment_method',
|
||||
'payment_date',
|
||||
'school_year',
|
||||
'semester',
|
||||
'status',
|
||||
'updated_by',
|
||||
];
|
||||
protected $fillable = ['parent_id', 'invoice_id', 'total_amount', 'paid_amount', 'balance', 'number_of_installments', 'transaction_id', 'check_file', 'check_number', 'payment_method', 'payment_date', 'semester', 'school_year', 'status', 'updated_by', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'parent_id' => 'integer',
|
||||
|
||||
@@ -9,19 +9,7 @@ class PaymentError extends BaseModel
|
||||
// legacy: useTimestamps = false (logged_at managed manually)
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'payment_id',
|
||||
'invoice_id',
|
||||
'parent_id',
|
||||
'wrong_paid_amount',
|
||||
'wrong_payment_method',
|
||||
'wrong_check_file',
|
||||
'error_note',
|
||||
'semester',
|
||||
'school_year',
|
||||
'logged_at',
|
||||
'logged_by',
|
||||
];
|
||||
protected $fillable = ['payment_id', 'invoice_id', 'parent_id', 'wrong_paid_amount', 'wrong_payment_method', 'wrong_check_file', 'error_note', 'logged_at', 'logged_by', 'school_year', 'semester'];
|
||||
|
||||
protected $casts = [
|
||||
'payment_id' => 'integer',
|
||||
|
||||
@@ -9,24 +9,7 @@ class PaymentNotificationLog extends BaseModel
|
||||
// legacy: useTimestamps = false (created_at / sent_at are managed manually)
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'parent_id',
|
||||
'invoice_id',
|
||||
'school_year',
|
||||
'period_year',
|
||||
'period_month',
|
||||
'type',
|
||||
'to_email',
|
||||
'cc_email',
|
||||
'head_fa_notified',
|
||||
'subject',
|
||||
'body',
|
||||
'status',
|
||||
'error_message',
|
||||
'balance_snapshot',
|
||||
'created_at',
|
||||
'sent_at',
|
||||
];
|
||||
protected $fillable = ['parent_id', 'invoice_id', 'school_year', 'period_year', 'period_month', 'type', 'to_email', 'cc_email', 'head_fa_notified', 'subject', 'body', 'status', 'error_message', 'balance_snapshot', 'created_at', 'sent_at'];
|
||||
|
||||
protected $casts = [
|
||||
'parent_id' => 'integer',
|
||||
|
||||
@@ -9,21 +9,7 @@ class PaymentTransaction extends BaseModel
|
||||
// Legacy table has no created_at/updated_at columns.
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'transaction_id',
|
||||
'payment_id',
|
||||
'transaction_date',
|
||||
'amount',
|
||||
'payment_method',
|
||||
'payment_status',
|
||||
'transaction_fee',
|
||||
'payment_reference',
|
||||
'semester',
|
||||
'school_year',
|
||||
'is_full_payment',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
protected $fillable = ['transaction_id', 'payment_id', 'transaction_date', 'amount', 'payment_method', 'payment_status', 'transaction_fee', 'school_year', 'semester'];
|
||||
|
||||
protected $casts = [
|
||||
'payment_id' => 'integer',
|
||||
|
||||
@@ -9,22 +9,7 @@ class PaypalTransaction extends BaseModel
|
||||
// ✅ legacy: useTimestamps = true (created_at/updated_at)
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'transaction_id',
|
||||
'payment_id',
|
||||
'firstname',
|
||||
'lastname',
|
||||
'event_type',
|
||||
'payer_email',
|
||||
'amount',
|
||||
'currency',
|
||||
'status',
|
||||
'payment_method',
|
||||
'transaction_fee',
|
||||
'semester',
|
||||
'school_year',
|
||||
'raw_data',
|
||||
];
|
||||
protected $fillable = ['transaction_id', 'payment_id', 'firstname', 'lastname', 'event_type', 'payer_email', 'amount', 'currency', 'status', 'payment_method', 'transaction_fee', 'raw_data', 'created_at', 'updated_at', 'school_year', 'semester'];
|
||||
|
||||
protected $casts = [
|
||||
'payment_id' => 'integer',
|
||||
|
||||
@@ -12,12 +12,7 @@ class Permission extends BaseModel
|
||||
// ✅ legacy: useTimestamps = true (created_at/updated_at)
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'description',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
protected $fillable = ['name', 'description', 'created_at', 'updated_at'];
|
||||
|
||||
/* =========================
|
||||
* legacy method equivalents
|
||||
|
||||
@@ -9,14 +9,7 @@ class PlacementBatch extends BaseModel
|
||||
// ✅ legacy: useTimestamps = true (created_at/updated_at)
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'placement_test',
|
||||
'school_year',
|
||||
'created_by',
|
||||
'updated_by',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
protected $fillable = ['placement_test', 'school_year', 'created_by', 'updated_by', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'created_by' => 'integer',
|
||||
|
||||
@@ -9,15 +9,7 @@ class PlacementLevel extends BaseModel
|
||||
// ✅ legacy: useTimestamps = true (created_at/updated_at)
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'student_id',
|
||||
'level',
|
||||
'school_year',
|
||||
'created_by',
|
||||
'updated_by',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
protected $fillable = ['student_id', 'level', 'school_year', 'created_by', 'updated_by', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'student_id' => 'integer',
|
||||
|
||||
@@ -9,15 +9,7 @@ class PlacementScore extends BaseModel
|
||||
// ✅ legacy: useTimestamps = true (created_at/updated_at)
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'batch_id',
|
||||
'student_id',
|
||||
'score',
|
||||
'created_by',
|
||||
'updated_by',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
protected $fillable = ['batch_id', 'student_id', 'score', 'created_by', 'updated_by', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'batch_id' => 'integer',
|
||||
|
||||
@@ -9,27 +9,7 @@ class Preferences extends BaseModel
|
||||
// ✅ legacy: useTimestamps = true (created_at/updated_at)
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'receive_email_notifications',
|
||||
'receive_sms_notifications',
|
||||
'theme',
|
||||
'language',
|
||||
'timezone',
|
||||
'style_color',
|
||||
'menu_color',
|
||||
'custom',
|
||||
'menu_custom_bg',
|
||||
'menu_custom_text',
|
||||
'menu_custom_mode',
|
||||
'receive_push_notifications',
|
||||
'daily_summary_email',
|
||||
'privacy_mode',
|
||||
'marketing_emails',
|
||||
'account_activity_alerts',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
protected $fillable = ['user_id', 'notification_email', 'notification_sms', 'theme', 'language', 'style_color', 'menu_color', 'menu_custom_bg', 'menu_custom_text', 'menu_custom_mode', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'user_id' => 'integer',
|
||||
|
||||
@@ -9,17 +9,7 @@ class PrintRequest extends BaseModel
|
||||
// ✅ legacy: useTimestamps = true (created_at/updated_at)
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'teacher_id',
|
||||
'admin_id',
|
||||
'class_id',
|
||||
'file_path',
|
||||
'page_selection',
|
||||
'num_copies',
|
||||
'required_by',
|
||||
'pickup_method',
|
||||
'status',
|
||||
];
|
||||
protected $fillable = ['teacher_id', 'admin_id', 'class_id', 'file_path', 'page_selection', 'num_copies', 'required_by', 'pickup_method', 'status', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'teacher_id' => 'integer',
|
||||
|
||||
+1
-18
@@ -15,24 +15,7 @@ class Project extends BaseModel
|
||||
/**
|
||||
* Mass assignment.
|
||||
*/
|
||||
protected $fillable = [
|
||||
'student_id',
|
||||
'school_id',
|
||||
'class_section_id',
|
||||
'updated_by',
|
||||
'project_index',
|
||||
'score',
|
||||
'max_points',
|
||||
'status',
|
||||
'excused_reason',
|
||||
'locked_at',
|
||||
'locked_by',
|
||||
'comment',
|
||||
'semester',
|
||||
'school_year',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
protected $fillable = ['student_id', 'school_id', 'class_section_id', 'updated_by', 'project_index', 'score', 'comment', 'semester', 'school_year', 'created_at', 'updated_at'];
|
||||
|
||||
/**
|
||||
* If your table has created_at/updated_at columns (it does),
|
||||
|
||||
@@ -9,18 +9,7 @@ class PromotionQueue extends BaseModel
|
||||
{
|
||||
protected $table = 'promotion_queue';
|
||||
|
||||
protected $fillable = [
|
||||
'student_id',
|
||||
'from_class_section_id',
|
||||
'to_class_id',
|
||||
'to_class_section_id',
|
||||
'school_year_from',
|
||||
'school_year_to',
|
||||
'status',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
'updated_by',
|
||||
];
|
||||
protected $fillable = ['student_id', 'from_class_section_id', 'to_class_id', 'to_class_section_id', 'school_year_from', 'school_year_to', 'status', 'created_at', 'updated_at', 'updated_by'];
|
||||
|
||||
public $timestamps = true;
|
||||
|
||||
|
||||
@@ -13,17 +13,7 @@ class PurchaseOrder extends BaseModel
|
||||
|
||||
protected $table = 'purchase_orders';
|
||||
|
||||
protected $fillable = [
|
||||
'po_number',
|
||||
'supplier_id',
|
||||
'status',
|
||||
'order_date',
|
||||
'expected_date',
|
||||
'subtotal',
|
||||
'tax',
|
||||
'total',
|
||||
'notes',
|
||||
];
|
||||
protected $fillable = ['po_number', 'supplier_id', 'status', 'order_date', 'expected_date', 'subtotal', 'tax', 'total', 'notes'];
|
||||
|
||||
public $timestamps = true;
|
||||
|
||||
|
||||
@@ -8,15 +8,7 @@ class PurchaseOrderItem extends BaseModel
|
||||
{
|
||||
protected $table = 'purchase_order_items';
|
||||
|
||||
protected $fillable = [
|
||||
'purchase_order_id',
|
||||
'supply_id',
|
||||
'inventory_item_id',
|
||||
'description',
|
||||
'quantity',
|
||||
'received_qty',
|
||||
'unit_cost',
|
||||
];
|
||||
protected $fillable = ['purchase_order_id', 'supply_id', 'description', 'quantity', 'received_qty', 'unit_cost'];
|
||||
|
||||
public $timestamps = true;
|
||||
|
||||
|
||||
+2
-19
@@ -8,26 +8,9 @@ class Quiz extends BaseModel
|
||||
{
|
||||
protected $table = 'quiz';
|
||||
|
||||
public $timestamps = false;
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'student_id',
|
||||
'school_id',
|
||||
'class_section_id',
|
||||
'updated_by',
|
||||
'quiz_index',
|
||||
'score',
|
||||
'max_points',
|
||||
'status',
|
||||
'excused_reason',
|
||||
'locked_at',
|
||||
'locked_by',
|
||||
'comment',
|
||||
'semester',
|
||||
'school_year',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
protected $fillable = ['student_id', 'school_id', 'class_section_id', 'updated_by', 'quiz_index', 'score', 'comment', 'semester', 'school_year', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'student_id' => 'integer',
|
||||
|
||||
+1
-21
@@ -9,27 +9,7 @@ class Refund extends BaseModel
|
||||
{
|
||||
protected $table = 'refunds';
|
||||
|
||||
protected $fillable = [
|
||||
'parent_id',
|
||||
'school_year',
|
||||
'invoice_id',
|
||||
'refund_amount',
|
||||
'requested_at',
|
||||
'approved_at',
|
||||
'refunded_at',
|
||||
'status',
|
||||
'reason',
|
||||
'refund_paid_amount',
|
||||
'request',
|
||||
'note',
|
||||
'semester',
|
||||
'school_year',
|
||||
'approved_by',
|
||||
'updated_by',
|
||||
'refund_method',
|
||||
'check_nbr',
|
||||
'check_file',
|
||||
];
|
||||
protected $fillable = ['parent_id', 'school_year', 'invoice_id', 'refund_amount', 'requested_at', 'approved_at', 'refunded_at', 'status', 'reason', 'refund_paid_amount', 'request', 'note', 'approved_by', 'updated_by', 'refund_method', 'check_nbr', 'check_file', 'created_at', 'updated_at', 'semester'];
|
||||
|
||||
public $timestamps = true;
|
||||
|
||||
|
||||
@@ -9,21 +9,7 @@ class Reimbursement extends BaseModel
|
||||
{
|
||||
protected $table = 'reimbursements';
|
||||
|
||||
protected $fillable = [
|
||||
'amount',
|
||||
'reimbursed_to',
|
||||
'approved_by',
|
||||
'receipt_path',
|
||||
'description',
|
||||
'status',
|
||||
'expense_id',
|
||||
'added_by',
|
||||
'school_year',
|
||||
'semester',
|
||||
'check_number',
|
||||
'reimbursement_method',
|
||||
'batch_number',
|
||||
];
|
||||
protected $fillable = ['expense_id', 'amount', 'reimbursed_to', 'approved_by', 'receipt_path', 'description', 'status', 'added_by', 'created_at', 'updated_at', 'school_year', 'semester', 'check_number', 'reimbursement_method', 'batch_number'];
|
||||
|
||||
/**
|
||||
* If your table has created_at/updated_at, keep timestamps (default).
|
||||
|
||||
@@ -15,18 +15,7 @@ class ReimbursementBatch extends BaseModel
|
||||
*/
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'title',
|
||||
'status',
|
||||
'created_by',
|
||||
'closed_by',
|
||||
'opened_at',
|
||||
'closed_at',
|
||||
'notes',
|
||||
'school_year',
|
||||
'semester',
|
||||
'yearly_batch_number',
|
||||
];
|
||||
protected $fillable = ['title', 'yearly_batch_number', 'status', 'school_year', 'semester', 'created_by', 'closed_by', 'opened_at', 'closed_at', 'notes'];
|
||||
|
||||
protected $casts = [
|
||||
'created_by' => 'integer',
|
||||
|
||||
@@ -13,14 +13,7 @@ class ReimbursementBatchAdminFile extends BaseModel
|
||||
*/
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'batch_id',
|
||||
'admin_id',
|
||||
'filename',
|
||||
'original_filename',
|
||||
'uploaded_at',
|
||||
'uploaded_by',
|
||||
];
|
||||
protected $fillable = ['batch_id', 'admin_id', 'filename', 'original_filename', 'uploaded_at', 'uploaded_by'];
|
||||
|
||||
protected $casts = [
|
||||
'batch_id' => 'integer',
|
||||
|
||||
@@ -14,17 +14,7 @@ class ReimbursementBatchItem extends BaseModel
|
||||
*/
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'batch_id',
|
||||
'expense_id',
|
||||
'reimbursement_id',
|
||||
'admin_id',
|
||||
'assigned_at',
|
||||
'unassigned_at',
|
||||
'notes',
|
||||
'school_year',
|
||||
'semester',
|
||||
];
|
||||
protected $fillable = ['batch_id', 'expense_id', 'reimbursement_id', 'admin_id', 'assigned_at', 'unassigned_at', 'notes', 'school_year', 'semester'];
|
||||
|
||||
protected $casts = [
|
||||
'batch_id' => 'integer',
|
||||
|
||||
+1
-10
@@ -8,16 +8,7 @@ class Role extends BaseModel
|
||||
{
|
||||
protected $table = 'roles';
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'slug',
|
||||
'description',
|
||||
'dashboard_route',
|
||||
'priority',
|
||||
'is_active',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
protected $fillable = ['name', 'slug', 'description', 'dashboard_route', 'priority', 'is_active', 'created_at', 'updated_at'];
|
||||
|
||||
public $timestamps = true;
|
||||
|
||||
|
||||
@@ -11,10 +11,7 @@ class RoleNavItem extends BaseModel
|
||||
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'role_id',
|
||||
'nav_item_id',
|
||||
];
|
||||
protected $fillable = ['role_id', 'nav_item_id', 'created_at', 'updated_at'];
|
||||
|
||||
protected $casts = [
|
||||
'role_id' => 'integer',
|
||||
|
||||
@@ -10,17 +10,7 @@ class RolePermission extends BaseModel
|
||||
{
|
||||
protected $table = 'role_permissions';
|
||||
|
||||
protected $fillable = [
|
||||
'role_id',
|
||||
'permission_id',
|
||||
'can_create',
|
||||
'can_read',
|
||||
'can_update',
|
||||
'can_delete',
|
||||
'can_manage',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
protected $fillable = ['role_id', 'permission_id', 'can_create', 'can_read', 'can_update', 'can_delete', 'can_manage', 'created_at', 'updated_at'];
|
||||
|
||||
public $timestamps = true;
|
||||
|
||||
|
||||
@@ -13,24 +13,13 @@ class ScoreComment extends BaseModel
|
||||
* legacy: timestamps disabled (created_at handled by DB default).
|
||||
* Keep disabled in Laravel too.
|
||||
*/
|
||||
public $timestamps = true;
|
||||
public $timestamps = false;
|
||||
|
||||
/**
|
||||
* If your DB uses created_at as default timestamp and you want Laravel
|
||||
* to treat it as a date, keep it in casts below.
|
||||
*/
|
||||
protected $fillable = [
|
||||
'student_id',
|
||||
'class_section_id',
|
||||
'score_type',
|
||||
'semester',
|
||||
'school_year',
|
||||
'comment',
|
||||
'comment_review',
|
||||
'reviewed_by',
|
||||
'commented_by',
|
||||
'created_at',
|
||||
];
|
||||
protected $fillable = ['student_id', 'class_section_id', 'score_type', 'semester', 'school_year', 'comment', 'comment_review', 'reviewed_by', 'commented_by', 'created_at'];
|
||||
|
||||
protected $casts = [
|
||||
'student_id' => 'integer',
|
||||
|
||||
@@ -9,15 +9,9 @@ class Section extends BaseModel
|
||||
{
|
||||
protected $table = 'sections';
|
||||
|
||||
protected $fillable = [
|
||||
'section_name',
|
||||
'description',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
'updated_by',
|
||||
];
|
||||
protected $fillable = ['section_name', 'description', 'updated_at', 'updated_by'];
|
||||
|
||||
public $timestamps = true;
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'updated_by' => 'integer',
|
||||
|
||||
@@ -9,27 +9,7 @@ class SemesterScore extends BaseModel
|
||||
{
|
||||
protected $table = 'semester_scores';
|
||||
|
||||
protected $fillable = [
|
||||
'student_id',
|
||||
'school_id',
|
||||
'class_section_id',
|
||||
'updated_by',
|
||||
'homework_avg',
|
||||
'quiz_avg',
|
||||
'project_avg',
|
||||
'midterm_exam_score',
|
||||
'final_exam_score',
|
||||
'attendance_score',
|
||||
'participation_score',
|
||||
'ptap_score',
|
||||
'test_avg',
|
||||
'semester_score',
|
||||
'calculation_mode',
|
||||
'calculation_policy_version',
|
||||
'snapshot_id',
|
||||
'semester',
|
||||
'school_year',
|
||||
];
|
||||
protected $fillable = ['student_id', 'school_id', 'class_section_id', 'updated_by', 'homework_avg', 'quiz_avg', 'project_avg', 'midterm_exam_score', 'final_exam_score', 'attendance_score', 'participation_score', 'ptap_score', 'test_avg', 'semester_score', 'semester', 'school_year', 'created_at', 'updated_at'];
|
||||
|
||||
/**
|
||||
* If your table has created_at/updated_at columns, keep this true (default).
|
||||
|
||||
@@ -9,13 +9,7 @@ class Setting extends BaseModel
|
||||
{
|
||||
protected $table = 'settings';
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'timezone',
|
||||
'updated_by',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
protected $fillable = ['name', 'timezone', 'updated_by', 'created_at', 'updated_at'];
|
||||
|
||||
public $timestamps = true;
|
||||
|
||||
|
||||
+2
-14
@@ -12,21 +12,9 @@ class Staff extends BaseModel
|
||||
/**
|
||||
* legacy: timestamps managed manually (created_at/updated_at set by caller/controller)
|
||||
*/
|
||||
public $timestamps = false;
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'firstname',
|
||||
'lastname',
|
||||
'email',
|
||||
'phone',
|
||||
'role_name',
|
||||
'active_role',
|
||||
'status',
|
||||
'school_year',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
protected $fillable = ['firstname', 'lastname', 'email', 'phone', 'role_name', 'school_year', 'active_role', 'created_at', 'updated_at', 'user_id'];
|
||||
|
||||
protected $casts = [
|
||||
'user_id' => 'integer',
|
||||
|
||||
@@ -20,22 +20,7 @@ class StaffAttendance extends BaseModel
|
||||
* ✅ If class_section_id/position DO exist in your DB, add them to fillable.
|
||||
* ❌ If they do NOT exist, remove them and also remove related methods/scopes.
|
||||
*/
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'role_name',
|
||||
'date',
|
||||
'semester',
|
||||
'school_year',
|
||||
'status',
|
||||
'present',
|
||||
'absent',
|
||||
'late',
|
||||
'reason',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
'created_by',
|
||||
'updated_by',
|
||||
];
|
||||
protected $fillable = ['user_id', 'role_name', 'date', 'semester', 'school_year', 'status', 'reason', 'created_at', 'updated_at', 'created_by', 'updated_by'];
|
||||
|
||||
protected $casts = [
|
||||
'user_id' => 'integer',
|
||||
|
||||
@@ -12,12 +12,7 @@ class Stats extends BaseModel
|
||||
*/
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'students',
|
||||
'teachers',
|
||||
'admins',
|
||||
'users',
|
||||
];
|
||||
protected $fillable = ['students', 'teachers', 'admins', 'users'];
|
||||
|
||||
protected $casts = [
|
||||
'students' => 'integer',
|
||||
|
||||
+1
-19
@@ -19,25 +19,7 @@ class Student extends BaseModel
|
||||
*/
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'school_id',
|
||||
'firstname',
|
||||
'lastname',
|
||||
'dob',
|
||||
'age',
|
||||
'gender',
|
||||
'registration_grade',
|
||||
'photo_consent',
|
||||
'is_new',
|
||||
'parent_id',
|
||||
'school_year',
|
||||
'semester',
|
||||
'registration_date',
|
||||
'tuition_paid',
|
||||
'year_of_registration',
|
||||
'rfid_tag',
|
||||
'is_active',
|
||||
];
|
||||
protected $fillable = ['school_id', 'firstname', 'lastname', 'dob', 'age', 'gender', 'is_active', 'registration_grade', 'is_new', 'photo_consent', 'parent_id', 'registration_date', 'tuition_paid', 'rfid_tag', 'semester', 'year_of_registration', 'school_year'];
|
||||
|
||||
protected $casts = [
|
||||
'school_id' => 'string',
|
||||
|
||||
@@ -14,10 +14,7 @@ class StudentAllergy extends BaseModel
|
||||
*/
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'student_id',
|
||||
'allergy',
|
||||
];
|
||||
protected $fillable = ['student_id', 'allergy'];
|
||||
|
||||
protected $casts = [
|
||||
'student_id' => 'integer',
|
||||
|
||||
@@ -10,18 +10,7 @@ class StudentClass extends BaseModel
|
||||
{
|
||||
protected $table = 'student_class';
|
||||
|
||||
protected $fillable = [
|
||||
'student_id',
|
||||
'school_id',
|
||||
'class_section_id',
|
||||
'school_year',
|
||||
'semester',
|
||||
'is_event_only',
|
||||
'description',
|
||||
'updated_by',
|
||||
'updated_at',
|
||||
'created_at',
|
||||
];
|
||||
protected $fillable = ['student_id', 'class_section_id', 'is_event_only', 'semester', 'school_year', 'description', 'created_at', 'updated_at', 'updated_by'];
|
||||
|
||||
public $timestamps = true;
|
||||
|
||||
|
||||
@@ -14,10 +14,7 @@ class StudentMedicalCondition extends BaseModel
|
||||
*/
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'student_id',
|
||||
'condition_name',
|
||||
];
|
||||
protected $fillable = ['student_id', 'condition_name'];
|
||||
|
||||
protected $casts = [
|
||||
'student_id' => 'integer',
|
||||
|
||||
@@ -10,16 +10,7 @@ class SubjectCurriculum extends BaseModel
|
||||
{
|
||||
protected $table = 'subject_curriculum_items';
|
||||
|
||||
protected $fillable = [
|
||||
'class_id',
|
||||
'school_year',
|
||||
'subject',
|
||||
'unit_number',
|
||||
'unit_title',
|
||||
'chapter_name',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
protected $fillable = ['class_id', 'subject', 'unit_number', 'unit_title', 'chapter_name', 'created_at', 'updated_at'];
|
||||
|
||||
public $timestamps = true;
|
||||
|
||||
|
||||
@@ -10,16 +10,7 @@ class TeacherClass extends BaseModel
|
||||
{
|
||||
protected $table = 'teacher_class';
|
||||
|
||||
protected $fillable = [
|
||||
'teacher_id',
|
||||
'class_section_id',
|
||||
'semester',
|
||||
'school_year',
|
||||
'position',
|
||||
'updated_by',
|
||||
'updated_at',
|
||||
'created_at',
|
||||
];
|
||||
protected $fillable = ['class_section_id', 'teacher_id', 'position', 'semester', 'school_year', 'description', 'created_at', 'updated_at', 'updated_by'];
|
||||
|
||||
public $timestamps = true;
|
||||
|
||||
|
||||
@@ -14,17 +14,7 @@ class TeacherSubmissionNotificationHistory extends BaseModel
|
||||
*/
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'teacher_id',
|
||||
'class_section_id',
|
||||
'admin_id',
|
||||
'notification_category',
|
||||
'message',
|
||||
'status',
|
||||
'school_year',
|
||||
'semester',
|
||||
'sent_at',
|
||||
];
|
||||
protected $fillable = ['teacher_id', 'class_section_id', 'admin_id', 'notification_category', 'message', 'status', 'school_year', 'semester', 'sent_at'];
|
||||
|
||||
protected $casts = [
|
||||
'teacher_id' => 'integer',
|
||||
|
||||
+1
-28
@@ -22,34 +22,7 @@ class User extends Authenticatable implements JWTSubject
|
||||
|
||||
protected $table = 'users';
|
||||
|
||||
protected $fillable = [
|
||||
'password',
|
||||
'account_id',
|
||||
'lastname',
|
||||
'firstname',
|
||||
'gender',
|
||||
'cellphone',
|
||||
'email',
|
||||
'address_street',
|
||||
'apt',
|
||||
'city',
|
||||
'state',
|
||||
'zip',
|
||||
'accept_school_policy',
|
||||
'user_type',
|
||||
'rfid_tag',
|
||||
'school_id',
|
||||
'failed_attempts',
|
||||
'last_failed_at',
|
||||
'semester',
|
||||
'school_year',
|
||||
'status',
|
||||
'is_suspended',
|
||||
'is_verified',
|
||||
'token',
|
||||
'updated_at',
|
||||
'created_at',
|
||||
];
|
||||
protected $fillable = ['school_id', 'firstname', 'lastname', 'gender', 'cellphone', 'email', 'address_street', 'apt', 'city', 'state', 'zip', 'accept_school_policy', 'is_verified', 'status', 'is_suspended', 'failed_attempts', 'password', 'created_at', 'updated_at', 'token', 'account_id', 'user_type', 'semester', 'school_year', 'rfid_tag', 'last_failed_at'];
|
||||
|
||||
protected $hidden = [
|
||||
'password',
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user