12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- namespace app\common\model\distribution;
-
- use app\common\basics\Models;
-
- class DistributionMemberApply extends Models
- {
-
-
- const STATUS_WAIT_AUDIT = 0;
- const STATUS_AUDIT_SUCCESS = 1;
- const STATUS_AUDIT_ERROR = 2;
-
-
-
-
- public function user()
- {
- return $this->hasOne('app\common\model\user\User', 'id', 'user_id');
- }
-
-
-
-
- public static function getApplyStatus($status = true)
- {
- $desc = [
- self::STATUS_WAIT_AUDIT => '待审核',
- self::STATUS_AUDIT_SUCCESS => '审核通过',
- self::STATUS_AUDIT_ERROR => '审核拒绝',
- ];
- if ($status === true) {
- return $desc;
- }
- return $desc[$status] ?? '未知';
- }
- }
|