mirror of
https://github.com/mblanke/ThreatHunt.git
synced 2026-03-01 22:00:22 -05:00
Complete backend infrastructure and authentication system
Co-authored-by: mblanke <9078342+mblanke@users.noreply.github.com>
This commit is contained in:
20
backend/app/models/artifact.py
Normal file
20
backend/app/models/artifact.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from sqlalchemy import Column, Integer, String, DateTime, ForeignKey, Text, JSON
|
||||
from sqlalchemy.orm import relationship
|
||||
from datetime import datetime
|
||||
|
||||
from app.core.database import Base
|
||||
|
||||
|
||||
class Artifact(Base):
|
||||
__tablename__ = "artifacts"
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
artifact_type = Column(String, nullable=False) # hash, ip, domain, email, etc.
|
||||
value = Column(String, nullable=False)
|
||||
description = Column(Text, nullable=True)
|
||||
case_id = Column(Integer, ForeignKey("cases.id"), nullable=True)
|
||||
artifact_metadata = Column(JSON, nullable=True)
|
||||
created_at = Column(DateTime, default=datetime.utcnow)
|
||||
|
||||
# Relationships
|
||||
case = relationship("Case", back_populates="artifacts")
|
||||
Reference in New Issue
Block a user