mirror of
https://github.com/StepanovPlaton/torrent_backend.git
synced 2026-04-04 04:40:40 +04:00
Update game models
This commit is contained in:
14
database/models/users.py
Normal file
14
database/models/users.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from sqlalchemy import Column, Integer, String
|
||||
from sqlalchemy.orm import relationship
|
||||
|
||||
from ..database import Base
|
||||
|
||||
class User(Base):
|
||||
__tablename__ = "users"
|
||||
|
||||
id = Column(Integer, primary_key=True)
|
||||
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