feat: add api of body record
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
25
app/api/v1/schema/record.py
Normal file
25
app/api/v1/schema/record.py
Normal file
@@ -0,0 +1,25 @@
|
||||
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):
|
||||
user_id = fields.String()
|
||||
|
||||
|
||||
class BodyRecordsOut(Schema):
|
||||
records = fields.Nested(BodyRecordOut)
|
Reference in New Issue
Block a user