2024-02-22 15:14:55 +01:00
|
|
|
from . import Base
|
|
|
|
|
from typing import Optional
|
|
|
|
|
from sqlalchemy import String, Column, JSON, Integer, DateTime
|
|
|
|
|
from sqlalchemy.ext.mutable import MutableList
|
|
|
|
|
from datetime import datetime
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Video(Base):
|
|
|
|
|
__tablename__ = "Videos"
|
|
|
|
|
|
|
|
|
|
id = Column(Integer, primary_key=True, autoincrement=True)
|
|
|
|
|
title: str = Column(String, nullable=False)
|
2024-02-22 18:03:00 +01:00
|
|
|
description: str = Column(String, nullable=False)
|
2024-02-22 15:14:55 +01:00
|
|
|
script: str = Column(String, nullable=False)
|
|
|
|
|
timed_script: dict = Column(MutableList.as_mutable(JSON), nullable=False)
|
|
|
|
|
timestamp: datetime = Column(DateTime, nullable=False, default=datetime.now())
|
|
|
|
|
path: str = Column(String, nullable=False)
|