hasMany('RecoveryImage')->order(['id']); } public function getOrderStatusTextAttr($value, $data) { $result = RecoveryStatusEnum::data(); if (!empty($result[$data['order_status']]['name'])) { return $result[$data['order_status']]['name']; } return '未知'; } public function getRecoveryTypeTextAttr($value, $data) { $result = RecoveryTypeEnum::data(); if (!empty($result[$data['recovery_type']]['name'])) { return $result[$data['recovery_type']]['name']; } return '未知'; } /** * @notes:详情 * @param $where * @param array $with * @return RecoveryOrder|array|null * @author: wanghousheng */ public static function detail($where, array $with = []) { return static::get($where, $with); } }