pzx-web-api/app/api/v1/schema/record.py
BryantHe 539deb18d2
All checks were successful
continuous-integration/drone/push Build is passing
feat: add api of body record 4
2023-08-12 20:30:02 +08:00

21 lines
483 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 BodyRecordsOut(Schema):
records = fields.Nested(BodyRecordOut)