Feat: Activites Organised

This commit is contained in:
Sallu9007
2025-03-24 01:54:58 +05:30
parent 4352abdbd1
commit 98522c4213
12 changed files with 1061 additions and 10 deletions

View File

@@ -0,0 +1,56 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ActivitiesOrganised extends Model
{
use HasFactory;
protected $table = 'activities_organiseds';
protected $fillable = [
'title',
'resource_person_name',
'resource_person_organization',
'target_audience',
'number_of_participants',
'objective',
'outcomes',
'department_id',
'faculty_id',
'start_date',
'end_date',
'num_days',
'venue',
'activity_type',
'category',
'level',
'proof'
];
protected $casts = [
'start_date' => 'datetime',
'end_date' => 'datetime',
'number_of_participants' => 'integer',
'num_days' => 'integer'
];
/**
* Get the department that owns the activity.
*/
public function department()
{
return $this->belongsTo(Department::class);
}
/**
* Get the faculty user that owns the activity.
*/
public function user()
{
return $this->belongsTo(User::class, 'faculty_id');
}
}