commit
This commit is contained in:
0
backend/app/schemas/__init__.py
Normal file
0
backend/app/schemas/__init__.py
Normal file
27
backend/app/schemas/ingredient.py
Normal file
27
backend/app/schemas/ingredient.py
Normal file
@@ -0,0 +1,27 @@
|
||||
|
||||
from typing import Optional, Dict, Any
|
||||
from uuid import UUID
|
||||
from datetime import datetime
|
||||
from app.models.ingredient import AssetType
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
|
||||
class IngredientBase(BaseModel):
|
||||
name: str
|
||||
type: AssetType
|
||||
metadata: Optional[Dict[str, Any]] = Field(default={}, validation_alias="metadata_")
|
||||
|
||||
class IngredientCreate(IngredientBase):
|
||||
project_id: UUID
|
||||
|
||||
class Ingredient(IngredientBase):
|
||||
id: UUID
|
||||
project_id: UUID
|
||||
s3_key: str
|
||||
s3_bucket: str
|
||||
thumbnail_key: Optional[str] = None
|
||||
created_at: datetime
|
||||
|
||||
# Computed fields or properties can be added here
|
||||
presigned_url: Optional[str] = None
|
||||
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
21
backend/app/schemas/project.py
Normal file
21
backend/app/schemas/project.py
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
from uuid import UUID
|
||||
from datetime import datetime
|
||||
from typing import Optional, List
|
||||
|
||||
class ProjectBase(BaseModel):
|
||||
name: str
|
||||
resolution: str = "4K"
|
||||
aspect_ratio: str = "16:9"
|
||||
veo_version: str = "3.1"
|
||||
|
||||
class ProjectCreate(ProjectBase):
|
||||
pass
|
||||
|
||||
class Project(ProjectBase):
|
||||
id: UUID
|
||||
created_at: datetime
|
||||
updated_at: datetime
|
||||
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
18
backend/app/schemas/script.py
Normal file
18
backend/app/schemas/script.py
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
from pydantic import BaseModel
|
||||
from typing import List, Optional
|
||||
|
||||
class ShotParsing(BaseModel):
|
||||
shot_number: str
|
||||
description: str
|
||||
visual_notes: Optional[str] = None
|
||||
dialogue: Optional[str] = None
|
||||
|
||||
class SceneParsing(BaseModel):
|
||||
scene_number: str
|
||||
heading: str
|
||||
description: str
|
||||
shots: List[ShotParsing] = []
|
||||
|
||||
class ScriptAnalysisResponse(BaseModel):
|
||||
scenes: List[SceneParsing]
|
||||
Reference in New Issue
Block a user