15 lines
647 B
Python
15 lines
647 B
Python
|
|
from sqlalchemy import Column, Integer, String, ForeignKey, Numeric, Date
|
||
|
|
from sqlalchemy.orm import relationship
|
||
|
|
|
||
|
|
from models.entities.base import Base
|
||
|
|
|
||
|
|
class Comprovante(Base):
|
||
|
|
__tablename__ = 'comprovantes'
|
||
|
|
|
||
|
|
id = Column(Integer, primary_key=True, autoincrement=True)
|
||
|
|
militante_id = Column(Integer, ForeignKey('militantes.id'), nullable=False)
|
||
|
|
tipo_comprovante = Column(String(50)) # Cota, Jornal, Assinatura, etc.
|
||
|
|
data_comprovante = Column(Date, nullable=False)
|
||
|
|
|
||
|
|
militante = relationship("Militante", back_populates="comprovantes")
|
||
|
|
transacoes_pix = relationship("TransacaoPIX", back_populates="comprovante")
|