ActivityCatalog.php 965 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace App\Support;
  3. use App\Services\Sharing\ShareDefaults;
  4. /** Reuse commission game categories; "other" is an activity-only classification. */
  5. final class ActivityCatalog
  6. {
  7. public static function activityTypes(): array
  8. {
  9. return [2 => '普通活动', 3 => '即充即送', 4 => '老用户召集令', 5 => 'USDT使用教学', 6 => '余额宝'];
  10. }
  11. public static function gameTypes(): array
  12. {
  13. return ShareDefaults::categories() + ['other' => '其他'];
  14. }
  15. public static function options(): array
  16. {
  17. $gameTypes = $activityTypes = [];
  18. foreach (self::gameTypes() as $value => $label) {
  19. $gameTypes[] = ['value' => $value, 'label' => $label];
  20. }
  21. foreach (self::activityTypes() as $value => $label) {
  22. $activityTypes[] = ['value' => $value, 'label' => $label];
  23. }
  24. return ['game_types' => $gameTypes, 'activity_types' => $activityTypes];
  25. }
  26. }