argos/annotation-service/annotation/src/main/java/gr/cite/annotation/data/AnnotationEntity.java

189 lines
4.4 KiB
Java

package gr.cite.annotation.data;
import gr.cite.annotation.common.enums.AnnotationProtectionType;
import gr.cite.annotation.common.enums.IsActive;
import gr.cite.annotation.data.conventers.AnnotationProtectionTypeConverter;
import gr.cite.annotation.data.conventers.IsActiveConverter;
import jakarta.persistence.*;
import java.time.Instant;
import java.util.UUID;
@Entity
@Table(name = "\"Annotation\"")
public class AnnotationEntity {
@Id
@Column(name = "id", columnDefinition = "uuid", updatable = false, nullable = false)
private UUID id;
public static final String _id = "id";
@Id
@Column(name = "entity_id", columnDefinition = "uuid", nullable = false)
private UUID entityId;
public static final String _entityId = "entityId";
@Column(name = "entity_type", nullable = false)
private String entityType;
public static final String _entityType = "entityType";
@Column(name = "anchor")
private String anchor;
public static final String _anchor = "anchor";
@Column(name = "payload", nullable = false)
private String payload;
public static final String _payload = "payload";
@Column(name = "subject_id", columnDefinition = "uuid", nullable = false)
private UUID subjectId;
public static final String _subjectId = "subjectId";
@Column(name = "thread_id", columnDefinition = "uuid", nullable = false)
private UUID threadId;
public static final String _threadId = "threadId";
@Column(name = "parent_id", columnDefinition = "uuid")
private UUID parentId;
public static final String _parentId = "parentId";
@Column(name = "protection_type", nullable = false)
@Convert(converter = AnnotationProtectionTypeConverter.class)
private AnnotationProtectionType protectionType;
public static final String _protectionType = "protectionType";
@Column(name = "time_stamp", nullable = false)
private Instant timeStamp;
public static final String _timeStamp = "timeStamp";
@Column(name = "\"created_at\"", nullable = false)
private Instant createdAt;
public static final String _createdAt = "createdAt";
@Column(name = "\"updated_at\"", nullable = false)
private Instant updatedAt;
public static final String _updatedAt = "updatedAt";
@Column(name = "is_active", nullable = false)
@Convert(converter = IsActiveConverter.class)
private IsActive isActive;
public static final String _isActive = "isActive";
public UUID getId() {
return id;
}
public void setId(UUID id) {
this.id = id;
}
public UUID getEntityId() {
return entityId;
}
public void setEntityId(UUID entityId) {
this.entityId = entityId;
}
public String getEntityType() {
return entityType;
}
public void setEntityType(String entityType) {
this.entityType = entityType;
}
public String getAnchor() {
return anchor;
}
public void setAnchor(String anchor) {
this.anchor = anchor;
}
public String getPayload() {
return payload;
}
public void setPayload(String payload) {
this.payload = payload;
}
public UUID getSubjectId() {
return subjectId;
}
public void setSubjectId(UUID subjectId) {
this.subjectId = subjectId;
}
public UUID getThreadId() {
return threadId;
}
public void setThreadId(UUID threadId) {
this.threadId = threadId;
}
public UUID getParentId() {
return parentId;
}
public void setParentId(UUID parentId) {
this.parentId = parentId;
}
public Instant getTimeStamp() {
return timeStamp;
}
public void setTimeStamp(Instant timeStamp) {
this.timeStamp = timeStamp;
}
public AnnotationProtectionType getProtectionType() {
return protectionType;
}
public void setProtectionType(AnnotationProtectionType protectionType) {
this.protectionType = protectionType;
}
public Instant getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Instant createdAt) {
this.createdAt = createdAt;
}
public Instant getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Instant updatedAt) {
this.updatedAt = updatedAt;
}
public IsActive getIsActive() {
return isActive;
}
public void setIsActive(IsActive isActive) {
this.isActive = isActive;
}
}