29 lines
688 B
PHP
29 lines
688 B
PHP
<?php
|
|
|
|
namespace App\Enums;
|
|
|
|
use App\Enums\Traits\HasLabels;
|
|
|
|
enum SongSituation: string
|
|
{
|
|
use HasLabels;
|
|
|
|
case Unset = '未定義';
|
|
case Romantic = '浪漫';
|
|
case Soft = '柔和';
|
|
case Dynamic = '動感';
|
|
case Bright = '明亮';
|
|
|
|
// 返回對應的顯示文字
|
|
public function labels(): string
|
|
{
|
|
return match($this) {
|
|
self::Unset => __('enums.Unset'),
|
|
self::Romantic => __('enums.song.situation.Romantic'),
|
|
self::Soft => __('enums.song.situation.Soft'),
|
|
self::Dynamic => __('enums.song.situation.Dynamic'),
|
|
self::Bright => __('enums.song.situation.Bright'),
|
|
};
|
|
}
|
|
|
|
} |