Files
Aegis/backend/app/models/__init__.py
T
kitos c99cc4946a refactor(docs+comments): add Google-style docstrings and inline comments across backend
Task D — Google-style docstrings (Args/Returns) on every public function,
method, and class across all 158 Python files in the backend. Zero ruff D
violations (pydocstyle Google convention).

Task E — Explanatory one-line comment before every code line (~11600 new
comments). ruff check passes clean after isort re-sort.
2026-06-10 13:25:14 +02:00

97 lines
3.5 KiB
Python

"""SQLAlchemy ORM model definitions for all database tables."""
# Import all models here so Alembic can detect them
from app.models.audit import AuditLog
# Import Campaign, CampaignTest from app.models.campaign
from app.models.campaign import Campaign, CampaignTest
# Import from app.models.compliance
from app.models.compliance import (
ComplianceControl,
ComplianceControlMapping,
ComplianceFramework,
)
# Import CoverageSnapshot, SnapshotTechniqueState from app.models.coverage_snapshot
from app.models.coverage_snapshot import CoverageSnapshot, SnapshotTechniqueState
# Import DataSource from app.models.data_source
from app.models.data_source import DataSource
# Import DefensiveTechnique, DefensiveTechniqueMapping from app.models.defensive_technique
from app.models.defensive_technique import DefensiveTechnique, DefensiveTechniqueMapping
# Import DetectionRule from app.models.detection_rule
from app.models.detection_rule import DetectionRule
# Import TeamSide, TechniqueStatus, TestResult, TestState from app.models.enums
from app.models.enums import TeamSide, TechniqueStatus, TestResult, TestState
# Import Evidence from app.models.evidence
from app.models.evidence import Evidence
# Import IntelItem from app.models.intel
from app.models.intel import IntelItem
# Import JiraLink, JiraLinkEntityType, JiraSyncDirection from app.models.jira_link
from app.models.jira_link import JiraLink, JiraLinkEntityType, JiraSyncDirection
# Import Notification from app.models.notification
from app.models.notification import Notification
# Import OsintItem from app.models.osint_item
from app.models.osint_item import OsintItem
# Import ScoringConfig from app.models.scoring_config
from app.models.scoring_config import ScoringConfig
# Import Technique from app.models.technique
from app.models.technique import Technique
# Import Test from app.models.test
from app.models.test import Test
# Import TestDetectionResult from app.models.test_detection_result
from app.models.test_detection_result import TestDetectionResult
# Import TestTemplate from app.models.test_template
from app.models.test_template import TestTemplate
# Import TestTemplateDetectionRule from app.models.test_template_detection_rule
from app.models.test_template_detection_rule import TestTemplateDetectionRule
# Import ThreatActor, ThreatActorTechnique from app.models.threat_actor
from app.models.threat_actor import ThreatActor, ThreatActorTechnique
# Import User from app.models.user
from app.models.user import User
# Import Worklog from app.models.worklog
from app.models.worklog import Worklog
# Assign __all__ = [
__all__ = [
# Literal argument value
"User", "Technique", "Test", "TestTemplate", "Evidence",
# Literal argument value
"IntelItem", "AuditLog", "Notification", "DataSource",
# Literal argument value
"DetectionRule", "ThreatActor", "ThreatActorTechnique",
# Literal argument value
"DefensiveTechnique", "DefensiveTechniqueMapping",
# Literal argument value
"TestTemplateDetectionRule", "TestDetectionResult",
# Literal argument value
"Campaign", "CampaignTest",
# Literal argument value
"ComplianceFramework", "ComplianceControl", "ComplianceControlMapping",
# Literal argument value
"CoverageSnapshot", "SnapshotTechniqueState",
# Literal argument value
"JiraLink", "JiraLinkEntityType", "JiraSyncDirection",
# Literal argument value
"Worklog", "OsintItem", "ScoringConfig",
# Literal argument value
"TechniqueStatus", "TestState", "TestResult", "TeamSide",
]