- SimulationTemplate model + migration 0005 (CREATE TABLE + name index) - 5 CRUD endpoints under /api/templates (admin|redteam only, SOC 403) - POST /api/engagements/<eid>/simulations extended with optional template_id - serialize_template() reusing _enrich_techniques/_enrich_tactics helpers - IntegrityError → 409 for duplicate name on both POST and PATCH - 28 new tests (CRUD, RBAC, dedup, instantiation, migration round-trip) - 221 tests pass; ruff clean; mypy clean Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
16 lines
441 B
Python
16 lines
441 B
Python
"""SQLAlchemy models."""
|
|
from backend.app.models.engagement import Engagement, EngagementStatus
|
|
from backend.app.models.simulation import Simulation, SimulationStatus
|
|
from backend.app.models.simulation_template import SimulationTemplate
|
|
from backend.app.models.user import User, UserRole
|
|
|
|
__all__ = [
|
|
"User",
|
|
"UserRole",
|
|
"Engagement",
|
|
"EngagementStatus",
|
|
"Simulation",
|
|
"SimulationStatus",
|
|
"SimulationTemplate",
|
|
]
|