pzx-web-api/app/api/v1/schema/user.py
BryantHe 721a5f1aa8
All checks were successful
continuous-integration/drone/push Build is passing
feat: add bodyinfo field age
2023-09-01 15:59:19 +08:00

25 lines
538 B
Python

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