pzx-web-api/app/api/v1/schema/interaction.py
BryantHe 5bc9e25c7a
All checks were successful
continuous-integration/drone/push Build is passing
feat: add api of get_interaction_list
2023-09-20 11:59:51 +08:00

35 lines
838 B
Python

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)
comment = fields.String(allow_none=True)
class InteractionBriefIn(Schema):
current_date = fields.String()
class InteractionListIn(Schema):
current_date = fields.String()
category = fields.Integer(required=True)
class InteractionBriefOut(Schema):
fire_count = fields.Integer()
heart_count = fields.Integer()
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))