File: /var/www/vhost/disk-apps/demo-telemedicina.teky.com.co/app/Event.php
<?php
namespace Telemedicina;
use Telemedicina\EventState;
use Telemedicina\Specialty;
use Illuminate\Database\Eloquent\Model;
class Event extends Model
{
public function user(){
return $this->belongsTo(User::class, 'user_id')->with('identification_type');
}
public function event_state_option(){
return $this->belongsTo(EventState::class, 'event_state');
}
public function medic(){
return $this->belongsTo(User::class, 'medic_id')->with('centro');
}
public function agenda_type(){
return $this->belongsTo(AgendaType::class, 'agenda_type_id');
}
public function speciality(){
return $this->belongsTo(Specialty::class, 'specialty_id');
}
}