- Updated GBultoService to use models.Package instead of models.GBulto. - Refactored Part model to use SQLAlchemy 2.0 style with Mapped and mapped_column. - Added timestamps (created_at, updated_at, deleted_at) to various pedimento models. - Improved relationships and foreign key constraints in pedimento models. - Updated PermissionRuleOct and Seal models to use Mapped and mapped_column. - Changed DTO configuration from orm_mode to from_attributes for better compatibility. - Removed obsolete models (models.py and models_ped.py) from the repository.
15 lines
370 B
Python
15 lines
370 B
Python
from pydantic import BaseModel
|
|
from typing import Optional
|
|
|
|
class ExchangeRateBaseDTO(BaseModel):
|
|
date: int
|
|
value: Optional[float]
|
|
local_currency: Optional[str]
|
|
foreign_currency: Optional[str]
|
|
|
|
class ExchangeRateCreateDTO(ExchangeRateBaseDTO):
|
|
pass
|
|
|
|
class ExchangeRateResponseDTO(ExchangeRateBaseDTO):
|
|
class Config:
|
|
from_attributes = True |