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

namespace App\Models;

class Schedule extends BaseModel
{
    public function schedulePeriod()
    {
        return $this->hasMany(SchedulePeriod::class);
    }

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