<?php
/**
 * Created by PhpStorm.
 * User: zilongs
 * Date: 20-9-30
 * Time: 下午2:51
 */

namespace App\Models;

class SchedulePeriod extends BaseModel
{
    public function organization()
    {
        return $this->belongsTo(Organization::class)->select(['id', 'name', 'address', 'latitude', 'longitude']);
    }

    public function timePeriod()
    {
        return $this->belongsTo(TimePeriod::class)->select(['id', 'start_time_period', 'end_time_period']);
    }

    public function docter()
    {
        return $this->hasOne(Docter::class,'id','docter_id');
    }
}
