-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
3 changed files
with
14 additions
and
10 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -120,11 +120,16 @@ def not_future(value: date): | |
# A date not in the future (today or in the past) | ||
NotFutureDate = Annotated[date, AfterValidator(not_future)] | ||
|
||
# Default values (if not provided) | ||
DEFAULT_CHAR_VALUE: str = "NA" | ||
DEFAULT_EMAIL_ADDRESS: str = "[email protected]" | ||
DEFAULT_PHONE_NUMBER: FrenchPhoneNumber = FrenchPhoneNumber("+33.123456789") | ||
|
||
|
||
class Statique(ModelSchemaMixin, BaseModel): | ||
"""IRVE static model.""" | ||
|
||
nom_amenageur: Optional[str] | ||
nom_amenageur: Optional[str] = DEFAULT_CHAR_VALUE | ||
siren_amenageur: Optional[ | ||
Annotated[ | ||
str, | ||
|
@@ -135,11 +140,11 @@ class Statique(ModelSchemaMixin, BaseModel): | |
], | ||
), | ||
] | ||
] | ||
contact_amenageur: Optional[EmailStr] | ||
nom_operateur: Optional[str] | ||
] = "123456789" | ||
contact_amenageur: Optional[EmailStr] = DEFAULT_EMAIL_ADDRESS | ||
nom_operateur: Optional[str] = DEFAULT_CHAR_VALUE | ||
contact_operateur: EmailStr | ||
telephone_operateur: Optional[FrenchPhoneNumber] | ||
telephone_operateur: Optional[FrenchPhoneNumber] = DEFAULT_PHONE_NUMBER | ||
nom_enseigne: str | ||
id_station_itinerance: Annotated[ | ||
str, Field(pattern="(?:(?:^|,)(^[A-Z]{2}[A-Z0-9]{4,33}$|Non concerné))+$") | ||
|
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
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