__('Previewed'), 'printed' => __('Printed'), 'canceled' => __('Canceled')]; } public function getBizTypeList() { return ['product' => __('Product'), 'workorder' => __('Workorder')]; } public function getLodopModeList() { return ['preview' => __('Preview'), 'print' => __('Print')]; } 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] ?? ''; } }