- Added schemas, services, and routers for PROSEC, RCG2, Regulaciones, REIT, RequisitoPrevio, TLCS, and Vehiculos modules. - Each module includes search and get by ID functionalities. - Integrated FastAPI routers for each module into the main SITAR router. - Ensured proper response models using Pydantic for data validation.
20 lines
550 B
Python
20 lines
550 B
Python
"""Regulaciones Schemas"""
|
|
|
|
from typing import Optional
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class RegulacionesResponse(BaseModel):
|
|
"""Regulaciones y restricciones"""
|
|
|
|
FRACCION: Optional[str] = Field(None, max_length=10)
|
|
PERMISO: Optional[str] = Field(None, max_length=2)
|
|
ACUERDO: Optional[str] = Field(None, max_length=15)
|
|
CLAVE: Optional[str] = Field(None, max_length=10)
|
|
DESCRIPCION: Optional[str] = None
|
|
NICO: Optional[str] = Field("", max_length=2)
|
|
SYSID: int
|
|
|
|
class Config:
|
|
from_attributes = True
|