feat: 重构模型和响应结构,优化用户和对象管理逻辑,添加 Dockerfile

This commit is contained in:
2025-12-18 18:28:41 +08:00
parent 68343c710b
commit 89e837d91c
18 changed files with 493 additions and 270 deletions

View File

@@ -3,12 +3,26 @@ from typing import TYPE_CHECKING
from sqlalchemy import Column, Text
from sqlmodel import Field, Relationship
from .base import TableBase
from .base import TableBase, SQLModelBase
if TYPE_CHECKING:
from .user import User
# ==================== DTO 模型 ====================
class AuthnResponse(SQLModelBase):
"""WebAuthn 响应 DTO"""
id: str
"""凭证ID"""
fingerprint: str
"""凭证指纹"""
# ==================== 数据库模型 ====================
class UserAuthn(TableBase, table=True):
"""用户 WebAuthn 凭证模型,与 User 为多对一关系"""