mirror of
https://github.com/StepanovPlaton/torrent_backend.git
synced 2026-04-03 20:30:38 +04:00
Work on game edit
This commit is contained in:
@@ -3,6 +3,7 @@ from sqlalchemy.orm import relationship
|
||||
|
||||
from ..database import Base
|
||||
|
||||
|
||||
class Game(Base):
|
||||
__tablename__ = "games"
|
||||
|
||||
@@ -28,4 +29,3 @@ class Game(Base):
|
||||
download_size = Column(String)
|
||||
|
||||
owner_id = Column(Integer, ForeignKey("users.id"))
|
||||
owner = relationship("User", back_populates="games")
|
||||
|
||||
@@ -3,6 +3,7 @@ from sqlalchemy.orm import relationship
|
||||
|
||||
from ..database import Base
|
||||
|
||||
|
||||
class User(Base):
|
||||
__tablename__ = "users"
|
||||
|
||||
@@ -10,5 +11,3 @@ class User(Base):
|
||||
email = Column(String, nullable=False, unique=True)
|
||||
name = Column(String, nullable=False)
|
||||
hash_of_password = Column(String, nullable=False)
|
||||
|
||||
games = relationship("Game", back_populates="owner")
|
||||
|
||||
Reference in New Issue
Block a user