2023-08-15 17:49:05 +08:00
|
|
|
from apiflask import Schema
|
2023-08-23 10:57:14 +08:00
|
|
|
from apiflask.fields import String, Float, URL, Boolean
|
2023-08-15 17:49:05 +08:00
|
|
|
|
|
|
|
|
|
|
|
class UserInfoIn(Schema):
|
|
|
|
nickname = String()
|
|
|
|
height = Float()
|
2023-08-23 10:57:14 +08:00
|
|
|
is_hidden_weight = Boolean()
|
2023-08-15 17:49:05 +08:00
|
|
|
|
|
|
|
|
2023-08-23 11:11:15 +08:00
|
|
|
class UserIdIn(Schema):
|
|
|
|
user_id = String()
|
|
|
|
|
|
|
|
|
2023-08-15 17:49:05 +08:00
|
|
|
class UserInfoOut(Schema):
|
2023-08-23 10:57:14 +08:00
|
|
|
user_id = String(attribute='_id')
|
2023-08-15 17:49:05 +08:00
|
|
|
nickname = String()
|
2023-08-16 14:15:15 +08:00
|
|
|
avatar_id = String()
|
2023-08-19 12:31:22 +08:00
|
|
|
avatar_url = URL()
|
2023-08-23 10:57:14 +08:00
|
|
|
height = Float(allow_nan=True)
|
|
|
|
is_hidden_weight = Boolean()
|