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

126 lines
2.8 KiB
Java

package gr.cite.annotation.data;
import gr.cite.annotation.common.enums.ContactInfoType;
import gr.cite.annotation.common.enums.IsActive;
import gr.cite.annotation.data.conventers.ContactInfoTypeConverter;
import gr.cite.annotation.data.conventers.IsActiveConverter;
import gr.cite.annotation.data.tenant.TenantScopedBaseEntity;
import jakarta.persistence.*;
import java.time.Instant;
import java.util.UUID;
@Entity
@Table(name = "\"UserContactInfo\"")
public class UserContactInfoEntity {
@Id
@Column(name = "id", columnDefinition = "uuid", updatable = false, nullable = false)
private UUID id;
public static final String _id = "id";
@Column(name = "\"user\"", nullable = false)
private UUID userId;
public static final String _userId = "userId";
@Column(name = "\"ordinal\"", nullable = false)
private Integer ordinal;
public static final String _ordinal = "ordinal";
@Column(name = "type", length = 100, nullable = false)
@Convert(converter = ContactInfoTypeConverter.class)
private ContactInfoType type;
public static final String _type = "type";
@Column(name = "value", nullable = false)
private String value;
public static final String _value = "value";
@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 getUserId() {
return userId;
}
public void setUserId(UUID userId) {
this.userId = userId;
}
public ContactInfoType getType() {
return type;
}
public void setType(ContactInfoType type) {
this.type = type;
}
public String getValue() {
return value;
}
public UUID getId() {
return id;
}
public void setId(UUID id) {
this.id = id;
}
public Integer getOrdinal() {
return ordinal;
}
public void setOrdinal(Integer ordinal) {
this.ordinal = ordinal;
}
public void setValue(String value) {
this.value = value;
}
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;
}
}