'微信', 20 => '支付宝', 30 => '银行卡', 40 => '余额', ]; /** * 申请状态 * @var array */ public $applyStatus = [ 10 => '待审核', 20 => '审核通过', 30 => '驳回', 40 => '已打款', 50 => '打款中', ]; /** * 关联队长用户表 * @return \think\model\relation\BelongsTo */ public function user() { return $this->belongsTo('User'); } /** * 审核状态 * @param $value * @return array */ public function getApplyStatusAttr($value) { $method = [10 => '待审核', 20 => '审核通过', 30 => '驳回', 40 => '已打款', 50 => '打款中']; return ['text' => $method[$value], 'value' => $value]; } /** * 提现详情 * @param $id * @return array|\think\Model|null * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException */ public static function detail($id, $with = ['user']) { return (new static())->with($with)->find($id); } }