Add student achievements module and improve student admin workflows
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class StudentAchievement extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'student_id',
|
||||
'achievement_name',
|
||||
'category',
|
||||
'level',
|
||||
'organizer',
|
||||
'rank',
|
||||
'achievement_date',
|
||||
'achievement_year',
|
||||
'description',
|
||||
'certificate_file',
|
||||
'activity_photo',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'achievement_date' => 'date',
|
||||
'achievement_year' => 'integer',
|
||||
];
|
||||
}
|
||||
|
||||
public function student(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Student::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user