迁移并合并医生问诊评价接口
This commit is contained in:
@@ -15,6 +15,9 @@ class BasicDataRequest extends FormRequest
|
||||
'city_id',
|
||||
'county_id',
|
||||
],
|
||||
'getDiseaseSearch' => [ // 搜索疾病分类
|
||||
'disease_class_name',
|
||||
]
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -33,6 +36,7 @@ class BasicDataRequest extends FormRequest
|
||||
return [
|
||||
'province_id' => 'required_with:city_id,county_id',
|
||||
'city_id' => 'required_with:county_id',
|
||||
'disease_class_name' => 'required',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -44,6 +48,7 @@ class BasicDataRequest extends FormRequest
|
||||
return [
|
||||
'province_id.required_with' => "请选择省份",
|
||||
'city_id.required_with' => "请选择城市",
|
||||
'disease_class_name.required' => HttpEnumCode::getMessage(HttpEnumCode::CLIENT_HTTP_ERROR),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Request;
|
||||
|
||||
use App\Constants\HttpEnumCode;
|
||||
use Hyperf\Validation\Request\FormRequest;
|
||||
|
||||
class DiseaseRequest extends FormRequest
|
||||
{
|
||||
protected array $scenes = [
|
||||
'getDiseaseSearch' => [ // 搜索疾病分类
|
||||
'disease_class_name',
|
||||
]
|
||||
];
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'disease_class_name' => 'required',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取已定义验证规则的错误消息.
|
||||
*/
|
||||
public function messages(): array
|
||||
{
|
||||
return [
|
||||
'disease_class_name.required' => HttpEnumCode::getMessage(HttpEnumCode::CLIENT_HTTP_ERROR),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -43,6 +43,17 @@ class UserDoctorRequest extends FormRequest
|
||||
'getPrescriptionList' => [ // 获取处方列表
|
||||
'prescription_status' // 处方审核状态(0:审核中 1:审核成功 2:审核驳回)
|
||||
],
|
||||
'getDoctorWords' => [ // 获取常用语列表
|
||||
'words_type'
|
||||
],
|
||||
'addDoctorWords' => [ // 新增常用语列表
|
||||
'words',
|
||||
'words_type'
|
||||
],
|
||||
'getDoctorEvaluationList' => [ // 获取医生评价
|
||||
'doctor_id',
|
||||
'evaluation_type',
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -70,6 +81,10 @@ class UserDoctorRequest extends FormRequest
|
||||
'city_id' => 'required|required_with:county_id',
|
||||
'county_id' => 'required',
|
||||
'prescription_status' => 'required|integer|min:0|max:2',
|
||||
'words_type' => 'required|integer|min:1|max:3',
|
||||
'words' => 'required',
|
||||
'doctor_id' => 'required',
|
||||
'evaluation_type' => 'required|integer|min:1|max:3',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -107,6 +122,16 @@ class UserDoctorRequest extends FormRequest
|
||||
'prescription_status.integer' => HttpEnumCode::getMessage(HttpEnumCode::CLIENT_HTTP_ERROR),
|
||||
'prescription_status.min' => HttpEnumCode::getMessage(HttpEnumCode::CLIENT_HTTP_ERROR),
|
||||
'prescription_status.max' => HttpEnumCode::getMessage(HttpEnumCode::CLIENT_HTTP_ERROR),
|
||||
'words_type.required' => HttpEnumCode::getMessage(HttpEnumCode::CLIENT_HTTP_ERROR),
|
||||
'words_type.integer' => HttpEnumCode::getMessage(HttpEnumCode::CLIENT_HTTP_ERROR),
|
||||
'words_type.min' => HttpEnumCode::getMessage(HttpEnumCode::CLIENT_HTTP_ERROR),
|
||||
'words_type.max' => HttpEnumCode::getMessage(HttpEnumCode::CLIENT_HTTP_ERROR),
|
||||
'words.required' => HttpEnumCode::getMessage(HttpEnumCode::CLIENT_HTTP_ERROR),
|
||||
'doctor_id.required' => HttpEnumCode::getMessage(HttpEnumCode::CLIENT_HTTP_ERROR),
|
||||
'evaluation_type.required' => HttpEnumCode::getMessage(HttpEnumCode::CLIENT_HTTP_ERROR),
|
||||
'evaluation_type.integer' => HttpEnumCode::getMessage(HttpEnumCode::CLIENT_HTTP_ERROR),
|
||||
'evaluation_type.min' => HttpEnumCode::getMessage(HttpEnumCode::CLIENT_HTTP_ERROR),
|
||||
'evaluation_type.max' => HttpEnumCode::getMessage(HttpEnumCode::CLIENT_HTTP_ERROR),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user