This commit is contained in:
Your Name
2026-07-08 14:46:39 +08:00
parent 7f93cf5480
commit 4d6125268a
288 changed files with 718 additions and 292 deletions
@@ -89,6 +89,7 @@ class PrescriptionOrderValidate extends BaseValidate
'submitGancaoRecipel' => ['id'],
'previewGancaoRecipel' => ['id'],
'patchPrescriptionPatient' => ['id', 'patient_name', 'phone'],
'patchPrescriptionUsage' => ['id', 'times_per_day', 'usage_days', 'medication_days', 'aux_times_per_day', 'aux_usage_days'],
'updateAmount' => ['id', 'amount'],
'setShipMode' => ['id', 'ship_mode'],
];
@@ -99,4 +100,15 @@ class PrescriptionOrderValidate extends BaseValidate
->append('id', 'require|integer|gt:0')
->append('amount', 'require|float|egt:0');
}
public function patchPrescriptionUsage(): PrescriptionOrderValidate
{
return $this->only(['id', 'times_per_day', 'usage_days', 'medication_days', 'aux_times_per_day', 'aux_usage_days'])
->append('id', 'require|integer|gt:0')
->append('times_per_day', 'require|integer|between:1,6')
->append('usage_days', 'require|integer|between:1,999')
->append('medication_days', 'require|integer|between:1,999')
->append('aux_times_per_day', 'integer|between:1,6')
->append('aux_usage_days', 'integer|between:1,999');
}
}