2023-08-15 17:49:05 +08:00
|
|
|
from apiflask import Schema
|
2023-09-01 15:59:19 +08:00
|
|
|
from apiflask.fields import String, Float, URL, Boolean, Integer
|
2023-08-15 17:49:05 +08:00
|
|
|
|
|
|
|
|
|
|
|
class UserInfoIn(Schema):
|
|
|
|
nickname = String()
|
2023-08-26 12:40:23 +08:00
|
|
|
gender = String()
|
2023-09-01 15:59:19 +08:00
|
|
|
age = Integer()
|
2023-08-15 17:49:05 +08:00
|
|
|
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-26 12:40:23 +08:00
|
|
|
gender = String()
|
2023-09-01 15:59:19 +08:00
|
|
|
age = Integer()
|
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()
|