Spaces:
Paused
Paused
Upload core/models/compliance.py with huggingface_hub
Browse files- core/models/compliance.py +20 -4
core/models/compliance.py
CHANGED
|
@@ -8,7 +8,17 @@ and regulatory requirements.
|
|
| 8 |
import json
|
| 9 |
import uuid
|
| 10 |
|
| 11 |
-
from sqlalchemy import
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
from sqlalchemy.orm import relationship
|
| 13 |
|
| 14 |
from .base import Base, EncryptedString, utc_now
|
|
@@ -84,7 +94,9 @@ class RegulatoryReport(Base):
|
|
| 84 |
report_type = Column(String, index=True) # SAR, CTR, STR, etc.
|
| 85 |
report_id = Column(String, unique=True, index=True) # FINCEN report ID
|
| 86 |
case_id = Column(String, ForeignKey("cases.id"), index=True)
|
| 87 |
-
filing_status = Column(
|
|
|
|
|
|
|
| 88 |
filing_date = Column(DateTime, index=True)
|
| 89 |
due_date = Column(DateTime, index=True)
|
| 90 |
regulatory_body = Column(String, index=True) # FINCEN, EU, etc.
|
|
@@ -102,9 +114,13 @@ class SecurityIncident(Base):
|
|
| 102 |
__tablename__ = "security_incidents"
|
| 103 |
|
| 104 |
id = Column(String, primary_key=True, index=True)
|
| 105 |
-
incident_type = Column(
|
|
|
|
|
|
|
| 106 |
severity = Column(String, index=True) # critical, high, medium, low
|
| 107 |
-
status = Column(
|
|
|
|
|
|
|
| 108 |
title = Column(String, nullable=False)
|
| 109 |
description = Column(String)
|
| 110 |
affected_systems = Column(JSON, default=list)
|
|
|
|
| 8 |
import json
|
| 9 |
import uuid
|
| 10 |
|
| 11 |
+
from sqlalchemy import (
|
| 12 |
+
JSON,
|
| 13 |
+
Boolean,
|
| 14 |
+
Column,
|
| 15 |
+
DateTime,
|
| 16 |
+
Float,
|
| 17 |
+
ForeignKey,
|
| 18 |
+
Index,
|
| 19 |
+
Integer,
|
| 20 |
+
String,
|
| 21 |
+
)
|
| 22 |
from sqlalchemy.orm import relationship
|
| 23 |
|
| 24 |
from .base import Base, EncryptedString, utc_now
|
|
|
|
| 94 |
report_type = Column(String, index=True) # SAR, CTR, STR, etc.
|
| 95 |
report_id = Column(String, unique=True, index=True) # FINCEN report ID
|
| 96 |
case_id = Column(String, ForeignKey("cases.id"), index=True)
|
| 97 |
+
filing_status = Column(
|
| 98 |
+
String, default="draft", index=True
|
| 99 |
+
) # draft, filed, rejected
|
| 100 |
filing_date = Column(DateTime, index=True)
|
| 101 |
due_date = Column(DateTime, index=True)
|
| 102 |
regulatory_body = Column(String, index=True) # FINCEN, EU, etc.
|
|
|
|
| 114 |
__tablename__ = "security_incidents"
|
| 115 |
|
| 116 |
id = Column(String, primary_key=True, index=True)
|
| 117 |
+
incident_type = Column(
|
| 118 |
+
String, index=True
|
| 119 |
+
) # breach, unauthorized_access, malware, etc.
|
| 120 |
severity = Column(String, index=True) # critical, high, medium, low
|
| 121 |
+
status = Column(
|
| 122 |
+
String, default="open", index=True
|
| 123 |
+
) # open, investigating, contained, resolved, closed
|
| 124 |
title = Column(String, nullable=False)
|
| 125 |
description = Column(String)
|
| 126 |
affected_systems = Column(JSON, default=list)
|