- Implemented SvelteKit frontend with authentication callback handling. - Created demo routes and paraglide localization functionality. - Added health check and entrypoint scripts for backend services. - Established PostgreSQL and Keycloak initialization scripts with health checks. - Introduced models for database schema using SQLAlchemy. - Configured Vite and SvelteKit for development and testing environments. - Added health check script to verify service statuses and resource usage. - Created Docker entrypoint scripts for seamless service startup.
25 lines
899 B
Python
25 lines
899 B
Python
from typing import List
|
|
from sqlalchemy import String, PrimaryKeyConstraint
|
|
from sqlalchemy.orm import mapped_column, Mapped, relationship
|
|
from core.database import Base
|
|
|
|
class PedimentoCode(Base):
|
|
__tablename__ = "pedimento_codes" # GClavePed
|
|
__table_args__ = (
|
|
PrimaryKeyConstraint("code", name="pedimento_codes_pkey"),
|
|
{"schema": "public"} # esquema del anexo 22
|
|
)
|
|
|
|
code: Mapped[str] = mapped_column(String(3), nullable=False)
|
|
description: Mapped[str] = mapped_column(String(250), nullable=False)
|
|
|
|
# Relación con los regímenes asociados
|
|
#GClavePedRegimen
|
|
regimens: Mapped[List['CodePedimentoRegimen']] = relationship(
|
|
"CodePedimentoRegimen",
|
|
uselist=True,
|
|
back_populates="pedimento"
|
|
)
|
|
|
|
def __repr__(self):
|
|
return f"<PedimentoCode(code={self.code}, description={self.description})>" |