InstantMessage.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace app\common\validate;
  3. use think\Validate;
  4. /**
  5. * DSKMS多用户商城
  6. *
  7. * ----------------------------------------------------------------------------
  8. *
  9. * 验证器
  10. */
  11. class InstantMessage extends Validate
  12. {
  13. protected $rule = [
  14. 'instant_message_from_id' => 'require',
  15. 'instant_message_from_type' => 'require',
  16. 'instant_message_to_id' => 'require',
  17. 'instant_message_to_type' => 'require',
  18. 'instant_message_type' => 'require',
  19. 'instant_message' => 'require',
  20. ];
  21. protected $message = [
  22. 'instant_message_from_id.require' => '发送ID不能为空',
  23. 'instant_message_from_type.require' => '发送类型不能为空',
  24. 'instant_message_to_id.require' => '接收ID不能为空',
  25. 'instant_message_to_type.require' => '接收类型不能为空',
  26. 'instant_message_type.require' => '消息类型不能为空',
  27. 'instant_message.require' => '消息内容不能为空',
  28. ];
  29. protected $scene = [
  30. 'instant_message_save' => ['instant_message_from_id', 'instant_message_from_type', 'instant_message_to_id', 'instant_message_to_type', 'instant_message_type', 'instant_message'],
  31. ];
  32. }