pzx-web-api/app/api/v1/schema/record.py
BryantHe 3a871e5c74
All checks were successful
continuous-integration/drone/push Build is passing
fix: update body record list api
2023-08-13 21:08:29 +08:00

25 lines
554 B
Python

from apiflask import Schema
from apiflask import fields
class BodyRecordIn(Schema):
height = fields.Float()
weight = fields.Float()
bmi = fields.Float()
class BodyRecordOut(Schema):
record_id = fields.String(attribute='_id')
height = fields.Float()
weight = fields.Float()
bmi = fields.Float()
create_time = fields.String()
update_time = fields.String(allow_none=True)
class BodyRecordsIn(Schema):
sort = fields.String()
class BodyRecordsOut(Schema):
records = fields.List(fields.Nested(BodyRecordOut))