<?php

namespace Modules\Target\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Modules\Product\Models\Product;
use Modules\User\Models\User;

class Target extends Model
{
    protected $fillable =
    [
        'year','month','target','product_id','employee_id','lock'
    ];

    /**
     * Get current description of the the Room
     * @return HasOne
     */
    public function employee() :BelongsTo
    {
        return $this->belongsTo(User::class,'employee_id')->withTrashed();
    }

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

}
