From 6b2f573c7d96fcb0eebd9ee6d865a381822d98a9 Mon Sep 17 00:00:00 2001 From: gabrielhrlima Date: Thu, 1 Aug 2024 14:44:36 -0300 Subject: [PATCH] Cria o model --- src/model/watchLaterModel.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/model/watchLaterModel.py diff --git a/src/model/watchLaterModel.py b/src/model/watchLaterModel.py new file mode 100644 index 0000000..04bc340 --- /dev/null +++ b/src/model/watchLaterModel.py @@ -0,0 +1,15 @@ +import uuid +from sqlalchemy import Boolean, Column, String +from sqlalchemy.orm import Session +from database import Base +from domain.watchLaterSchema import WatchLaterCreate +from fastapi import HTTPException + +class WatchLater(Base): + __tablename__ = 'watch_later' + id = Column(String, primary_key = True, index = True, default = lambda: str(uuid.uuid4())) + user_id =Column(String, index= True, nullable = False) + video_id = Column(String, index= True, nullable = False) + status = Column(Boolean, default = True) + + \ No newline at end of file