-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.py
More file actions
27 lines (20 loc) · 929 Bytes
/
Copy pathmodels.py
File metadata and controls
27 lines (20 loc) · 929 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from sqlalchemy import Column, Integer, String, Boolean
from database import Base
class StateVoter(Base):
__tablename__ = "state_voters"
id = Column(Integer, primary_key=True, index=True)
reference_id = Column(String, index=True)
state = Column(String)
status = Column(String) # ACTIVE / INACTIVE / BLOCKED
class ReferenceRegistry(Base):
__tablename__ = "reference_registry"
reference_id = Column(String, primary_key=True, index=True)
current_state = Column(String)
status = Column(String) # ACTIVE / IN-TRANSFER / INACTIVE / BLOCKED
election_flag = Column(Boolean, default=False)
class AuditLog(Base):
__tablename__ = "audit_logs"
id = Column(Integer, primary_key=True, index=True)
reference_id = Column(String, index=True)
action = Column(String) # e.g., "TRANSFER_INITIATED", "STATUS_CHANGED"
details = Column(String) # Additional details about the action