first commit

This commit is contained in:
2026-04-01 13:48:40 -07:00
commit 61d386a7c7
178 changed files with 3827 additions and 0 deletions

Binary file not shown.

View File

@@ -0,0 +1,50 @@
from sqlalchemy import Column, Integer, String, Date, DateTime, Float, Boolean, Text, ForeignKey, Enum as SQLEnum
from sqlalchemy.sql import func
from sqlalchemy.orm import relationship
from database import Base
import enum
# Articulo 69 de codigo fiscal de la federacion!!!
# 69 article of fiscal code of federation, mexican united states.
class Supuestos(str, enum.Enum):
CANCELADOS ="cancelados"
CONDONADOS ="condonados"
FIRMES ="firmes"
SENTENCIAS ="sentencias"
EXIGIBLES ="exigibles"
RETORNO_INVERSIONES ="retorno_inversiones"
FRACCION_X ="fraccion_x"
FRACCION_VII ="fraccion_vii"
NO_LOCALIZADOS ="no_localizados"
class Credits(Base):
__tablename__="credits"
id = Column(Integer, primary_key=True, autoincrement=True, nullable=False)
title = Column(String(30), nullable=False)
rfc = Column(String(25), nullable=False)
razon_social = Column(String(100), nullable=False)
tipo_persona = Column(String(100), nullable=False)
supuesto = Column(SQLEnum(Supuestos, name="supuestos", create_type=False), nullable=False)
fecha_primera_publicacion = Column(Date, nullable=False)
fecha_publicacion_ley_transparencia = Column(Date, nullable=True)
fecha_cancelacion = Column(Date, nullable=True)
fecha_cancelacion_csd = Column(Date, nullable=True)
entidad_federativa = Column(String, nullable=False)
monto = Column(Integer, nullable=True)
motivo = Column(Text, nullable=True)
location_id = Column(Integer, ForeignKey("location.id"), nullable=False)
created_at = Column(DateTime(timezone=True), server_default=func.now(), nullable=False)
updated_at = Column(DateTime(timezone=True), server_default=func.now(), nullable=True)
uploaded_by = Column(Integer, nullable=True)
# relationships
location = relationship("Locations", back_populates="credits")

View File

View File

View File