18 lines
523 B
Python
18 lines
523 B
Python
from datetime import datetime
|
|
|
|
from sqlalchemy import Column, DateTime, Integer, String
|
|
|
|
from database import Base
|
|
|
|
|
|
class Video(Base):
|
|
__tablename__ = "videos"
|
|
|
|
id = Column(Integer, primary_key=True, autoincrement=True)
|
|
title = Column(String, nullable=False)
|
|
youtuber = Column(String, nullable=False)
|
|
thumbnail_url = Column(String, nullable=False)
|
|
youtube_url = Column(String, nullable=False)
|
|
file_path = Column(String, nullable=True)
|
|
created_at = Column(DateTime, default=datetime.utcnow)
|