新增获取医生我的账户数据接口

This commit is contained in:
2023-02-22 18:16:22 +08:00
parent 2f76b0f877
commit c1320cb71e
9 changed files with 355 additions and 18 deletions
+45
View File
@@ -0,0 +1,45 @@
<?php
declare(strict_types=1);
namespace App\Request;
use App\Constants\HttpEnumCode;
use Hyperf\Validation\Request\FormRequest;
class DoctorAccountRequest extends FormRequest
{
protected array $scenes = [
'getInquiryConfig' => [ // 获取医生问诊配置
'date',
],
];
/**
* 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 [
'date' => 'required',
];
}
/**
* 获取已定义验证规则的错误消息.
*/
public function messages(): array
{
return [
'date.required' => HttpEnumCode::getMessage(HttpEnumCode::CLIENT_HTTP_ERROR),
];
}
}