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

33 lines
710 B
PHP

<?php
namespace App\Enums;
enum DealerDeliveryBillStatus: int {
case Pending = 0; // 待付款
case Paid = 1; // 已付款
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::Cancelled->value => '#b3b9bf',
];
}
public static function texts()
{
return [
static::Pending->value => '待付款',
static::Paid->value => '已付款',
static::Cancelled->value => '已取消',
];
}
}