phase-3: breakdown and complaint register with calculations and permissions

This commit is contained in:
Atharv1705
2026-11-12 12:54:21 +05:30
parent ee437e3adf
commit 905f6735a7
29 changed files with 3505 additions and 26 deletions
+2
View File
@@ -618,6 +618,7 @@ def seed_database(db: Session, upload_dir: Path | None = None) -> dict[str, int]
registered_at=reg_at,
registered_by_id=reg_user.id,
received_by_id=recv_user.id,
received_at=reg_at,
assigned_to_id=assigned_user.id if call_status in ("in_progress", "closed") else None,
assigned_at=c_assigned_at,
attended_by_id=assigned_user.id if call_status in ("in_progress", "closed") else None,
@@ -795,6 +796,7 @@ def seed_database(db: Session, upload_dir: Path | None = None) -> dict[str, int]
def main():
t0 = pytime.perf_counter()
Base.metadata.drop_all(bind=engine)
Base.metadata.create_all(bind=engine)
with SessionLocal() as db:
summary = seed_database(db)