RechargeOrderType.php 604 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace fast;
  3. /**
  4. * 资产账变类型类
  5. */
  6. class RechargeOrderType
  7. {
  8. /**
  9. * 服务器算力
  10. */
  11. const RentalPower = 1;
  12. /**
  13. * 租赁服务器
  14. */
  15. const RentalServer = 2;
  16. private static array $actions = [
  17. self::RentalPower => '服务器算力',
  18. self::RentalServer => '租赁服务器',
  19. ];
  20. public static function getText(int $value): string
  21. {
  22. if (array_key_exists($value, self::$actions)) {
  23. return self::$actions[$value];
  24. } else {
  25. return Common::getUnknownText();
  26. }
  27. }
  28. }