pzx-web-api/app/api/v1/schema/user.py
BryantHe 1bb276939a
All checks were successful
continuous-integration/drone/push Build is passing
feat: add input field user id
2023-08-23 11:11:15 +08:00

21 lines
445 B
Python

from apiflask import Schema
from apiflask.fields import String, Float, URL, Boolean
class UserInfoIn(Schema):
nickname = String()
height = Float()
is_hidden_weight = Boolean()
class UserIdIn(Schema):
user_id = String()
class UserInfoOut(Schema):
user_id = String(attribute='_id')
nickname = String()
avatar_id = String()
avatar_url = URL()
height = Float(allow_nan=True)
is_hidden_weight = Boolean()