<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; class Intern extends Model {protected $guarded=[];protected function casts():array{return ['start_date'=>'date','end_date'=>'date','stipend_amount'=>'decimal:2'];}public function user(){return $this->belongsTo(User::class);}public function department(){return $this->belongsTo(Department::class);}public function office(){return $this->belongsTo(Office::class);}public function shift(){return $this->belongsTo(Shift::class);}public function mentor(){return $this->belongsTo(User::class,'mentor_user_id');}public function learningItems(){return $this->hasMany(InternLearningItem::class);}public function evaluations(){return $this->hasMany(InternEvaluation::class);}public function certificate(){return $this->hasOne(InternCertificate::class);}}