Skip to content

Commit

Permalink
added departments
Browse files Browse the repository at this point in the history
  • Loading branch information
Javarome committed Mar 1, 2024
1 parent c5911cd commit e613498
Show file tree
Hide file tree
Showing 21 changed files with 89 additions and 2 deletions.
2 changes: 2 additions & 0 deletions org/eu/fr/region/FranceDepartementCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export enum FranceDepartementCode {
HautesAlpes = "05",
AlpesMaritimes = "06",
Aude = "11",
BouchesDuRhone = "13",
Calvados = "14",
Charente = "16",
CharenteMaritime = "17",
Expand All @@ -21,6 +22,7 @@ export enum FranceDepartementCode {
Paris = "75",
Var = "83",
Vienne = "86",
Tarn = "81",
TarnEtGaronne = "82",
Vaucluse = "84",
HautsDeSeine = "92",
Expand Down
6 changes: 6 additions & 0 deletions org/eu/fr/region/occ/81/Tarn.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Department } from "../../../../../country/region/department/Department"
import { FranceDepartementCode } from "../../FranceDepartementCode"
import { Place } from "../../../../../../place/Place"
import { occitanie } from "../Occitanie"

export const tarn = new Department(FranceDepartementCode.Tarn, occitanie, Place.fromDMS(`43°49′N,2°12′E`))
6 changes: 6 additions & 0 deletions org/eu/fr/region/occ/81/TarnCities.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { City } from "../../../../../country/region/department/city/City"
import { albi } from "./albi/Albi"

export const tarnCities: City[] = [
albi
]
3 changes: 3 additions & 0 deletions org/eu/fr/region/occ/81/TarnCityCode.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export enum TarnCityCode {
Albi = 81004,
}
12 changes: 12 additions & 0 deletions org/eu/fr/region/occ/81/TarnMessages.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { DepartmentMessages } from "../../../../../country/region/department/DepartmentMessages"
import { TarnCityCode } from "./TarnCityCode"
import { albiMessages } from "./albi/AlbiMessages"
import { CityMessages } from "../../../../../country/region/department/city/CityMessages"

export type TarnCityList<T> = { [key in TarnCityCode]: T }

const tarnCityMessages: TarnCityList<CityMessages> = {
[TarnCityCode.Albi]: albiMessages
}

export const tarnMessages = new DepartmentMessages<TarnCityList<CityMessages>>("Tarn", tarnCityMessages)
5 changes: 5 additions & 0 deletions org/eu/fr/region/occ/81/albi/Albi.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { franceCity } from "../../../../FranceCity"
import { Place } from "../../../../../../../place/Place"
import { TarnCityCode } from "../TarnCityCode"

export const albi = franceCity(TarnCityCode.Albi, Place.fromDMS("43°55′44″N,2°08′47″E"))
3 changes: 3 additions & 0 deletions org/eu/fr/region/occ/81/albi/AlbiMessages.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { CityMessages } from "../../../../../../country/region/department/city/CityMessages"

export const albiMessages = new CityMessages("Albi")
2 changes: 2 additions & 0 deletions org/eu/fr/region/occ/OccitanieCities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ import { heraultCities } from "./34/HeraultCities"
import { tarnEtGaronneCities } from "./82/TarnEtGaronneCities"
import { hauteGaronneCities } from "./31/HauteGaronneCities"
import { audeCities } from "./11/AudeCities"
import { tarnCities } from "./81/TarnCities"

export const occitanieCities: City[] = [
...audeCities,
...gersCities,
...hauteGaronneCities,
...heraultCities,
...tarnCities,
...tarnEtGaronneCities
]
1 change: 1 addition & 0 deletions org/eu/fr/region/occ/OccitanieDepartementCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ export enum OccitanieDepartementCode {
Gers = FranceDepartementCode.Gers,
HauteGaronne = FranceDepartementCode.HauteGaronne,
Herault = FranceDepartementCode.Herault,
Tarn = FranceDepartementCode.Tarn,
TarnEtGaronne = FranceDepartementCode.TarnEtGaronne,
}
2 changes: 2 additions & 0 deletions org/eu/fr/region/occ/OccitanieDepartments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ import { herault } from "./34/Herault"
import { tarnEtGaronne } from "./82/TarnEtGaronne"
import { hauteGaronne } from "./31/HauteGaronne"
import { aude } from "./11/Aude"
import { tarn } from "./81/Tarn"

export const occitanieDepartments: Department[] = [
aude,
gers,
hauteGaronne,
herault,
tarn,
tarnEtGaronne
]
2 changes: 2 additions & 0 deletions org/eu/fr/region/occ/OccitanieDepartmentsMessages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { heraultMessages } from "./34/HeraultMessages"
import { tarnEtGaronneMessages } from "./82/TarnEtGaronneMessages"
import { hauteGaronneMessages } from "./31/HauteGaronneMessages"
import { audeMessages } from "./11/AudeMessages"
import { tarnMessages } from "./81/TarnMessages"

export type OccitanieDepartmentMessagesList = { [key in OccitanieDepartementCode]: DepartmentMessages }

Expand All @@ -13,5 +14,6 @@ export const occitanieDepartmentsMessages: OccitanieDepartmentMessagesList = {
[OccitanieDepartementCode.Gers]: gersMessages,
[OccitanieDepartementCode.HauteGaronne]: hauteGaronneMessages,
[OccitanieDepartementCode.Herault]: heraultMessages,
[OccitanieDepartementCode.Tarn]: tarnMessages,
[OccitanieDepartementCode.TarnEtGaronne]: tarnEtGaronneMessages
}
6 changes: 6 additions & 0 deletions org/eu/fr/region/pac/13/BouchesDuRhone.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Department } from "../../../../../country/region/department/Department"
import { Place } from "../../../../../../place/Place"
import { PacaDepartementCode } from "../PacaDepartementCode"
import { paca } from "../Paca"

export let bouchesDuRhone = new Department(PacaDepartementCode.BouchesDuRhone, paca, Place.fromDMS("43°30′N,5°10′E"))
6 changes: 6 additions & 0 deletions org/eu/fr/region/pac/13/BouchesDuRhoneCities.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { City } from "../../../../../country/region/department/city/City"
import { eyragues } from "./eyragues/Eyragues"

export const bouchesDuRhoneCities: City[] = [
eyragues
]
3 changes: 3 additions & 0 deletions org/eu/fr/region/pac/13/BouchesDuRhoneCityCode.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export enum BouchesDuRhoneCityCode {
Eyragues = 13036,
}
13 changes: 13 additions & 0 deletions org/eu/fr/region/pac/13/BouchesDuRhoneMessages.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { eyraguesMessages } from "./eyragues/EyraguesMessages"
import { BouchesDuRhoneCityCode } from "./BouchesDuRhoneCityCode"
import { CityMessages } from "../../../../../country/region/department/city/CityMessages"
import { DepartmentMessages } from "../../../../../country/region/department/DepartmentMessages"

export type BouchesDuRhoneCityList<T> = { [key in BouchesDuRhoneCityCode]: T }

export const bouchesDuRhoneCityMessages: BouchesDuRhoneCityList<CityMessages> = {
[BouchesDuRhoneCityCode.Eyragues]: eyraguesMessages
}

export const bouchesDuRhoneMessages = new DepartmentMessages<BouchesDuRhoneCityList<CityMessages>>("Bouches-du-Rhône",
bouchesDuRhoneCityMessages)
5 changes: 5 additions & 0 deletions org/eu/fr/region/pac/13/eyragues/Eyragues.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { franceCity } from "../../../../FranceCity"
import { Place } from "../../../../../../../place/Place"
import { BouchesDuRhoneCityCode } from "../BouchesDuRhoneCityCode"

export const eyragues = franceCity(BouchesDuRhoneCityCode.Eyragues, Place.fromDMS("43°50′31″N,4°50′30″E"))
3 changes: 3 additions & 0 deletions org/eu/fr/region/pac/13/eyragues/EyraguesMessages.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { CityMessages } from "../../../../../../country/region/department/city/CityMessages"

export const eyraguesMessages = new CityMessages("Eyragues")
2 changes: 2 additions & 0 deletions org/eu/fr/region/pac/PacaCities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ import { City } from "../../../../country/region/department/city/City"
import { vaucluseCities } from "./84/VaucluseCities"
import { alpesMaritimesCities } from "./06/AlpesMaritimesCities"
import { varCities } from "./83/VarCities"
import { bouchesDuRhoneCities } from "./13/BouchesDuRhoneCities"

export const pacaCities: City[] = [
...alpesMaritimesCities,
...bouchesDuRhoneCities,
...hautesAlpesCities,
...vaucluseCities,
...varCities
Expand Down
5 changes: 3 additions & 2 deletions org/eu/fr/region/pac/PacaDepartementCode.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { FranceDepartementCode } from "../FranceDepartementCode"

export enum PacaDepartementCode {
HautesAlpes = FranceDepartementCode.HautesAlpes,
Vaucluse = FranceDepartementCode.Vaucluse,
AlpesMaritimes = FranceDepartementCode.AlpesMaritimes,
BouchesDuRhone = FranceDepartementCode.BouchesDuRhone,
HautesAlpes = FranceDepartementCode.HautesAlpes,
Var = FranceDepartementCode.Var,
Vaucluse = FranceDepartementCode.Vaucluse,
}
2 changes: 2 additions & 0 deletions org/eu/fr/region/pac/PacaDepartments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ import { vaucluse } from "./84/Vaucluse"
import { Department } from "../../../../country/region/department/Department"
import { alpesMaritimes } from "./06/AlpesMaritimes"
import { Var } from "./83/Var"
import { bouchesDuRhone } from "./13/BouchesDuRhone"

export const pacaDepartments: Department[] = [
alpesMaritimes,
bouchesDuRhone,
hautesAlpes,
vaucluse,
Var
Expand Down
2 changes: 2 additions & 0 deletions org/eu/fr/region/pac/PacaMessages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ import { vaucluseMessages } from "./84/VaucluseMessages"
import { DepartmentMessages } from "../../../../country/region/department/DepartmentMessages"
import { alpesMaritimesMessages } from "./06/HautesAlpesMessages"
import { varMessages } from "./83/VarMessages"
import { bouchesDuRhoneMessages } from "./13/BouchesDuRhoneMessages"

export type PacaDepartmentMessagesList = { [key in PacaDepartementCode]: DepartmentMessages }

export const pacaMessageList: PacaDepartmentMessagesList = {
[PacaDepartementCode.AlpesMaritimes]: alpesMaritimesMessages,
[PacaDepartementCode.BouchesDuRhone]: bouchesDuRhoneMessages,
[PacaDepartementCode.HautesAlpes]: hautesAlpesMessages,
[PacaDepartementCode.Vaucluse]: vaucluseMessages,
[PacaDepartementCode.Var]: varMessages
Expand Down

0 comments on commit e613498

Please sign in to comment.