22 lines
830 B
Python
22 lines
830 B
Python
|
|
from sqlalchemy import Column, String, DateTime, func, Text
|
|
from sqlalchemy.dialects.postgresql import UUID
|
|
import uuid
|
|
from sqlalchemy.orm import relationship
|
|
|
|
from app.db.session import Base
|
|
|
|
class Project(Base):
|
|
__tablename__ = "projects"
|
|
|
|
id = Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
|
|
name = Column(String, nullable=False)
|
|
resolution = Column(String, default="4K")
|
|
aspect_ratio = Column(String, default="16:9")
|
|
veo_version = Column(String, default="3.1")
|
|
created_at = Column(DateTime, default=func.now())
|
|
updated_at = Column(DateTime, default=func.now(), onupdate=func.now())
|
|
|
|
ingredients = relationship("Ingredient", back_populates="project", cascade="all, delete-orphan")
|
|
scenes = relationship("Scene", back_populates="project", cascade="all, delete-orphan")
|