Nuevo formulario de extension para partes SCAI con nuevas tablas de aphis con catalogos fijos nuevos

This commit is contained in:
2026-03-18 10:50:36 -05:00
parent adfa82c707
commit 546b1ea56f
39 changed files with 30627 additions and 98 deletions

View File

@@ -0,0 +1,26 @@
from core.database import Base
from sqlalchemy import PrimaryKeyConstraint, String
from sqlalchemy.orm import Mapped, mapped_column
class IdentifierCatalog(Base):
__tablename__ = "identifiers"
__table_args__ = (
PrimaryKeyConstraint("key", name="identifiers_pkey"),
{"schema": "public", "extend_existing": True},
)
key: Mapped[str] = mapped_column(
String(10), primary_key=True, nullable=False) # clave del identificador
description: Mapped[str] = mapped_column(
String(2000), nullable=False
) # descripción
level: Mapped[str] = mapped_column(
String(1), nullable=False
) # nivel (G, P, etc)
complement: Mapped[str] = mapped_column(
String(5000), nullable=False
) # complemento / instrucciones
def __repr__(self):
return f"<IdentifierCatalog(key={self.key}, level={self.level})>"