fix gitlab tests
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use App\Models\BaseModel;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class TeacherSubmissionNotificationHistory extends BaseModel
|
||||
@@ -27,10 +28,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',
|
||||
];
|
||||
|
||||
/* ============================================================
|
||||
@@ -74,7 +75,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
|
||||
@@ -112,15 +113,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'],
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user