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

39 lines
667 B
PHP

<?php
namespace App\Enums;
enum WalletToBankLogPayWay: int {
case Offline = 1;
case Behalf = 2;
/**
* @return string
*/
public function color(): string
{
return match ($this) {
static::Offline => '#5b69bc',
static::Behalf => '#21b978',
};
}
/**
* @return string
*/
public function text(): string
{
return static::texts()[$this->value];
}
/**
* @return array
*/
public static function texts(): array
{
return [
static::Offline->value => '线下',
static::Behalf->value => '代付',
];
}
}