Files
ERP/backend/app/models/__init__.py
T
MMD e5d6c77c3c feat(data-safety): scheduled DB backups + audit trail + verified actor attribution
- db-backup sidecar: pg_dump -Fc of procurement+casdoor every
  BACKUP_INTERVAL_SECONDS into BACKUP_DIR, retention via BACKUP_KEEP_DAYS
- audit_log table (migration.sql + runtime ensure_audit_table) with
  model + transactional helper (utils/audit.record) — wired into user
  create/role-change and inventory transaction creation
- get_actor: quote_events.actor now stores the VERIFIED user's display
  name instead of the raw bearer token
2026-09-18 22:23:34 +03:30

64 lines
1.3 KiB
Python

"""ORM models — import order matters only for registration in Base.metadata."""
from app.db.base import Base
from app.models.audit import AuditLog
from app.models.catalog import (
AttributeDefinition,
Brand,
BrandMaterial,
CategoryAttribute,
CategoryReferenceUnit,
Material,
MaterialAttributeValue,
MaterialCategory,
MaterialUnit,
StandardConversion,
Unit,
UnitConversion,
)
from app.models.files import QuoteAttachment
from app.models.procurement import (
ItemDecision,
ItemReceipt,
ItemTermsheet,
ItemTermsheetsWithTotal,
LineItem,
LineItemSpec,
Project,
Quote,
QuoteEvent,
QuoteProjects,
Supplier,
Termsheet,
TermsheetScheduleStep,
)
__all__ = [
"Base",
"Unit",
"Brand",
"MaterialCategory",
"AttributeDefinition",
"CategoryAttribute",
"Material",
"BrandMaterial",
"MaterialUnit",
"MaterialAttributeValue",
"CategoryReferenceUnit",
"UnitConversion",
"StandardConversion",
"Supplier",
"Project",
"Quote",
"QuoteEvent",
"QuoteProjects",
"LineItem",
"LineItemSpec",
"Termsheet",
"TermsheetScheduleStep",
"ItemTermsheet",
"ItemTermsheetsWithTotal",
"ItemDecision",
"ItemReceipt",
"QuoteAttachment",
]