'require|number|gt:0', 'ids' => 'require|array', 'due_id' => 'require|number|gt:0', 'promised_date' => 'require|dateFormat:Y-m-d', 'reason' => 'require|in:lost,other', 'remark' => 'max:200', ]; protected $message = [ 'id.require' => '参数缺失', 'id.number' => '提醒 id 非法', 'id.gt' => '提醒 id 非法', 'due_id.require' => '参数缺失 due_id', 'due_id.number' => '提醒 id 非法', 'due_id.gt' => '提醒 id 非法', 'ids.require' => '请选择要延迟的提醒', 'ids.array' => '提醒 id 列表格式错误', 'promised_date.require' => '请选择患者承诺复诊日', 'promised_date.dateFormat' => '承诺复诊日格式应为 YYYY-MM-DD', 'reason.require' => '请选择关闭原因', 'reason.in' => '关闭原因只能是 lost 或 other', 'remark.require' => '请填写关闭说明', 'remark.max' => '说明不能超过 200 字', ]; public function sceneSnooze() { return $this->only(['id']); } public function sceneSnoozeAll() { return $this->only(['ids']); } public function sceneContact() { return $this->only(['id', 'promised_date', 'remark']); } public function sceneClose() { return $this->only(['id', 'reason', 'remark']) ->append('remark', 'require'); } public function sceneLogs() { return $this->only(['due_id']); } }