|
| 1 | +package ca.bc.gov.app.entity; |
| 2 | + |
| 3 | +import static ca.bc.gov.app.ApplicationConstants.ORACLE_ATTRIBUTE_SCHEMA; |
| 4 | + |
| 5 | +import jakarta.validation.constraints.NotNull; |
| 6 | +import jakarta.validation.constraints.Size; |
| 7 | +import java.time.LocalDate; |
| 8 | +import java.time.LocalDateTime; |
| 9 | +import lombok.AllArgsConstructor; |
| 10 | +import lombok.Builder; |
| 11 | +import lombok.Data; |
| 12 | +import lombok.NoArgsConstructor; |
| 13 | +import lombok.With; |
| 14 | +import org.springframework.data.annotation.Id; |
| 15 | +import org.springframework.data.relational.core.mapping.Column; |
| 16 | +import org.springframework.data.relational.core.mapping.Table; |
| 17 | + |
| 18 | +/** |
| 19 | + * Represents a record of the {@code THE.SCALE_SITE_CONTACT} table. |
| 20 | + * |
| 21 | + * <p>This table links a client contact to a scale site and is used by other systems (EMS, GAS2, |
| 22 | + * LEXIS, SCS) to reference client contacts. It is mainly used to check whether a client contact |
| 23 | + * is still in use before allowing it to be deleted.</p> |
| 24 | + */ |
| 25 | +@NoArgsConstructor |
| 26 | +@AllArgsConstructor |
| 27 | +@Data |
| 28 | +@Builder |
| 29 | +@With |
| 30 | +@Table(name = "SCALE_SITE_CONTACT", schema = ORACLE_ATTRIBUTE_SCHEMA) |
| 31 | +public class ScaleSiteContactEntity { |
| 32 | + |
| 33 | + @Id |
| 34 | + @Column("CLIENT_CONTACT_ID") |
| 35 | + private Long clientContactId; |
| 36 | + |
| 37 | + @Column("SCALE_SITE_ID_NMBR") |
| 38 | + @NotNull |
| 39 | + @Size(min = 1, max = 4) |
| 40 | + private String scaleSiteIdNumber; |
| 41 | + |
| 42 | + @Column("CONTACT_ROLE_DESCRIPTION") |
| 43 | + @NotNull |
| 44 | + @Size(min = 1, max = 40) |
| 45 | + private String contactRoleDescription; |
| 46 | + |
| 47 | + @Column("PRIMARY_CONTACT_IND") |
| 48 | + @NotNull |
| 49 | + @Size(min = 1, max = 1) |
| 50 | + private String primaryContactInd; |
| 51 | + |
| 52 | + @Column("SITE_INFORMATION_ACCESS_IND") |
| 53 | + @NotNull |
| 54 | + @Size(min = 1, max = 1) |
| 55 | + private String siteInformationAccessInd; |
| 56 | + |
| 57 | + @Column("EFFECTIVE_DATE") |
| 58 | + @NotNull |
| 59 | + private LocalDate effectiveDate; |
| 60 | + |
| 61 | + @Column("EXPIRY_DATE") |
| 62 | + private LocalDate expiryDate; |
| 63 | + |
| 64 | + @Column("ENTRY_TIMESTAMP") |
| 65 | + @NotNull |
| 66 | + private LocalDateTime createdAt; |
| 67 | + |
| 68 | + @Column("ENTRY_USERID") |
| 69 | + @NotNull |
| 70 | + @Size(min = 1, max = 30) |
| 71 | + private String createdBy; |
| 72 | + |
| 73 | + @Column("UPDATE_TIMESTAMP") |
| 74 | + @NotNull |
| 75 | + private LocalDateTime updatedAt; |
| 76 | + |
| 77 | + @Column("UPDATE_USERID") |
| 78 | + @NotNull |
| 79 | + @Size(min = 1, max = 30) |
| 80 | + private String updatedBy; |
| 81 | + |
| 82 | + @Column("REVISION_COUNT") |
| 83 | + @NotNull |
| 84 | + private Long revision; |
| 85 | + |
| 86 | +} |
0 commit comments