__('Type 1')]; } public function getStatusList() { //return ['0' => __('Status 0'), '1' => __('Status 1'), '10' => __('Status 10')]; return [ '1' => __('Status 1'), '10' => __('Status 10')]; } public function getIsNoticeList() { return ['0' => __('Is_notice 0'), '1' => __('Is_notice 1')]; } public function getTypeTextAttr($value, $data) { $value = $value ?: ($data['type'] ?? ''); $list = $this->getTypeList(); return $list[$value] ?? ''; } public function getStatusTextAttr($value, $data) { $value = $value ?: ($data['status'] ?? ''); $list = $this->getStatusList(); return $list[$value] ?? ''; } public function getIsNoticeTextAttr($value, $data) { $value = $value ?: ($data['is_notice'] ?? ''); $list = $this->getIsNoticeList(); return $list[$value] ?? ''; } public function order() { return $this->belongsTo('Order', 'order_id', 'id', [], 'LEFT')->setEagerlyType(0); } }