Feat: External Engegement, Online Course and Patents
This commit is contained in:
40
app/Models/ExternalEngagement.php
Normal file
40
app/Models/ExternalEngagement.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ExternalEngagement extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'department_id',
|
||||
'faculty_id',
|
||||
'activity',
|
||||
'activity_description',
|
||||
'inviting_organization',
|
||||
'start_date',
|
||||
'end_date',
|
||||
'num_days',
|
||||
'proof'
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'start_date' => 'date',
|
||||
'end_date' => 'date',
|
||||
];
|
||||
|
||||
// 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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user