ActivitySongTypeEnum.php 333 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 <?php namespace App\Enums; enum ActivitySongTypeEnum: int { case SONG = 1; case DEMO = 2; /** * @return string */ public function label(): string { return match ($this) { self::SONG => '歌曲', self::DEMO => 'Demo', default => '未知' }; } }