6
0
Fork 0
jiqu-library-server/app/Enums/DealerDeliveryBillStatus.php

36 lines
853 B
PHP

<?php
namespace App\Enums;
enum DealerDeliveryBillStatus: int {
case Pending = 0; // 待付款
case Paid = 1; // 已付款
case Shippinged = 2; //已发货
case Cancelled = 10; // 已取消
public function text()
{
return static::texts()[$this->value];
}
public static function colors()
{
return [
static::Pending->value => '#5b69bc',
static::Paid->value => '#21b978',
static::Shippinged->value => '#21b978',
static::Cancelled->value => '#b3b9bf',
];
}
public static function texts()
{
return [
static::Pending->value => '待付款',
static::Paid->value => '已付款',
static::Shippinged->value => '已发货',
static::Cancelled->value => '已取消',
];
}
}