2023-08-10 12:27:18 +08:00
|
|
|
from apiflask import Schema
|
2023-08-16 17:13:52 +08:00
|
|
|
from apiflask.fields import File, URL, String, Integer
|
2023-08-10 12:27:18 +08:00
|
|
|
|
|
|
|
|
2023-08-16 14:15:15 +08:00
|
|
|
class ImageIn(Schema):
|
|
|
|
image = File()
|
2023-08-10 12:27:18 +08:00
|
|
|
|
|
|
|
|
2023-09-15 18:00:17 +08:00
|
|
|
class DietImageIn(Schema):
|
|
|
|
image = File()
|
2023-09-20 16:09:05 +08:00
|
|
|
category = Integer()
|
2023-09-15 18:00:17 +08:00
|
|
|
|
|
|
|
|
2023-08-16 17:13:52 +08:00
|
|
|
class ImagePreSignUrlIn(Schema):
|
2023-09-15 18:00:17 +08:00
|
|
|
image_id = String(required=True)
|
2023-08-16 17:13:52 +08:00
|
|
|
expire_time = Integer()
|
|
|
|
|
|
|
|
|
|
|
|
class ImagePreSignUrlOut(Schema):
|
2023-08-16 17:21:50 +08:00
|
|
|
image_presign_url = URL()
|
2023-08-10 12:27:18 +08:00
|
|
|
|
|
|
|
|
2023-09-15 18:00:17 +08:00
|
|
|
class ImageIdOut(Schema):
|
|
|
|
image_id = String()
|
|
|
|
|
|
|
|
|