add tests batch 20

This commit is contained in:
root
2026-06-09 01:03:53 -04:00
parent 95efb9652e
commit 6be4875c5e
1502 changed files with 13797 additions and 11313 deletions
+11 -10
View File
@@ -2,6 +2,7 @@
namespace App\Models;
use App\Models\BaseModel;
use Illuminate\Support\Facades\DB;
class Enrollment extends BaseModel
@@ -27,14 +28,14 @@ class Enrollment extends BaseModel
];
protected $casts = [
'student_id' => 'integer',
'student_id' => 'integer',
'class_section_id' => 'integer',
'parent_id' => 'integer',
'is_withdrawn' => 'boolean',
'parent_id' => 'integer',
'is_withdrawn' => 'boolean',
// change to 'datetime' if your columns are DATETIME
'enrollment_date' => 'date',
'withdrawal_date' => 'date',
'enrollment_date' => 'date',
'withdrawal_date' => 'date',
];
/* Optional relationships */
@@ -68,11 +69,11 @@ class Enrollment extends BaseModel
->select('students.*')
->where('enrollments.parent_id', $parentId);
if (! empty($schoolYear)) {
if (!empty($schoolYear)) {
$q->where('enrollments.school_year', $schoolYear);
}
if (! empty($semester)) {
if (!empty($semester)) {
$q->where('enrollments.semester', $semester);
}
@@ -91,10 +92,10 @@ class Enrollment extends BaseModel
->where('enrollments.parent_id', $parentId)
->where(function ($w) {
$w->where('enrollments.enrollment_status', 'enrolled')
->orWhere('enrollments.enrollment_status', 'payment pending');
->orWhere('enrollments.enrollment_status', 'payment pending');
});
if (! empty($schoolYear)) {
if (!empty($schoolYear)) {
$q->where('enrollments.school_year', $schoolYear);
}
@@ -117,4 +118,4 @@ class Enrollment extends BaseModel
return $row?->enrollment_status;
}
}
}