新增
This commit is contained in:
@@ -17,7 +17,10 @@ class PrescriptionLibraryValidate extends BaseValidate
|
||||
'formula_type' => 'in:主方,辅方',
|
||||
'herbs' => 'require|array',
|
||||
'is_public' => 'in:0,1',
|
||||
'disable_edit' => 'in:0,1'
|
||||
'disable_edit' => 'in:0,1',
|
||||
'report_id' => 'require|number|gt:0',
|
||||
'content' => 'require|max:12000',
|
||||
'limit' => 'integer|between:1,500'
|
||||
];
|
||||
|
||||
protected $message = [
|
||||
@@ -29,7 +32,14 @@ class PrescriptionLibraryValidate extends BaseValidate
|
||||
'herbs.require' => '药材列表不能为空',
|
||||
'herbs.array' => '药材列表格式错误',
|
||||
'is_public.in' => '是否公开参数错误',
|
||||
'disable_edit.in' => '禁用修改参数错误'
|
||||
'disable_edit.in' => '禁用修改参数错误',
|
||||
'report_id.require' => '报告ID不能为空',
|
||||
'report_id.number' => '报告ID必须为数字',
|
||||
'report_id.gt' => '报告ID必须大于0',
|
||||
'content.require' => '报告内容不能为空',
|
||||
'content.max' => '报告内容最多12000个字符',
|
||||
'limit.integer' => '数量限制必须为整数',
|
||||
'limit.between' => '数量限制必须在1到500之间'
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -63,4 +73,36 @@ class PrescriptionLibraryValidate extends BaseValidate
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 读取已保存的处方 AI 解释
|
||||
*/
|
||||
public function sceneAiReports()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 查询尚无任何 AI 报告的处方
|
||||
*/
|
||||
public function sceneMissingAiReports()
|
||||
{
|
||||
return $this->only(['limit']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 重新生成全部固定模型的处方 AI 解释
|
||||
*/
|
||||
public function sceneGenerateAiReports()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 编辑一份已保存的处方 AI 解释
|
||||
*/
|
||||
public function sceneEditAiReport()
|
||||
{
|
||||
return $this->only(['id', 'report_id', 'content']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user