113 lines
2.3 KiB
Java
113 lines
2.3 KiB
Java
package com.kaidi.oa.domain;
|
||
|
||
import jakarta.persistence.Column;
|
||
import jakarta.persistence.Entity;
|
||
import jakarta.persistence.GeneratedValue;
|
||
import jakarta.persistence.GenerationType;
|
||
import jakarta.persistence.Id;
|
||
import jakarta.persistence.Table;
|
||
|
||
import java.time.Instant;
|
||
|
||
/** A discussion topic. */
|
||
@Entity
|
||
@Table(name = "discussion")
|
||
public class Discussion {
|
||
|
||
@Id
|
||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||
private Long id;
|
||
|
||
private String title;
|
||
|
||
private String author;
|
||
|
||
/** 稳定作者 id(SysUser.id):对象级授权按此比对,根治改名重用冒充。author 仅作展示。 */
|
||
private Long authorId;
|
||
|
||
private String category;
|
||
|
||
@Column(columnDefinition = "TEXT")
|
||
private String content;
|
||
|
||
private int replyCount;
|
||
|
||
private Instant createdAt;
|
||
|
||
/** 回帖列表 JSON 数组:[{author, content, createdAt}]。 */
|
||
@Column(columnDefinition = "TEXT")
|
||
private String repliesJson;
|
||
|
||
public Long getId() {
|
||
return id;
|
||
}
|
||
|
||
public void setId(Long id) {
|
||
this.id = id;
|
||
}
|
||
|
||
public String getTitle() {
|
||
return title;
|
||
}
|
||
|
||
public void setTitle(String title) {
|
||
this.title = title;
|
||
}
|
||
|
||
public String getAuthor() {
|
||
return author;
|
||
}
|
||
|
||
public void setAuthor(String author) {
|
||
this.author = author;
|
||
}
|
||
|
||
public Long getAuthorId() {
|
||
return authorId;
|
||
}
|
||
|
||
public void setAuthorId(Long authorId) {
|
||
this.authorId = authorId;
|
||
}
|
||
|
||
public String getCategory() {
|
||
return category;
|
||
}
|
||
|
||
public void setCategory(String category) {
|
||
this.category = category;
|
||
}
|
||
|
||
public String getContent() {
|
||
return content;
|
||
}
|
||
|
||
public void setContent(String content) {
|
||
this.content = content;
|
||
}
|
||
|
||
public int getReplyCount() {
|
||
return replyCount;
|
||
}
|
||
|
||
public void setReplyCount(int replyCount) {
|
||
this.replyCount = replyCount;
|
||
}
|
||
|
||
public Instant getCreatedAt() {
|
||
return createdAt;
|
||
}
|
||
|
||
public void setCreatedAt(Instant createdAt) {
|
||
this.createdAt = createdAt;
|
||
}
|
||
|
||
public String getRepliesJson() {
|
||
return repliesJson;
|
||
}
|
||
|
||
public void setRepliesJson(String repliesJson) {
|
||
this.repliesJson = repliesJson;
|
||
}
|
||
}
|