178 lines
4.4 KiB
Java
178 lines
4.4 KiB
Java
package eu.eudat.data;
|
|
|
|
import eu.eudat.commons.enums.ReferenceType;
|
|
import eu.eudat.commons.enums.IsActive;
|
|
import eu.eudat.commons.enums.ReferenceSourceType;
|
|
import eu.eudat.data.converters.enums.ReferenceSourceTypeConverter;
|
|
import eu.eudat.data.converters.enums.ReferenceTypeConverter;
|
|
import eu.eudat.data.converters.enums.IsActiveConverter;
|
|
import jakarta.persistence.*;
|
|
|
|
import java.time.Instant;
|
|
import java.util.UUID;
|
|
|
|
@Entity
|
|
@Table(name = "\"Reference\"")
|
|
public class ReferenceEntity {
|
|
|
|
@Id
|
|
@Column(name = "id", columnDefinition = "uuid", updatable = false, nullable = false)
|
|
private UUID id;
|
|
public static final String _id = "id";
|
|
|
|
@Column(name = "label", length = 500, nullable = false)
|
|
private String label;
|
|
public static final String _label = "label";
|
|
|
|
@Column(name = "type", nullable = false)
|
|
@Convert(converter = ReferenceTypeConverter.class)
|
|
private ReferenceType type;
|
|
public static final String _type = "type";
|
|
|
|
@Column(name = "description")
|
|
private String description;
|
|
public static final String _description = "description";
|
|
|
|
@Column(name = "definition")
|
|
private String definition;
|
|
public static final String _definition = "definition";
|
|
|
|
@Column(name = "reference", length = 1024, nullable = false)
|
|
private String reference;
|
|
public static final String _reference = "reference";
|
|
|
|
@Column(name = "abbreviation", length = 50)
|
|
private String abbreviation;
|
|
public static final String _abbreviation = "abbreviation";
|
|
|
|
@Column(name = "source", length = 1024)
|
|
private String source;
|
|
public static final String _source = "source";
|
|
|
|
@Column(name = "source_type", nullable = false)
|
|
@Convert(converter = ReferenceSourceTypeConverter.class)
|
|
private ReferenceSourceType sourceType;
|
|
public static final String _sourceType = "sourceType";
|
|
|
|
@Column(name = "is_active", nullable = false)
|
|
@Convert(converter = IsActiveConverter.class)
|
|
private IsActive isActive;
|
|
public static final String _isActive = "isActive";
|
|
|
|
@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 = "created_by", columnDefinition = "uuid")
|
|
private UUID createdBy;
|
|
public static final String _createdBy = "createdBy";
|
|
|
|
public UUID getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(UUID id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public String getLabel() {
|
|
return label;
|
|
}
|
|
|
|
public void setLabel(String label) {
|
|
this.label = label;
|
|
}
|
|
|
|
public ReferenceType getType() {
|
|
return type;
|
|
}
|
|
|
|
public void setType(ReferenceType type) {
|
|
this.type = type;
|
|
}
|
|
|
|
public String getDescription() {
|
|
return description;
|
|
}
|
|
|
|
public void setDescription(String description) {
|
|
this.description = description;
|
|
}
|
|
|
|
public String getDefinition() {
|
|
return definition;
|
|
}
|
|
|
|
public void setDefinition(String definition) {
|
|
this.definition = definition;
|
|
}
|
|
|
|
public String getReference() {
|
|
return reference;
|
|
}
|
|
|
|
public void setReference(String reference) {
|
|
this.reference = reference;
|
|
}
|
|
|
|
public String getAbbreviation() {
|
|
return abbreviation;
|
|
}
|
|
|
|
public void setAbbreviation(String abbreviation) {
|
|
this.abbreviation = abbreviation;
|
|
}
|
|
|
|
public String getSource() {
|
|
return source;
|
|
}
|
|
|
|
public void setSource(String source) {
|
|
this.source = source;
|
|
}
|
|
|
|
public ReferenceSourceType getSourceType() {
|
|
return sourceType;
|
|
}
|
|
|
|
public void setSourceType(ReferenceSourceType referenceSourceType) {
|
|
this.sourceType = referenceSourceType;
|
|
}
|
|
|
|
public IsActive getIsActive() {
|
|
return isActive;
|
|
}
|
|
|
|
public void setIsActive(IsActive isActive) {
|
|
this.isActive = isActive;
|
|
}
|
|
|
|
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 UUID getCreatedBy() {
|
|
return createdBy;
|
|
}
|
|
|
|
public void setCreatedBy(UUID createdBy) {
|
|
this.createdBy = createdBy;
|
|
}
|
|
}
|