feat: add api of body record chart
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-08-18 11:26:33 +08:00
parent a21bd3aef5
commit a55e4b97d6
3 changed files with 42 additions and 4 deletions

View File

@@ -22,4 +22,21 @@ class BodyRecordsIn(Schema):
class BodyRecordsOut(Schema):
records = fields.List(fields.Nested(BodyRecordOut))
records = fields.List(fields.Nested(BodyRecordOut))
class BodyRecordChartIn(Schema):
current_date = fields.String(required=True)
period = fields.String()
class BodyRecordChartNestedOut(Schema):
weights = fields.List(fields.Float())
bmis = fields.List(fields.Float())
x_axis = fields.List(fields.Float())
class BodyRecordChartOut(Schema):
chart_data = fields.Nested(BodyRecordChartNestedOut)
previous_date = fields.String()
next_date = fields.String()