<?php

namespace App\Models\Project;

use App\Models\Project\Item;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;

class Vendor_item_Category extends Model
{
    use HasFactory;

    protected $table = 'vendor_item_categories';
    protected $fillable = ['photo','name_en','name_ar','vendor_id','status'];

    public function vender()
    {
        return  $this->belongsTo(Vendor_detail::class, 'vendor_id','id');
    }

    public function items()
    {
        return  $this->hasMany(Item::class, 'vendor_cat_id', 'id');
    }
}
