BookSchedulingValidate.php 922 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace app\admin\validate\life;
  3. use think\Validate;
  4. class BookSchedulingValidate extends Validate
  5. {
  6. protected $rule = [
  7. 'scheduling_book_id' => 'require',
  8. 'scheduling_id' => 'require',
  9. 'scheduling_start_time' => 'require',
  10. 'scheduling_end_time' => 'require',
  11. ];
  12. protected $message = [
  13. 'scheduling_id.require' => '课程排期ID不能为空',
  14. 'scheduling_book_id.require' => '课程ID名称不能为空',
  15. 'scheduling_start_time.require' => '开始时间不能为空',
  16. 'scheduling_end_time.require' => '结束时间不能为空',
  17. ];
  18. //场景
  19. protected $scene = [
  20. 'create' => ['scheduling_book_id','scheduling_start_time','scheduling_end_time'],
  21. 'update' => ['scheduling_id','scheduling_book_id','scheduling_start_time','scheduling_end_time'],
  22. 'info' => ['scheduling_id']
  23. ];
  24. }