Files
Faculty-Documentation/app/Models/ActivitiesOrganised.php
2025-03-24 01:54:58 +05:30

56 lines
1.2 KiB
PHP

<?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');
}
}