<?php

namespace App\Models;

use App\Traits\CreatedUpdatedBy;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class WorkShop extends Model
{
    use HasFactory,CreatedUpdatedBy;
    protected $fillable = ["shop_name", "mobile", "city_id", "address" , 'delete', "created_by", "updated_by"];

    public function city()
    {
        return $this->belongsTo(City::class, 'city_id', 'id');
    }

    public function workshop_payables()
    {
        return $this->hasMany(WorkshopPayable::class, 'workshop_id', 'id');
    }
}
