123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- <?php
-
-
- namespace app\common\enum;
-
-
- class TeamEnum
- {
-
-
- const TEAM_STATUS_START = 1;
- const TEAM_STATUS_STOP = 0;
-
-
-
- const TEAM_AUDIT_WAIT = 0;
- const TEAM_AUDIT_SUCCESS = 1;
- const TEAM_AUDIT_REFUSE = 2;
-
-
-
- const TEAM_STATUS_CONDUCT = 0;
- const TEAM_STATUS_SUCCESS = 1;
- const TEAM_STATUS_FAIL = 2;
-
-
-
- public static function getTeamStatusDesc($type)
- {
- $desc = [
- self::TEAM_STATUS_START => '进行中',
- self::TEAM_STATUS_STOP => '已停止',
- ];
-
- if ($type === true){
- return $desc;
- }
- return $desc[$type] ?? '';
- }
-
-
-
- public static function getTeamAuditDesc($type)
- {
- $desc = [
- self::TEAM_AUDIT_WAIT => '待审核',
- self::TEAM_AUDIT_SUCCESS => '审核通过',
- self::TEAM_AUDIT_REFUSE => '审核拒绝',
- ];
-
- if ($type === true){
- return $desc;
- }
- return $desc[$type] ?? '';
- }
-
-
- public static function getStatusDesc($type)
- {
- $desc = [
- self::TEAM_STATUS_CONDUCT => '拼购中',
- self::TEAM_STATUS_SUCCESS => '拼团成功',
- self::TEAM_STATUS_FAIL => '拼团失败',
- ];
-
- if ($type === true){
- return $desc;
- }
- return $desc[$type] ?? '';
- }
-
- }
|