Feat: Iv organised

This commit is contained in:
Sallu9007
2025-03-24 03:19:29 +05:30
parent 98522c4213
commit a20569c43a
11 changed files with 1074 additions and 65 deletions

View File

@@ -0,0 +1,48 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class IvOrganised extends Model
{
use HasFactory;
protected $table = 'iv_organiseds';
protected $fillable = [
'faculty_id',
'start_date',
'end_date',
'company_name',
'company_address',
'resource_person_name',
'resource_person_contact_details',
'target_audience',
'student_year',
'number_of_participants',
'objective',
'outcomes',
'department_id',
'proof'
];
protected $casts = [
'start_date' => 'datetime',
'end_date' => 'datetime',
'number_of_participants' => 'integer',
];
// Relationship with User (Faculty)
public function user()
{
return $this->belongsTo(User::class, 'faculty_id');
}
// Relationship with Department
public function department()
{
return $this->belongsTo(Department::class, 'department_id');
}
}