Chats.java 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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",comment = "聊天会话")
  11. public class Chats implements Serializable {
  12. @Id()
  13. @GeneratedValue(strategy = GenerationType.IDENTITY)
  14. @Column(columnDefinition = "bigInt(20) comment '会话id'")
  15. private Long chatId;
  16. @Column(columnDefinition = "varchar(255) comment '创建时间'")
  17. private String createTime;
  18. /**用户信息*/
  19. @Column(columnDefinition = "bigInt(20) comment '用户id'")
  20. private Long userId;
  21. @Column(columnDefinition = "varchar(255) comment '用户头像'")
  22. private String userHead;
  23. @Column(columnDefinition = "varchar(255) comment '用户昵称'")
  24. private String userName;
  25. /**商户信息*/
  26. @Column(columnDefinition = "bigInt(20) comment '总后台id(总后台传0'")
  27. private Long storeId;
  28. @Column(columnDefinition = "varchar(255) comment '后台头像'")
  29. private String storeHead;
  30. @Column(columnDefinition = "varchar(255) comment '商户昵称'")
  31. private String storeName;
  32. /**聊天内容*/
  33. @Column(columnDefinition = "int default 0 comment'用户未读条数'")
  34. private Integer userCount;
  35. @Column(columnDefinition = "int default 0 comment'后台未读条数'")
  36. private Integer storeCount;
  37. @Column
  38. private Integer isShop;
  39. @Transient
  40. private String content; //聊天内容
  41. @Transient
  42. private String contentTime; //消息时间
  43. @Transient
  44. private String phone; //手机号
  45. @Transient
  46. private Integer userType; //用户类型 1用户 2骑手
  47. }