generated from hmcts/spring-boot-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fa3144e
commit 2fab713
Showing
7 changed files
with
208 additions
and
0 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
src/main/java/uk/gov/hmcts/opal/entity/ApplicationFunctionsEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package uk.gov.hmcts.opal.entity; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.SequenceGenerator; | ||
import jakarta.persistence.Table; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@Table(name = "application_functions") | ||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class ApplicationFunctionsEntity { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "application_function_id_seq_generator") | ||
@SequenceGenerator(name = "application_function_id_seq_generator", sequenceName = "application_function_id_seq", | ||
allocationSize = 1) | ||
@Column(name = "application_function_id") | ||
private Long applicationFunctionId; | ||
|
||
@Column(name = "function_name", length = 200) | ||
private String functionName; | ||
|
||
} |
30 changes: 30 additions & 0 deletions
30
src/main/java/uk/gov/hmcts/opal/entity/BusinessUnitUserEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package uk.gov.hmcts.opal.entity; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.Table; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@Table(name = "business_unit_users") | ||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class BusinessUnitUserEntity { | ||
|
||
@Id | ||
@Column(name = "business_unit_user_id", length = 6) | ||
private String businessUnitUserId; | ||
|
||
@Column(name = "business_unit_id") | ||
private Short businessUnitId; | ||
|
||
@Column(name = "user_id", length = 100) | ||
private String userId; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/main/java/uk/gov/hmcts/opal/entity/TemplateEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package uk.gov.hmcts.opal.entity; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.SequenceGenerator; | ||
import jakarta.persistence.Table; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@Table(name = "templates") | ||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class TemplateEntity { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "template_id_seq_generator") | ||
@SequenceGenerator(name = "template_id_seq_generator", sequenceName = "template_id_seq", allocationSize = 1) | ||
@Column(name = "template_id") | ||
private Long templateId; | ||
|
||
@Column(name = "template_name", length = 100) | ||
private String templateName; | ||
|
||
} |
42 changes: 42 additions & 0 deletions
42
src/main/java/uk/gov/hmcts/opal/entity/TemplateMappingEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package uk.gov.hmcts.opal.entity; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.IdClass; | ||
import jakarta.persistence.Table; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.io.Serializable; | ||
|
||
@Entity | ||
@IdClass(TemplateMappingEntity.MappingId.class) | ||
@Table(name = "template_mappings") | ||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class TemplateMappingEntity { | ||
|
||
@Id | ||
@Column(name = "template_id") | ||
private Long templateId; | ||
|
||
@Id | ||
@Column(name = "application_function_id") | ||
private Long applicationFunctionId; | ||
|
||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public static class MappingId implements Serializable { | ||
|
||
public Long templateId; | ||
|
||
public Long applicationFunctionId; | ||
} | ||
|
||
} |
35 changes: 35 additions & 0 deletions
35
src/main/java/uk/gov/hmcts/opal/entity/UserEntitlementEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package uk.gov.hmcts.opal.entity; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.SequenceGenerator; | ||
import jakarta.persistence.Table; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@Table(name = "user_entitlements") | ||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class UserEntitlementEntity { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "user_entitlement_id_seq_generator") | ||
@SequenceGenerator(name = "user_entitlement_id_seq_generator", sequenceName = "user_entitlement_id_seq", | ||
allocationSize = 1) | ||
@Column(name = "user_entitlement_id") | ||
private Long userEntitlementId; | ||
|
||
@Column(name = "business_unit_user_id", length = 6) | ||
private String businessUnitUserId; | ||
|
||
@Column(name = "application_function_id") | ||
private Long applicationFunctionId; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package uk.gov.hmcts.opal.entity; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.Table; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@Table(name = "users") | ||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class UserEntity { | ||
|
||
@Id | ||
@Column(name = "user_id", length = 100) | ||
private String userId; | ||
|
||
@Column(name = "username", length = 100) | ||
private String username; | ||
|
||
@Column(name = "password", length = 1000) | ||
private String password; | ||
|
||
@Column(name = "description", length = 100) | ||
private String description; | ||
|
||
} |