128 lines
2.7 KiB
Java
128 lines
2.7 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 collaborative document. participants holds the participant names as a
|
||
* comma-separated string. status is one of 编辑中 / 已定稿.
|
||
*/
|
||
@Entity
|
||
@Table(name = "collab_doc")
|
||
public class CollabDoc {
|
||
|
||
@Id
|
||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||
private Long id;
|
||
|
||
private String title;
|
||
|
||
private String owner;
|
||
|
||
/** 稳定属主 id(SysUser.id):对象级授权按此比对,根治改名重用冒充。owner 仅作展示。 */
|
||
private Long ownerId;
|
||
|
||
private String participants;
|
||
|
||
private String status;
|
||
|
||
@Column(columnDefinition = "TEXT")
|
||
private String content;
|
||
|
||
private Instant updatedAt;
|
||
|
||
/** 历史版本 JSON 数组:[{version, content, savedAt, editor}]。每次更新正文前追加上一版。 */
|
||
@Column(columnDefinition = "TEXT")
|
||
private String versionsJson;
|
||
|
||
/** 评论/批注 JSON 数组:[{author, content, createdAt}]。 */
|
||
@Column(columnDefinition = "TEXT")
|
||
private String commentsJson;
|
||
|
||
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 getOwner() {
|
||
return owner;
|
||
}
|
||
|
||
public void setOwner(String owner) {
|
||
this.owner = owner;
|
||
}
|
||
|
||
public Long getOwnerId() {
|
||
return ownerId;
|
||
}
|
||
|
||
public void setOwnerId(Long ownerId) {
|
||
this.ownerId = ownerId;
|
||
}
|
||
|
||
public String getParticipants() {
|
||
return participants;
|
||
}
|
||
|
||
public void setParticipants(String participants) {
|
||
this.participants = participants;
|
||
}
|
||
|
||
public String getStatus() {
|
||
return status;
|
||
}
|
||
|
||
public void setStatus(String status) {
|
||
this.status = status;
|
||
}
|
||
|
||
public String getContent() {
|
||
return content;
|
||
}
|
||
|
||
public void setContent(String content) {
|
||
this.content = content;
|
||
}
|
||
|
||
public Instant getUpdatedAt() {
|
||
return updatedAt;
|
||
}
|
||
|
||
public void setUpdatedAt(Instant updatedAt) {
|
||
this.updatedAt = updatedAt;
|
||
}
|
||
|
||
public String getVersionsJson() {
|
||
return versionsJson;
|
||
}
|
||
|
||
public void setVersionsJson(String versionsJson) {
|
||
this.versionsJson = versionsJson;
|
||
}
|
||
|
||
public String getCommentsJson() {
|
||
return commentsJson;
|
||
}
|
||
|
||
public void setCommentsJson(String commentsJson) {
|
||
this.commentsJson = commentsJson;
|
||
}
|
||
}
|