Commit 2b4b81b3 authored by Siiri's avatar Siiri
Browse files

TEIS-2185: added new entities: OfficialInSequenceEntity and OfficialsSequenceEntity.

parent a01d1edc
......@@ -2,19 +2,19 @@ package ee.sm.ti.teis.officials.officialssequence;
import ee.sm.ti.teis.servicecommon.common.AuditedEntity;
import ee.sm.ti.teis.types.enums.ObjectStatus;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.*;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.*;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.UUID;
@Entity
@Getter
@Setter
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Table(name = "official_in_sequence")
public class OfficialInSequenceEntity extends AuditedEntity {
......@@ -24,11 +24,11 @@ public class OfficialInSequenceEntity extends AuditedEntity {
@GenericGenerator(name = "UUID", strategy = "org.hibernate.id.UUIDGenerator")
@Column(name = "id", updatable = false, nullable = false)
private UUID id;
@NotBlank
@NotNull
private UUID officialUserId;
@NotBlank
@NotNull
private UUID officialsSequenceId;
@NotBlank
@NotNull
private Boolean active;
@Enumerated(EnumType.STRING)
@Builder.Default
......
......@@ -2,19 +2,20 @@ package ee.sm.ti.teis.officials.officialssequence;
import ee.sm.ti.teis.servicecommon.common.AuditedEntity;
import ee.sm.ti.teis.types.enums.ObjectStatus;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.*;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.*;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.UUID;
@Entity
@Getter
@Setter
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Table(name = "officials_sequence")
public class OfficialsSequenceEntity extends AuditedEntity {
......@@ -28,7 +29,7 @@ public class OfficialsSequenceEntity extends AuditedEntity {
private String code;
@NotBlank
private String title;
@NotBlank
@NotNull
private UUID lastSelectedOfficialId;
@Enumerated(EnumType.STRING)
@Builder.Default
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment