Skip to content

Commit

Permalink
PI-1878: Use circumstance sub type (#3428)
Browse files Browse the repository at this point in the history
* PI-1878: Use circumstance sub type
  • Loading branch information
pmcphee77 authored Mar 5, 2024
1 parent e48d010 commit 4172713
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,17 @@ object PersonGenerator {
IdGenerator.getAndIncrement(),
id,
ReferenceData(IdGenerator.getAndIncrement(), "E01", "Employment"),
ReferenceData(IdGenerator.getAndIncrement(), "FT01", "Full-time employed (30 or more hours per week)"),
PersonalCircumstanceSubType(
IdGenerator.getAndIncrement(),
"Full-time employed (30 or more hours per week"
),
LocalDate.now()
),
PersonalCircumstance(
IdGenerator.getAndIncrement(),
id,
ReferenceData(IdGenerator.getAndIncrement(), "A02", "Accommodation"),
ReferenceData(IdGenerator.getAndIncrement(), "FM01", "Friends/Family (settled)"),
PersonalCircumstanceSubType(IdGenerator.getAndIncrement(), "Friends/Family (settled)"),
LocalDate.now()
)
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class PersonalCircumstance(
@ManyToOne
@Fetch(FetchMode.JOIN)
@JoinColumn(name = "circumstance_sub_type_id")
val subType: ReferenceData,
val subType: PersonalCircumstanceSubType,

val startDate: LocalDate,

Expand All @@ -39,3 +39,14 @@ class PersonalCircumstance(

)

@Immutable
@Entity
@Table(name = "r_circumstance_sub_type")
class PersonalCircumstanceSubType(
@Id
@Column(name = "circumstance_sub_type_id")
val id: Long,

@Column(name = "code_description")
val description: String,
)

0 comments on commit 4172713

Please sign in to comment.