- 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.
24 lines
577 B
Python
24 lines
577 B
Python
"""
|
|
DTOs for FractionRuleOctave.
|
|
"""
|
|
|
|
from pydantic import BaseModel
|
|
from typing import Optional
|
|
|
|
class FractionRuleOctaveBaseDTO(BaseModel):
|
|
PERMISSION: str
|
|
LINE: int
|
|
FRACTION: str
|
|
QUOTA_AMOUNT: Optional[float]
|
|
USED_AMOUNT: Optional[float]
|
|
QUOTA_VALUE: Optional[float]
|
|
USED_VALUE: Optional[float]
|
|
UNIT_COST_ME: Optional[float]
|
|
UNIT_MEASURE: Optional[str]
|
|
|
|
class FractionRuleOctaveCreateDTO(FractionRuleOctaveBaseDTO):
|
|
pass
|
|
|
|
class FractionRuleOctaveResponseDTO(FractionRuleOctaveBaseDTO):
|
|
class Config:
|
|
from_attributes = True |