hospital-applets-api/app/Request/PatientCaseRequest.php
2023-11-28 13:54:31 +08:00

47 lines
961 B
PHP

<?php
declare(strict_types=1);
namespace App\Request;
use App\Constants\HttpEnumCode;
use Hyperf\Validation\Request\FormRequest;
use Hyperf\Validation\Rule;
class PatientCaseRequest extends FormRequest
{
protected array $scenes = [
'getPatientFamilyInquiryCase' => [ // 获取患者问诊病例
'order_inquiry_id',
],
];
/**
* 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 [
'order_inquiry_id' => 'required',
];
}
/**
* 获取已定义验证规则的错误消息.
*/
public function messages(): array
{
return [
'order_inquiry_id.required' => HttpEnumCode::getMessage(HttpEnumCode::CLIENT_HTTP_ERROR),
];
}
}