- 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.
26 lines
963 B
Python
26 lines
963 B
Python
from typing import List
|
|
from sqlalchemy import String, PrimaryKeyConstraint, ForeignKey
|
|
from sqlalchemy.orm import mapped_column, Mapped, relationship
|
|
from core.database import Base
|
|
|
|
class RegimenPedimento(Base):
|
|
__tablename__ = "pedimento_regimens" #GRegimenPed
|
|
__table_args__ = (
|
|
PrimaryKeyConstraint("code", name="pedimento_regimens_pkey"),
|
|
{"schema": "public"}
|
|
)
|
|
|
|
code: Mapped[str] = mapped_column(String(3), nullable=False) # código tipo "01", "31"
|
|
description: Mapped[str] = mapped_column(String(100), nullable=False) # nombre legal en español
|
|
|
|
# Relación con Claves de Pedimento
|
|
#GClavePedRegimen
|
|
claves_pedimento: Mapped[List['CodePedimentoRegimen']] = relationship(
|
|
"CodePedimentoRegimen",
|
|
uselist=True,
|
|
back_populates="regimen"
|
|
)
|
|
|
|
def __repr__(self):
|
|
return f"<RegimenPedimento(code={self.code}, description={self.description})>"
|