<?php

namespace App\Models\UserManagement;

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

class UserType extends Model{

    use HasFactory,Sushi;

    protected $table = "users_mgt__user_types";
    protected $primaryKey = "id";
    protected $keyType= "string";
    public $incrementing= false;

    const CUSTOMER = "CUSTOMER";
    const ADMIN = "ADMIN";
    const FK_ID = "user_type_code";

    protected $rows = [
        ["id" => self::CUSTOMER,  "name" => "Client" ,"code" => "M" ],
        ["id" => self::ADMIN,"name" => "STAFF" ,"code" => "PV" ]
    ];

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