<?php

namespace App\Models\SettingManagement;

use App\Models\SettingManagement\Traits\HasStatusAttributes;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Sushi\Sushi;

class OrderStatus extends Model{
    use HasFactory,HasStatusAttributes;

    const FK_ID = "order_status";

    protected $table = "setting_mgt__order_statuses";


     const NEW_ORDER = "NEW_ORDER";
     const PAID = "PAID";
     const UNDER_PROCESS = "UNDER_PROCESS";
     const DELIVERED = "DELIVERED";
     const REFUNDED_REQUEST = "REFUNDED_REQUEST";
     const RETURNED_ORDER = "RETURNED";
     const REFUNDED_ORDER = "REFUNDED";
     const CANCELED = "CANCELED";
     const REJECTED = "REJECTED";

     protected $casts = [
         "style" => 'array'
     ];


     public static function notModifiables(){
         return [
             Status::DELIVERED,
             Status::CANCELED,
             Status::REFUNDED_ORDER,
         ];
     }

    public static function collected(){
        return [
            self::PAID,
            self::DELIVERED,
            self::UNDER_PROCESS,
        ];
    }

}
