Initial commit: SQL audit platform v0.1.0
FastAPI backend with auth, user, instance, ticket, query, dashboard APIs. React + TypeScript frontend with mock data UI (10 pages). SQLite + async SQLAlchemy, JWT auth, role-based access control. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
commit
439155c92e
290 files changed
+61950
No files matched your search
@@ -0,0 +1,16 @@
|
||||
from sqlalchemy import Column, Integer, String, Text, DateTime, func
|
||||
|
||||
from app.core.database import Base
|
||||
|
||||
|
||||
class AuditLog(Base):
|
||||
__tablename__ = "audit_logs"
|
||||
|
||||
id = Column(Integer, primary_key=True, autoincrement=True)
|
||||
user_id = Column(Integer, nullable=False)
|
||||
action = Column(String(50), nullable=False)
|
||||
target_type = Column(String(50), nullable=False) # ticket / instance / user / query
|
||||
target_id = Column(Integer, nullable=True)
|
||||
detail = Column(Text, nullable=True)
|
||||
ip_address = Column(String(50), nullable=True)
|
||||
created_at = Column(DateTime, server_default=func.now())
|
||||
Reference in new issue
Block a user