pzx-web-api/app/api/v1/schema/interaction.py

35 lines
838 B
Python
Raw Normal View History

2023-09-18 16:29:24 +08:00
from apiflask import Schema
from apiflask import fields
class InteractionIn(Schema):
category = fields.Integer()
receiver_id = fields.String()
related_party_id = fields.String(allow_none=True)
2023-09-19 17:15:07 +08:00
comment = fields.String(allow_none=True)
2023-09-20 11:59:51 +08:00
class InteractionBriefIn(Schema):
2023-09-19 17:15:07 +08:00
current_date = fields.String()
2023-09-20 11:59:51 +08:00
class InteractionListIn(Schema):
current_date = fields.String()
category = fields.Integer(required=True)
class InteractionBriefOut(Schema):
2023-09-19 17:15:07 +08:00
fire_count = fields.Integer()
heart_count = fields.Integer()
2023-09-20 11:59:51 +08:00
comment_count = fields.Integer()
class InteractionOut(Schema):
nickname = fields.String()
avatar_url = fields.String()
comment = fields.String()
create_time = fields.String()
class InteractionListOut(Schema):
interactions = fields.List(fields.Nested(InteractionOut))