pzx-web-api/app/api/v1/schema/user.py
BryantHe 5a10303133
All checks were successful
continuous-integration/drone/push Build is passing
feat: add gender field
2023-08-26 12:40:23 +08:00

23 lines
489 B
Python

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