__('Created'), 'paid' => __('Paid'), 'closed' => __('Closed')]; } public function getChannelList() { return ['wechat' => __('Wechat'), 'alipay' => __('Alipay')]; } public function factory() { return $this->belongsTo('Factory', 'factory_id', 'id', [], 'LEFT')->setEagerlyType(0); } public function getStatusTextAttr($value, $data) { $value = $value ?: ($data['status'] ?? ''); $list = $this->getStatusList(); return $list[$value] ?? ''; } }