import uuid
from datetime import datetime

from sqlalchemy import func, Column, String, Boolean
from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column


class Base(DeclarativeBase):
    pass


class BaseMixin:
    #id = Column(String, primary_key=True, default=uuid.uuid4)
    id: Mapped[str] = mapped_column(primary_key=True, default=uuid.uuid4)
    # created_date = Column(DateTime)
    created_date: Mapped[datetime] = mapped_column(default=func.now())
    # last_modified_date = Column(DateTime)
    last_modified_date: Mapped[datetime] = mapped_column(default=func.now())
    # version = Column(Integer)
    version: Mapped[int] = mapped_column(default=0)


class BaseVideoMixin:
    cloud_link = Column(String, nullable=True)
    file_name = Column(String, nullable=True)
    path = Column(String)
    review = Column(Boolean)
    title = Column(String)
    url = Column(String, nullable=True)
    should_download = Column(Boolean)
