21 lines
445 B
Python
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() |