feat(region): Create region with countries (#6372)

This commit is contained in:
Oli Juhl
2024-02-14 12:48:43 +01:00
committed by GitHub
parent 0c2a460751
commit 7ce15916ca
5 changed files with 154 additions and 8 deletions

View File

@@ -30,13 +30,15 @@ export default class Country {
@Property({ columnType: "text" })
display_name: string
@Property({ columnType: "text", nullable: true })
region_id?: string | null = null
@ManyToOne({
entity: () => Region,
fieldName: "region_id",
index: "IDX_country_region_id",
nullable: true,
})
region: Region | null = null
region?: Region | null
@BeforeCreate()
onCreate() {