MallAddonsEnum.php 776 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace common\enums\addons;
  3. /**
  4. *
  5. * Class MallAddonsEnum
  6. * @package common\enums
  7. * @author qimall
  8. */
  9. class MallAddonsEnum
  10. {
  11. const EXPIRE = -1;
  12. const UNINSTALL = 0;
  13. const TO_BE_INSTALL = 1;
  14. const INSTALL = 2;
  15. /**
  16. * 获取注释
  17. * @Author: lun
  18. * @DateTime: 2022/2/28 0028 10:42
  19. * @Copyright: copyright (c) 2021 广东七件事集团
  20. * @param string $type
  21. * @return string|string[]
  22. */
  23. public static function getAddonsStatus($type = '')
  24. {
  25. $data = [
  26. self::EXPIRE => '已过期',
  27. self::UNINSTALL => '卸载',
  28. self::TO_BE_INSTALL => '待安装',
  29. self::INSTALL => '已安装',
  30. ];
  31. return empty($type) ? $data : $data[$type];
  32. }
  33. }