__('Is_hidden 1'), '0' => __('Is_hidden 0')]; } public function getIsShowRealList() { return ['0' => __('Is_show_real 0'), '1' => __('Is_show_real 1')]; } public function getTypeList() { return ['0' => __('Type 0'), '1' => __('Type 1'), '2' => __('Type 2')]; } public function getAuitStatusList() { return ['0' => __('Auit_status 0'), '1' => __('Auit_status 1'), '2' => __('Auit_status 2')]; } public function getIsHiddenTextAttr($value, $data) { $value = $value ? $value : (isset($data['is_hidden']) ? $data['is_hidden'] : ''); $list = $this->getIsHiddenList(); return isset($list[$value]) ? $list[$value] : ''; } public function getIsShowRealTextAttr($value, $data) { $value = $value ? $value : (isset($data['is_show_real']) ? $data['is_show_real'] : ''); $list = $this->getIsShowRealList(); 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 getAuitStatusTextAttr($value, $data) { $value = $value ? $value : (isset($data['auit_status']) ? $data['auit_status'] : ''); $list = $this->getAuitStatusList(); return isset($list[$value]) ? $list[$value] : ''; } public function topichub() { return $this->belongsTo('Topichub', 'topic_id', 'id', [], 'LEFT')->setEagerlyType(0); } public function user() { return $this->belongsTo('User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0); } }