CARONTE v1.0 - Plataforma de Gestão Social
This commit is contained in:
16
backend/app/models/beneficio.py
Normal file
16
backend/app/models/beneficio.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from sqlalchemy import Column, Integer, String, DateTime, ForeignKey, Float
|
||||
from sqlalchemy.sql import func
|
||||
from app.core.database import Base
|
||||
|
||||
class Beneficio(Base):
|
||||
__tablename__ = "beneficios"
|
||||
id = Column(Integer, primary_key=True, autoincrement=True)
|
||||
familia_id = Column(Integer, ForeignKey("familias.id"), nullable=False)
|
||||
falecido_id = Column(Integer, ForeignKey("falecidos.id"), nullable=False)
|
||||
tipo = Column(String, nullable=False) # fgts, pis, pensao_morte, seguro_vida, seguro_dpvat
|
||||
nome = Column(String, nullable=False)
|
||||
descricao = Column(String, nullable=True)
|
||||
status = Column(String, default="identificado") # identificado, em_processo, sacado
|
||||
valor_estimado = Column(Float, nullable=True)
|
||||
valor_sacado = Column(Float, nullable=True)
|
||||
created_at = Column(DateTime, server_default=func.now())
|
||||
Reference in New Issue
Block a user