pzx-web-api/app/api/v1/schema/api.py

27 lines
419 B
Python
Raw Normal View History

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
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()
category = String()
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()