murshid / murshid_backend /app /models /technique.py
devorbit's picture
Initial deployment - secrets removed
26e1c2e
raw
history blame contribute delete
730 Bytes
"""
Technique entity — ER Diagram §3.2.6
Attributes: Technique_ID, technique_name, tactic
"""
from sqlalchemy import String
from sqlalchemy.orm import Mapped, mapped_column, relationship
from app.db.base import Base
class Technique(Base):
__tablename__ = "techniques"
technique_id: Mapped[str] = mapped_column(String(20), primary_key=True)
technique_name: Mapped[str] = mapped_column(String(255), nullable=False)
tactic: Mapped[str | None] = mapped_column(String(100), nullable=True)
rule_mappings: Mapped[list["RuleTechniqueMapping"]] = relationship(
back_populates="technique"
)
query_templates: Mapped[list["QueryTemplate"]] = relationship(
back_populates="technique"
)