chore: initial commit — leaudit-platform project skeleton
17-table PostgreSQL schema with full Chinese column comments, FastAPI project structure (admin/common/modules), DSL rule files, and schema migration scripts.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
"""BaseController —— 所有控制器继承此类。"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from fastapi import APIRouter
|
||||
|
||||
|
||||
class BaseController:
|
||||
"""控制器基类。
|
||||
|
||||
子类在 __init__ 中用 @self.router.get/post 注册路由。
|
||||
"""
|
||||
|
||||
def __init__(self, prefix: str = "", tags: list[str] | None = None):
|
||||
self.router = APIRouter(prefix=prefix, tags=tags or [])
|
||||
self.Init()
|
||||
|
||||
def Init(self) -> None:
|
||||
"""子类重写此方法注册路由。"""
|
||||
pass
|
||||
Reference in New Issue
Block a user