Files
plantillas-proyectos/backend/api/v1/modules/sitar/requisito_previo/schemas.py
AlexeerCT 23509cbcc9 Refactor DTO classes to use model_config with ConfigDict for attribute handling
- Updated multiple DTO classes across various modules to replace the `Config` class with `model_config = ConfigDict(from_attributes=True)`.
- This change enhances consistency in attribute handling and aligns with the latest Pydantic practices.
- Adjusted error handling in core modules to change status codes from `HTTP_422_UNPROCESSABLE_ENTITY` to `HTTP_422_UNPROCESSABLE_CONTENT` for improved clarity in validation responses.
2026-03-24 12:06:55 -05:00

28 lines
988 B
Python

"""Requisito Previo Schemas"""
from typing import Optional
from pydantic import BaseModel, ConfigDict, Field
class RequisitoPrevioResponse(BaseModel):
"""Requisitos previos"""
FRACCION: Optional[str] = Field(None, max_length=8)
DESCRIPCION: Optional[str] = Field(None, max_length=1999)
OBSERVACION: Optional[str] = Field(None, max_length=1999)
DOF: Optional[str] = Field(None, max_length=8)
VIGENCIA: Optional[str] = Field(None, max_length=8)
NUMEROACUERDO: Optional[int] = None
NUMEROCRITERIO: Optional[int] = None
NUMEROFORMATO: Optional[int] = None
NUMEROINSTRUCCIONES: Optional[int] = None
HISTORICO: Optional[str] = Field(None, max_length=2000)
NOTA: Optional[str] = Field(None, max_length=5000)
PERMISO: Optional[str] = Field(None, max_length=2)
IMPO: Optional[int] = None
EXPO: Optional[int] = None
NICO: Optional[str] = Field("", max_length=2)
SYSID: int
model_config = ConfigDict(from_attributes=True)