<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Coach extends BaseModel
{
    use HasFactory;

    public $guarded = ['agree_user','disagree_user'];

    public function partner()
    {
        return $this->hasOne(Partner::class, 'id', 'partner_id');
    }

    public function service_user(){
        return $this->hasOneThrough(ServiceUser::class,Partner::class,'id','user_id','partner_id','user_id');
    }
}
