first commit
This commit is contained in:
BIN
app/modules/credits/__pycache__/models.cpython-311.pyc
Normal file
BIN
app/modules/credits/__pycache__/models.cpython-311.pyc
Normal file
Binary file not shown.
50
app/modules/credits/models.py
Normal file
50
app/modules/credits/models.py
Normal 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")
|
||||
|
||||
0
app/modules/credits/repository.py
Normal file
0
app/modules/credits/repository.py
Normal file
0
app/modules/credits/route.py
Normal file
0
app/modules/credits/route.py
Normal file
0
app/modules/credits/schema.py
Normal file
0
app/modules/credits/schema.py
Normal file
Reference in New Issue
Block a user