This commit is contained in:
Marek
2026-04-04 23:04:10 +02:00
parent 823adb707d
commit d789a31642
15 changed files with 232 additions and 0 deletions

17
backend/models.py Normal file
View File

@@ -0,0 +1,17 @@
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, unique=True)
file_path = Column(String, nullable=True)
created_at = Column(DateTime, default=datetime.utcnow)