This commit is contained in:
@@ -6,8 +6,13 @@ class ImageIn(Schema):
|
||||
image = File()
|
||||
|
||||
|
||||
class DietImageIn(Schema):
|
||||
image = File()
|
||||
category = String()
|
||||
|
||||
|
||||
class ImagePreSignUrlIn(Schema):
|
||||
avatar_id = String(required=True)
|
||||
image_id = String(required=True)
|
||||
expire_time = Integer()
|
||||
|
||||
|
||||
@@ -15,3 +20,7 @@ class ImagePreSignUrlOut(Schema):
|
||||
image_presign_url = URL()
|
||||
|
||||
|
||||
class ImageIdOut(Schema):
|
||||
image_id = String()
|
||||
|
||||
|
||||
|
20
app/api/v1/schema/diet.py
Normal file
20
app/api/v1/schema/diet.py
Normal file
@@ -0,0 +1,20 @@
|
||||
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))
|
Reference in New Issue
Block a user