20 lines
496 B
Python
20 lines
496 B
Python
|
from apiflask import Schema
|
||
|
from apiflask import fields
|
||
|
|
||
|
|
||
|
class DietRecordsIn(Schema):
|
||
|
sort = fields.String()
|
||
|
current_date = fields.String()
|
||
|
|
||
|
|
||
|
class DietRecordOut(Schema):
|
||
|
diet_id = fields.String(attribute='_id')
|
||
|
category = fields.String()
|
||
|
diet_image_id = fields.String()
|
||
|
diet_image_url = fields.URL()
|
||
|
create_time = fields.String()
|
||
|
update_time = fields.String(allow_none=True)
|
||
|
|
||
|
|
||
|
class DietRecordsOut(Schema):
|
||
|
records = fields.List(fields.Nested(DietRecordOut))
|