commit
This commit is contained in:
30
backend/app/models/shot.py
Normal file
30
backend/app/models/shot.py
Normal file
@@ -0,0 +1,30 @@
|
||||
|
||||
from sqlalchemy import Column, String, Float, Integer, DateTime, func, ForeignKey, Text
|
||||
from sqlalchemy.dialects.postgresql import UUID, JSONB
|
||||
import uuid
|
||||
from sqlalchemy.orm import relationship
|
||||
|
||||
from app.db.session import Base
|
||||
|
||||
class Shot(Base):
|
||||
__tablename__ = "shots"
|
||||
|
||||
id = Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
|
||||
scene_id = Column(UUID(as_uuid=True), ForeignKey("scenes.id", ondelete="CASCADE"), nullable=False)
|
||||
description = Column(Text, nullable=False)
|
||||
duration = Column(Float, nullable=True)
|
||||
sequence_number = Column(Integer, nullable=True)
|
||||
|
||||
# Slot system: list of ingredient UUIDs
|
||||
assigned_ingredients = Column(JSONB, default=[])
|
||||
|
||||
# Context cache for debugging
|
||||
llm_context_cache = Column(Text, nullable=True)
|
||||
|
||||
# Final Veo payload
|
||||
veo_json_payload = Column(JSONB, nullable=True)
|
||||
|
||||
status = Column(String, default="draft") # draft, generating, ready
|
||||
updated_at = Column(DateTime, default=func.now(), onupdate=func.now())
|
||||
|
||||
scene = relationship("Scene", back_populates="shots")
|
||||
Reference in New Issue
Block a user