87eef59007bb7b7725dfb85561879df162e3f7e9.svn-base 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. package org.jeecg.common.api.dto.message;
  2. import lombok.Data;
  3. import org.jeecg.common.constant.CommonConstant;
  4. import java.io.Serializable;
  5. /**
  6. * 普通消息
  7. */
  8. @Data
  9. public class MessageDTO implements Serializable {
  10. private static final long serialVersionUID = -5690444483968058442L;
  11. /**
  12. * 发送人(用户登录账户)
  13. */
  14. protected String fromUser;
  15. /**
  16. * 发送给(用户登录账户)
  17. */
  18. protected String toUser;
  19. /**
  20. * 发送给所有人
  21. */
  22. protected boolean toAll;
  23. /**
  24. * 消息主题
  25. */
  26. protected String title;
  27. /**
  28. * 消息内容
  29. */
  30. protected String content;
  31. /**
  32. * 消息类型 1:消息 2:系统消息
  33. */
  34. protected String category;
  35. public MessageDTO(){
  36. }
  37. /**
  38. * 构造器1 系统消息
  39. */
  40. public MessageDTO(String fromUser,String toUser,String title, String content){
  41. this.fromUser = fromUser;
  42. this.toUser = toUser;
  43. this.title = title;
  44. this.content = content;
  45. //默认 都是2系统消息
  46. this.category = CommonConstant.MSG_CATEGORY_2;
  47. }
  48. /**
  49. * 构造器2 支持设置category 1:消息 2:系统消息
  50. */
  51. public MessageDTO(String fromUser,String toUser,String title, String content, String category){
  52. this.fromUser = fromUser;
  53. this.toUser = toUser;
  54. this.title = title;
  55. this.content = content;
  56. this.category = category;
  57. }
  58. }