<?php

namespace App\Models;

use Illuminate\Database\Eloquent\SoftDeletes;
use Slowlyo\OwlAdmin\Models\BaseModel as Model;

/**
 * 店铺服务
 */
class ShopService extends Model
{
	use SoftDeletes;

	protected $table = 'shop_services';

    /**
     * @Author FelixYin
     * @description 服务所属店铺
     */
    public function shop()
    {
        return $this->belongsTo('App\Models\ShopInfo', 'shop_id');
    }

    /**
     * @Author FelixYin
     * @description 店铺服务所属项目
     */
    public function project()
    {
        return $this->belongsTo('App\Models\Project', 'service_id');
    }

    /**
     * @Author FelixYin
     * @description 店铺项目关联技师服务
     */
    public function coaches()
    {
        return $this->hasMany('App\Models\ShopCoachService', 'service_id', 'id');
    }
}