<?php

namespace Modules\Product\Models;

use Illuminate\Database\Eloquent\Model;
use Modules\Canteen\Models\Canteen;
use Modules\Category\Models\Category;

class ProductStock extends Model
{
    protected $fillable =
        [
            'uuid',
            'status',
            'date',
            'original_count',
            'original_price',
            'count',
            'price',
            'balance',
            'balance_price',
            'product_id',
            'category_id',
            'canteen_id',
            'user_id',
            'order_id',
        ];

    public function product()
    {
        return $this->belongsTo(Product::class)->withTrashed();
    }

    public function category()
    {
        return $this->belongsTo(Category::class)->withTrashed();
    }

    public function canteen()
    {
        return $this->belongsTo(Canteen::class)->withTrashed();
    }

}
