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:
loganandClaude Opus 4.7 committed 2026-05-22 11:11:57 +08:00
commit 439155c92e
290 files changed
+61950

No files matched your search

+40
View File
@@ -0,0 +1,40 @@
from datetime import datetime
from pydantic import BaseModel, Field
from typing import Optional
class UserCreate(BaseModel):
username: str = Field(..., min_length=2, max_length=50)
display_name: str = Field(..., min_length=1, max_length=100)
password: str = Field(..., min_length=6)
email: Optional[str] = None
phone: Optional[str] = None
role: str = Field(default="developer", pattern="^(admin|dba|developer|guest)$")
class UserUpdate(BaseModel):
display_name: Optional[str] = None
email: Optional[str] = None
phone: Optional[str] = None
role: Optional[str] = Field(default=None, pattern="^(admin|dba|developer|guest)$")
is_active: Optional[bool] = None
class UserResponse(BaseModel):
id: int
username: str
display_name: str
email: Optional[str] = None
phone: Optional[str] = None
role: str
is_active: bool
last_login: Optional[datetime] = None
created_at: datetime
class Config:
from_attributes = True
class PasswordChange(BaseModel):
old_password: str
new_password: str = Field(..., min_length=6)