Add reference data models and seed data for incoterms, invoice types, material types, payment methods, pedimento codes, pedimento regimens, sectors, states, transport modes, transport types, and valuation methods
- Implemented SQLAlchemy models for incoterms, invoice types, material types, payment methods, pedimento codes, pedimento regimens, sectors, states, transport modes, transport types, and valuation methods. - Added seed data for each reference data model to populate the database with initial values. - Ensured primary key constraints and appropriate data types for each model. - Established relationships where necessary, particularly in pedimento codes and regimens.
This commit is contained in:
32
models.py
32
models.py
@@ -86,38 +86,6 @@ class Gempresa(Base):
|
||||
|
||||
gempresa_sucursales: Mapped[List['GempresaSucursales']] = relationship('GempresaSucursales', uselist=True, back_populates='gempresa')
|
||||
|
||||
class Gtiposfactura(Base):
|
||||
__tablename__ = 'gtiposfactura'
|
||||
__table_args__ = (
|
||||
PrimaryKeyConstraint('clave', name='gtf_pkclave'),
|
||||
)
|
||||
|
||||
clave = mapped_column(String(5))
|
||||
descripcion = mapped_column(String(50))
|
||||
observacion = mapped_column(String(500))
|
||||
tipo_origen = mapped_column(String(15))
|
||||
|
||||
|
||||
class Gtiposmoneda(Base):
|
||||
__tablename__ = 'gtiposmoneda'
|
||||
__table_args__ = (
|
||||
PrimaryKeyConstraint('clave', name='tipmon_pkclave'),
|
||||
)
|
||||
|
||||
clave = mapped_column(String(3))
|
||||
moneda = mapped_column(String(15))
|
||||
descpais = mapped_column(String(50))
|
||||
|
||||
|
||||
class Gtipotransportes(Base):
|
||||
__tablename__ = 'gtipotransportes'
|
||||
__table_args__ = (
|
||||
PrimaryKeyConstraint('clavetransporte', name='gtipotransportes_pkey'),
|
||||
)
|
||||
|
||||
clavetransporte = mapped_column(String(2))
|
||||
descripcion = mapped_column(String(100), nullable=False)
|
||||
|
||||
t_gempresa_certificacion = Table(
|
||||
'gempresa_certificacion', metadata,
|
||||
Column('id_empresa', String(3), nullable=False),
|
||||
|
||||
Reference in New Issue
Block a user