<?php

namespace App\Model\stock_inventory;

use App\Model\product\ProductModel;
use App\Model\product\ProductUnitModel;
use Illuminate\Database\Eloquent\Model;

class ItemRequestModel extends Model
{
    protected $table = "nso007_item_request";

    protected $fillable = [
        'branch_id',
        'warehouse_id',
        'driver_id',
        'to_warehouse',
        'user_id',
        'request_by',
        'request_to',
        'approve_by',
        'done_by',
        'invoice_number',
        'date',
        'approve_date',
        'done_date',
        'year',
        'note',
        'status_note',
        'status',
        'done_status',
        'delivery_fee',
        'delivery_phone',
        'delivery_status',
        'confirm_status',
        'location',
        'done_note',
    ];

    public function detail()
    {
        return $this->hasMany(ItemRequestDetailModel::class,'request_id','id');
    }


}
