refactor(api/schemas): simplify company info response and schema

This commit is contained in:
Fanilo-Nantenaina 2026-01-13 17:09:12 +03:00
parent 9ae447e2c7
commit d2f02e1555
2 changed files with 8 additions and 8 deletions

2
api.py
View file

@ -2863,7 +2863,7 @@ async def obtenir_informations_societe():
if not societe:
raise HTTPException(404, "Informations société introuvables")
return {"success": True, "data": societe}
return societe
except HTTPException:
raise

View file

@ -1,20 +1,20 @@
from pydantic import BaseModel, Field
from pydantic import BaseModel
from typing import Optional, List
class ExerciceComptable(BaseModel):
numero: int
debut: Optional[str] = None
debut: str
fin: Optional[str] = None
class SocieteInfo(BaseModel):
# Identification
raison_sociale: str = Field(..., description="Raison sociale")
numero_dossier: str = Field(..., description="Code du dossier")
siret: Optional[str] = Field(None, description="Numéro SIRET")
code_ape: Optional[str] = Field(None, description="Code APE/NAF")
numero_tva: Optional[str] = Field(None, description="Numéro TVA intracommunautaire")
raison_sociale: str
numero_dossier: str
siret: Optional[str] = None
code_ape: Optional[str] = None
numero_tva: Optional[str] = None
# Adresse
adresse: Optional[str] = None