Closed github-actions[bot] closed 1 month ago
Although I could use the countryCode, I would not have its id to link into. So, I should insert the area if it doesn't exist, and a link between the artist and area. Even better if I reuse artists_by_entity
when we insert the artist's area, it does not have a type
"area": {
"iso-3166-1-codes": ["JP"],
"name": "Japan",
"type": null,
"id": "2db42837-c832-3c27-b4a3-08198f75693c",
"disambiguation": "",
"sort-name": "Japan",
"type-id": null
},
begin-area, area, end-area can all be different. do we need a linking table area_artist?
area can go in artists_by_entity
an artist's area can have iso-3166-2-codes
, so it's not just countries
"area": {
"name": "England",
"iso-3166-2-codes": ["GB-ENG"],
"type-id": null,
"sort-name": "England",
"type": null,
"id": "9d5dd675-3cf4-4296-9e39-67865ebee758",
"disambiguation": ""
},
countryCode?.ifNotNullOrEmpty {
TextWithHeadingRes(headingRes \= strings.area, text \= it.toFlagEmoji())
}
https://github.com/lydavid/MusicSearch/blob/97c5fb8b0bd647bcd0e6edb768d2ef906e0b8a87/shared/feature/details/src/commonMain/kotlin/ly/david/musicsearch/shared/feature/details/artist/ArtistDetailsUi.kt#L102