ChatsContent.java 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. package com.sqx.modules.chats.entity;
  2. import lombok.Data;
  3. import javax.persistence.*;
  4. import java.io.Serializable;
  5. /**
  6. * 聊天会话内容
  7. */
  8. @Data
  9. @Entity
  10. @org.hibernate.annotations.Table(appliesTo = "chats_content",comment = "聊天会话内容")
  11. public class ChatsContent implements Serializable {
  12. @Id()
  13. @GeneratedValue(strategy = GenerationType.IDENTITY)
  14. @Column(columnDefinition = "bigInt(20) comment '会话内容id'")
  15. private Long chatContentId;
  16. @Column(columnDefinition = "text comment '聊天内容'")
  17. private String content;
  18. @Column(columnDefinition = "int(1) comment '类型(1文字 2图片 3订单 4商品)'")
  19. private Integer type;
  20. @Column(columnDefinition = "int default 1 comment '是否已读(1未读 2已读)'")
  21. private Integer status;
  22. @Column(columnDefinition = "varchar(1) comment '是否撤回 0否 1是'")
  23. private String recall;
  24. @Column(columnDefinition = "varchar(255) comment '创建时间'")
  25. private String createTime;
  26. @Column(columnDefinition = "int(1) comment '消息来源(1用户消息 2后台消息)'")
  27. private Integer sendType;
  28. @Column(columnDefinition = "bigInt(20) comment '用户id'")
  29. private Long userId;
  30. @Column(columnDefinition = "bigInt(20) comment '管理端用户id'")
  31. private Long sysUserId;
  32. @Column(columnDefinition = "bigInt(20) comment '后台id(总后台传0)'")
  33. private Long storeId;
  34. /**会话信息*/
  35. @Column(columnDefinition = "bigInt(20) comment '会话id'")
  36. private Long chatId;
  37. @Transient
  38. private Chats chat; //聊天会话
  39. }