docs: 基本完成初版数据库设计

This commit is contained in:
R524809
2026-10-15 10:09:34 +08:00
parent 63a6993276
commit e6ded00a4c
41 changed files with 2597 additions and 180 deletions
+14
View File
@@ -0,0 +1,14 @@
import type { Request } from 'express';
/** 守卫核对账户后写入的身份,后续业务不能用客户端提交的 userId 替代它。 */
export interface AuthenticatedUser {
userId: string;
authVersion: number;
role: 'user' | 'admin';
}
/** 生命周期内共享的请求上下文;未经过中间件或鉴权时字段可能尚未赋值。 */
export type HttpRequest = Request & {
requestId?: string;
auth?: AuthenticatedUser;
};