修改main文件
新增统计api 新增统计请求模型
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
# scheme/statistics_scheme.py
|
||||
from pydantic import BaseModel, Field, EmailStr
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
|
||||
# ---------- 请求模型 ----------
|
||||
# class UserCreate(BaseModel):
|
||||
# username: str = Field(..., min_length=3, max_length=50)
|
||||
# email: EmailStr
|
||||
# full_name: Optional[str] = Field(None, max_length=100)
|
||||
#
|
||||
# class UserUpdate(BaseModel):
|
||||
# username: Optional[str] = Field(None, min_length=3, max_length=50)
|
||||
# email: Optional[EmailStr] = None
|
||||
# full_name: Optional[str] = Field(None, max_length=100)
|
||||
|
||||
# ---------- 响应模型 ----------
|
||||
# 多维度班级统计
|
||||
class StatsResponse(BaseModel):
|
||||
total_count: int
|
||||
man_count: int
|
||||
female_count: int
|
||||
Reference in New Issue
Block a user