141 lines
3.7 KiB
Java
141 lines
3.7 KiB
Java
package gr.cite.notification.data;
|
|
|
|
import gr.cite.notification.common.enums.IsActive;
|
|
import gr.cite.notification.common.enums.NotificationTemplateChannel;
|
|
import gr.cite.notification.common.enums.NotificationTemplateKind;
|
|
import gr.cite.notification.data.conventers.IsActiveConverter;
|
|
import gr.cite.notification.data.conventers.NotificationTemplateChannelConverter;
|
|
import gr.cite.notification.data.conventers.NotificationTemplateKindConverter;
|
|
import gr.cite.notification.data.tenant.TenantScopedBaseEntity;
|
|
import jakarta.persistence.*;
|
|
|
|
import java.time.Instant;
|
|
import java.util.UUID;
|
|
|
|
@Entity
|
|
@Table(name = "\"NotificationTemplate\"")
|
|
public class NotificationTemplateEntity extends TenantScopedBaseEntity {
|
|
|
|
@Id
|
|
@Column(name = "\"id\"", columnDefinition = "uuid", updatable = false, nullable = false)
|
|
private UUID id;
|
|
|
|
public static final String _id = "id";
|
|
|
|
@Column(name = "\"channel\"", nullable = false)
|
|
@Convert(converter = NotificationTemplateChannelConverter.class)
|
|
private NotificationTemplateChannel channel;
|
|
|
|
public static final String _channel = "channel";
|
|
|
|
@Column(name = "\"notification_type\"", columnDefinition = "uuid", nullable = false)
|
|
private UUID notificationType;
|
|
|
|
public static final String _notificationType = "notificationType";
|
|
|
|
@Column(name = "\"kind\"", nullable = false)
|
|
@Convert(converter = NotificationTemplateKindConverter.class)
|
|
private NotificationTemplateKind kind;
|
|
|
|
public static final String _kind = "kind";
|
|
|
|
@Column(name = "\"language_code\"", nullable = false, length = 200)
|
|
private String languageCode;
|
|
|
|
public static final String _languageCode = "languageCode";
|
|
|
|
@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 getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(UUID id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public NotificationTemplateChannel getChannel() {
|
|
return channel;
|
|
}
|
|
|
|
public void setChannel(NotificationTemplateChannel channel) {
|
|
this.channel = channel;
|
|
}
|
|
|
|
public UUID getNotificationType() {
|
|
return notificationType;
|
|
}
|
|
|
|
public void setNotificationType(UUID notificationType) {
|
|
this.notificationType = notificationType;
|
|
}
|
|
|
|
public NotificationTemplateKind getKind() {
|
|
return kind;
|
|
}
|
|
|
|
public void setKind(NotificationTemplateKind kind) {
|
|
this.kind = kind;
|
|
}
|
|
|
|
public String getLanguageCode() {
|
|
return languageCode;
|
|
}
|
|
|
|
public void setLanguageCode(String languageCode) {
|
|
this.languageCode = languageCode;
|
|
}
|
|
|
|
public String getValue() {
|
|
return value;
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
}
|