__('Man'), 'woman' => __('Woman')]; } public function getLevelList() { return ['basics' => __('Basics'), 'middle' => __('Middle'), 'advanced' => __('Advanced')]; } public function getStatusList() { return ['hidden' => __('Hidden'), 'checking' => __('Checking'), 'normal' => __('Normal')]; } public function getTypeList() { return ['app' => __('App')]; } public function getGenderTextAttr($value, $data) { $value = $value ? $value : (isset($data['gender']) ? $data['gender'] : ''); $list = $this->getGenderList(); return isset($list[$value]) ? $list[$value] : ''; } public function getLevelTextAttr($value, $data) { $value = $value ? $value : (isset($data['level']) ? $data['level'] : ''); $list = $this->getLevelList(); return isset($list[$value]) ? $list[$value] : ''; } public function getStatusTextAttr($value, $data) { $value = $value ? $value : (isset($data['status']) ? $data['status'] : ''); $list = $this->getStatusList(); return isset($list[$value]) ? $list[$value] : ''; } public function getTypeTextAttr($value, $data) { $value = $value ? $value : (isset($data['type']) ? $data['type'] : ''); $list = $this->getTypeList(); return isset($list[$value]) ? $list[$value] : ''; } public function store() { return $this->belongsTo('app\admin\model\Store', 'store_id', 'id', [], 'LEFT')->setEagerlyType(0); } public function parent() { return $this->belongsTo(self::class, 'parent_id', 'id', [], 'LEFT')->setEagerlyType(0); } }