fix tests

This commit is contained in:
root
2026-06-11 11:46:12 -04:00
parent c91fa2ce4d
commit 5ead80fdc7
1489 changed files with 11349 additions and 10305 deletions
@@ -3,7 +3,6 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Builder;
use App\Models\BaseModel;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class TeacherSubmissionNotificationHistory extends BaseModel
@@ -28,10 +27,10 @@ class TeacherSubmissionNotificationHistory extends BaseModel
];
protected $casts = [
'teacher_id' => 'integer',
'teacher_id' => 'integer',
'class_section_id' => 'integer',
'admin_id' => 'integer',
'sent_at' => 'datetime',
'admin_id' => 'integer',
'sent_at' => 'datetime',
];
/* ============================================================
@@ -75,7 +74,7 @@ class TeacherSubmissionNotificationHistory extends BaseModel
public function scopeForTerm(Builder $q, string $schoolYear, string $semester): Builder
{
return $q->where('school_year', $schoolYear)
->where('semester', $semester);
->where('semester', $semester);
}
public function scopeCategory(Builder $q, string $category): Builder
@@ -113,15 +112,15 @@ class TeacherSubmissionNotificationHistory extends BaseModel
$req = $updating ? 'sometimes' : 'required';
return [
'teacher_id' => [$req, 'integer', 'min:1', 'exists:users,id'],
'class_section_id' => ['nullable', 'integer'],
'admin_id' => ['nullable', 'integer', 'exists:users,id'],
'notification_category' => [$req, 'string', 'max:120'],
'message' => [$req, 'string', 'max:5000'],
'status' => ['nullable', 'string', 'max:50'],
'school_year' => ['nullable', 'string', 'max:20'],
'semester' => ['nullable', 'string', 'max:20'],
'sent_at' => ['nullable', 'date'],
'teacher_id' => [$req, 'integer', 'min:1', 'exists:users,id'],
'class_section_id' => ['nullable', 'integer'],
'admin_id' => ['nullable', 'integer', 'exists:users,id'],
'notification_category' => [$req, 'string', 'max:120'],
'message' => [$req, 'string', 'max:5000'],
'status' => ['nullable', 'string', 'max:50'],
'school_year' => ['nullable', 'string', 'max:20'],
'semester' => ['nullable', 'string', 'max:20'],
'sent_at' => ['nullable', 'date'],
];
}
}
}