35 lines
1.1 KiB
Python
35 lines
1.1 KiB
Python
from datetime import datetime
|
|
from typing import Optional
|
|
|
|
from pydantic import Field
|
|
|
|
from common.models.gmodel import Res_WebPacketProtocol, WebPacketProtocol
|
|
|
|
|
|
class Req_ReelCreate(WebPacketProtocol):
|
|
title: str = Field(max_length=80, description="인스타 캡션 첫 줄")
|
|
caption: str = Field(default="", max_length=2000)
|
|
hashtags: str = Field(default="", max_length=600, description="인스타 캡션 뒤에 붙는 해시태그")
|
|
video: str = Field(description="mp4(H.264, 9:16), base64, 30MB 이하")
|
|
cover: Optional[str] = Field(default=None, description="표지 JPEG, base64 (없으면 인스타가 첫 장면을 쓴다)")
|
|
|
|
|
|
class Res_Reel(Res_WebPacketProtocol):
|
|
reel_id: Optional[int] = None
|
|
video_url: Optional[str] = None
|
|
cover_url: Optional[str] = None
|
|
ig_media_id: Optional[str] = None
|
|
|
|
|
|
class ReelItem(WebPacketProtocol):
|
|
reel_id: int
|
|
title: str
|
|
created_at: datetime
|
|
video_url: str
|
|
cover_url: Optional[str] = None
|
|
ig_media_id: Optional[str] = None
|
|
|
|
|
|
class Res_ReelList(Res_WebPacketProtocol):
|
|
items: list[ReelItem] = []
|