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,22 @@
|
||||
from sqlalchemy import Column, Integer, String, Text, DateTime, func
|
||||
|
||||
from app.core.database import Base
|
||||
|
||||
|
||||
class Instance(Base):
|
||||
__tablename__ = "instances"
|
||||
|
||||
id = Column(Integer, primary_key=True, autoincrement=True)
|
||||
name = Column(String(100), nullable=False)
|
||||
db_type = Column(String(20), nullable=False) # mysql / postgres / redis / mongo
|
||||
host = Column(String(200), nullable=False)
|
||||
port = Column(Integer, nullable=False)
|
||||
username = Column(String(100), nullable=False)
|
||||
password = Column(String(500), nullable=False) # encrypted
|
||||
database = Column(String(100), nullable=True)
|
||||
env = Column(String(20), default="development") # production / staging / development
|
||||
description = Column(Text, nullable=True)
|
||||
status = Column(String(20), default="disconnected") # connected / disconnected / error
|
||||
version = Column(String(50), nullable=True)
|
||||
created_at = Column(DateTime, server_default=func.now())
|
||||
updated_at = Column(DateTime, server_default=func.now(), onupdate=func.now())
|
||||
Reference in new issue
Block a user