<?php

namespace App\Models\StockManagement;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Sushi\Sushi;

class AdjustmentReason extends Model{
    use HasFactory,Sushi;

    protected $keyType = 'string';
    public $incrementing =  false;
    const FK_ID = "reason_code";

    const ACCIDENT = "ACCIDENT";
    const STOLE = "STOLE";
    const BAD_PRODUCT = "BAD_PRODUCT";
    const BAD_COUNTING = "BAD_COUNTING";
    const ROLLBACK_STOCK = "ROLLBACK_STOCK";
    const ORDERED_PRODUCT = "ORDERED_PRODUCT";
    const STOCK_REQUEST = "STOCK_REQUEST";
    const NOTING = "NOTING";

    protected $rows = [
        ["id" => self::ACCIDENT,  "name" => "Accident" ,"color" => "" ],
        ["id" => self::STOLE,"name" => "Stolen" ,"color" => "" ],
        ["id" => self::BAD_PRODUCT,"name" => "Bad Product" ,"color" => "" ],
        ["id" => self::BAD_COUNTING,"name" => "Bad Counting" ,"color" => "" ],
        ["id" => self::ROLLBACK_STOCK,"name" => "Rollback Stock" ,"color" => "" ],
        ["id" => self::ORDERED_PRODUCT,"name" => "Ordered Product" ,"color" => "" ],
        ["id" => self::STOCK_REQUEST,"name" => "Stock Request" ,"color" => "" ],
        ["id" => self::NOTING,"name" => "N/A" ,"color" => "" ],
    ];



    //GETTERS
    public function getNameAttribute($value){
        return __($value);
    }





}
