38 lines
799 B
PHP
38 lines
799 B
PHP
<?php
|
|
|
|
namespace App\Enums;
|
|
|
|
enum DealerEarningStatus: int {
|
|
case Pending = 0;//待打款
|
|
case Paid = 1;//已打款
|
|
case Completed = 5;//已完成
|
|
|
|
public function color()
|
|
{
|
|
return static::colors()[$this->value] ?? '#5b69bc';
|
|
}
|
|
|
|
public function text()
|
|
{
|
|
return static::texts()[$this->value];
|
|
}
|
|
|
|
public static function colors()
|
|
{
|
|
return [
|
|
static::Pending->value => '#5b69bc',
|
|
static::Paid->value => '#3085d6',
|
|
static::Completed->value => '#21b978',
|
|
];
|
|
}
|
|
|
|
public static function texts()
|
|
{
|
|
return [
|
|
static::Pending->value => '待打款',
|
|
static::Paid->value => '待收款',
|
|
static::Completed->value => '已完成',
|
|
];
|
|
}
|
|
}
|