答案
| 16 | * |
| 17 | */ |
| 18 | @Getter |
| 19 | @Setter |
| 20 | @Entity |
| 21 | @Table(name="answer",indexes = {@Index(name="answer_1_idx", columnList="questionId,status,adoption"),@Index(name="answer_2_idx", columnList="userName,isStaff")}) |
| 22 | public class Answer implements Serializable{ |
| 23 | @Serial |
| 24 | private static final long serialVersionUID = -7929411590314542710L; |
| 25 | /** Id **/ |
| 26 | @Id @GeneratedValue(strategy = GenerationType.IDENTITY) |
| 27 | private Long id; |
| 28 | /** 是否是员工 true:员工 false:会员 **/ |
| 29 | private Boolean isStaff = false; |
| 30 | /** 用户名称 **/ |
| 31 | @Column(length=30) |
| 32 | private String userName; |
| 33 | /** 账号 **/ |
| 34 | @Transient |
| 35 | private String account; |
| 36 | /** 呢称 **/ |
| 37 | @Transient |
| 38 | private String nickname; |
| 39 | /** 头像路径 **/ |
| 40 | @Transient |
| 41 | private String avatarPath; |
| 42 | /** 头像名称 **/ |
| 43 | @Transient |
| 44 | private String avatarName; |
| 45 | /** 用户信息状态 -30.账号已注销(不显示数据) -20.账号已逻辑删除(不显示数据) -10.账号已禁用(不显示数据) 0.正常 10.账号已禁用(显示数据) 20.账号已逻辑删除(显示数据) **/ |
| 46 | @Transient |
| 47 | private Integer userInfoStatus = 0; |
| 48 | |
| 49 | /** IP **/ |
| 50 | @Column(length=45) |
| 51 | private String ip; |
| 52 | /** IP归属地 **/ |
| 53 | @Transient |
| 54 | private String ipAddress; |
| 55 | /** 问题Id **/ |
| 56 | private Long questionId; |
| 57 | /** 问题标题 **/ |
| 58 | @Transient |
| 59 | private String questionTitle; |
| 60 | /** 状态 10.待审核 20.已发布 110.待审核用户删除 120.已发布用户删除 100010.待审核员工删除 100020.已发布员工删除 **/ |
| 61 | private Integer status = 10; |
| 62 | /** 答案是否采纳 **/ |
| 63 | private Boolean adoption = false; |
| 64 | |
| 65 | /** 答案内容 **/ |
| 66 | @Lob |
| 67 | private String content; |
| 68 | /** 是否使用Markdown **/ |
| 69 | private Boolean isMarkdown; |
| 70 | /** Markdown内容 **/ |
| 71 | @Lob |
| 72 | private String markdownContent; |
| 73 | /** 回答时间 **/ |
| 74 | @Column(columnDefinition = "DATETIME") |
| 75 | private LocalDateTime postTime = LocalDateTime.now(); |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…