25 lines
710 B
Python
25 lines
710 B
Python
from datetime import date, datetime
|
|
from typing import Optional
|
|
|
|
from pydantic import Field
|
|
|
|
from common.enums import AuthProvider
|
|
from common.models.gmodel import Res_WebPacketProtocol, WebPacketProtocol
|
|
|
|
|
|
class AdminUser(WebPacketProtocol):
|
|
nickname: str
|
|
provider: AuthProvider
|
|
points: int = Field(description="모은 각 총량")
|
|
level: int
|
|
level_name: str
|
|
suspended: bool
|
|
created_at: datetime
|
|
last_active: Optional[date] = Field(None, description="각을 마지막으로 받은 날")
|
|
|
|
|
|
class Res_AdminUsers(Res_WebPacketProtocol):
|
|
total: int = 0
|
|
counts: dict[int, int] = Field({}, description="가입 경로(AuthProvider)별 인원")
|
|
items: list[AdminUser] = []
|