- Added INPC management page with search functionality. - Created Legends management page with filters for code and description. - Implemented Multi-Currency Types management with search capabilities. - Developed Packages management page with filtering options. - Introduced Ports management page with authentication and data fetching. - Added Prevalidators management page with search filters. - Implemented Signatures management page with search by name and position. - Created Unit Conversions management page for conversion factors. - Developed Units of Measure management pages for ACE, American, and OMA with data tables and create/edit dialogs.
24 lines
841 B
Python
24 lines
841 B
Python
from typing import Optional
|
|
|
|
from core.database import Base
|
|
from sqlalchemy import PrimaryKeyConstraint, String
|
|
from sqlalchemy.orm import Mapped, mapped_column
|
|
|
|
|
|
class State(Base):
|
|
__tablename__ = "states" # GEstados
|
|
__table_args__ = (
|
|
PrimaryKeyConstraint("m3_key", "description", name="states_pkey"),
|
|
{"schema": "public", "extend_existing": True},
|
|
)
|
|
|
|
m3_key: Mapped[str] = mapped_column(String(3), nullable=False)
|
|
description: Mapped[str] = mapped_column(
|
|
String(50), nullable=False
|
|
) # valor legal en español
|
|
mex_key: Mapped[Optional[str]] = mapped_column(String(3))
|
|
ame_key: Mapped[Optional[str]] = mapped_column(String(2))
|
|
|
|
def __repr__(self):
|
|
return f"<State(m3_key={self.m3_key}, description={self.description}, mex_key={self.mex_key}, ame_key={self.ame_key})>"
|