feat: 基础 SignalR 服务器支持

This commit is contained in:
MingxuanGame
2025-07-24 18:45:08 +08:00
committed by GitHub
parent 6ed5a2d347
commit 1655bb9f53
28 changed files with 1394 additions and 644 deletions

29
app/models/oauth.py Normal file
View File

@@ -0,0 +1,29 @@
# OAuth 相关模型
from __future__ import annotations
from pydantic import BaseModel
class TokenRequest(BaseModel):
grant_type: str
username: str | None = None
password: str | None = None
refresh_token: str | None = None
client_id: str
client_secret: str
scope: str = "*"
class TokenResponse(BaseModel):
access_token: str
token_type: str = "Bearer"
expires_in: int
refresh_token: str
scope: str = "*"
class UserCreate(BaseModel):
username: str
password: str
email: str
country_code: str = "CN"