Skip to content

Commit

Permalink
Merge pull request #19 from guivaloz:guivaloz/exhortos-por-enviar
Browse files Browse the repository at this point in the history
Por enviar exhortos
  • Loading branch information
guivaloz authored Jun 13, 2024
2 parents 0ed3374 + 07857bd commit 5eaf1f8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion carina/core/entradas_salidas/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class EntradaSalida(Base, UniversalMixin):
usuario: Mapped["Usuario"] = relationship(back_populates="entradas_salidas")

# Columnas
tipo: Mapped[str] = mapped_column(Enum(*TIPOS, name="entradas_salidas_tipos", native_enum=False), index=True)
tipo: Mapped[str] = mapped_column(Enum(*TIPOS, name="entradas_salidas_tipos", native_enum=False))
direccion_ip: Mapped[str] = mapped_column(String(64))

def __repr__(self):
Expand Down
12 changes: 8 additions & 4 deletions carina/core/exh_exhortos/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,7 @@ class ExhExhorto(Base, UniversalMixin):
estado: Mapped[str] = mapped_column(Enum(*ESTADOS, name="exh_exhortos_estados", native_enum=False), index=True)

# Campo para saber si es un proceso interno o extorno
remitente: Mapped[str] = mapped_column(
Enum(*REMITENTES, name="exh_exhortos_remitentes", native_enum=False),
nullable=True,
)
remitente: Mapped[str] = mapped_column(Enum(*REMITENTES, name="exh_exhortos_remitentes", native_enum=False), index=True)

# Número de Exhorto con el que se radica en el Juzgado/Área que se turnó el exhorto.
# Este número sirve para que el usuario pueda indentificar su exhorto dentro del Juzgado/Área donde se turnó, opcional
Expand All @@ -125,6 +122,13 @@ class ExhExhorto(Base, UniversalMixin):
# que se van a recibir el Poder Judicial exhortado en el envío del Exhorto.
exh_exhortos_archivos: Mapped[List["ExhExhortoArchivo"]] = relationship("ExhExhortoArchivo", back_populates="exh_exhorto")

# Cuando el exhorto esta en estado POR ENVIAR
# Puede tener un tiempo con su anterior intento, si es nulo es que no ha sido enviado aun
por_enviar_tiempo_anterior: Mapped[Optional[datetime]] = mapped_column(DateTime)

# Y se lleva un contador de intentos
por_enviar_intentos: Mapped[int] = mapped_column(Integer, default=0)

def __repr__(self):
"""Representación"""
return f"<ExhExhorto {self.id}>"

0 comments on commit 5eaf1f8

Please sign in to comment.