__('Status 0'), '1' => __('Status 1')]; } public function getStatusTextAttr($value, $data) { $value = $value ?: ($data['status'] ?? ''); $list = $this->getStatusList(); return $list[$value] ?? ''; } public function User() { return $this->hasOne('\\app\\common\\model\\User', 'id', 'user_id', [], 'LEFT'); } public function Goods() { return $this->hasOne('Goods', 'id', 'goods_id', [], 'LEFT'); } }