'date', 'violation_time' => 'datetime:H:i', 'is_verified' => 'boolean', 'verified_at' => 'datetime', 'points' => 'integer', ]; } public function student(): BelongsTo { return $this->belongsTo(Student::class); } public function violationType(): BelongsTo { return $this->belongsTo(ViolationType::class, 'violation_type_id'); } public function recorder(): BelongsTo { return $this->belongsTo(User::class, 'recorded_by'); } public function verifier(): BelongsTo { return $this->belongsTo(User::class, 'verified_by'); } public function evidences(): HasMany { return $this->hasMany(ViolationEvidence::class); } public function handlings(): HasMany { return $this->hasMany(ViolationHandling::class); } public function handler(): BelongsTo { return $this->belongsTo(User::class, 'handled_by'); } public function isUnhandled(): bool { return $this->handling_status === 'unhandled'; } public function isInProgress(): bool { return $this->handling_status === 'in_progress'; } public function isResolved(): bool { return $this->handling_status === 'resolved'; } }