<?php

namespace App\Modules\Bookings;

use App\Models\ValidationModel;
use App\Modules\Stock\Stock;

class RmaItem extends ValidationModel
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'rma_items';

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = ['task_id', 'stock_id', 'quantity', 'status_id'];

    /**
     * Array of validation rules.
     *
     * @var  array
     */
    protected static $rules = [
        'task_id'   => 'required',
        'stock_id'  => 'required',
    ];

    /**
     * The stock item description of the part.
     *
     * @return Illuminate\Database\Eloquent\Relations\BenlongsTo
     */
    public function stock()
    {
        return $this->belongsTo(Stock::class);
    }
}
