<?php

namespace App\Model;

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

class TrackStockModel extends Model
{

    protected $table = "nso007_track_stock";

    protected $fillable = [
        'user_id',
        'warehouse_id',
        'customer_id',
        'ref_number',
        'ref_type',
        'ref_id',
        'barcode',
        'product_id',
        'qty',
        'date',
        'last_stock',
        'type',
        'note',
        'operation',
    ];

    public function product()
    {
        return $this->hasOne(ProductModel::class, 'id','product_id');
    }
}
