mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-27 13:34:28 +00:00
Add new db tables
This commit is contained in:
parent
8d470389b7
commit
fba5673a9a
1 changed files with 25 additions and 0 deletions
25
db.py
25
db.py
|
@ -799,11 +799,36 @@ class Event(Base):
|
||||||
self.time = datetime.datetime.now() + value
|
self.time = datetime.datetime.now() + value
|
||||||
|
|
||||||
|
|
||||||
|
class Reddit(Base):
|
||||||
|
__tablename__ = "reddit"
|
||||||
|
|
||||||
|
royal_id = Column(Integer, ForeignKey("royals.id"))
|
||||||
|
royal = relationship("Royal", backref="reddit", lazy="joined")
|
||||||
|
|
||||||
|
username = Column(String)
|
||||||
|
karma = Column(BigInteger)
|
||||||
|
|
||||||
|
|
||||||
|
class GameLog(Base):
|
||||||
|
__tablename__ = "gamelog"
|
||||||
|
|
||||||
|
royal_id = Column(Integer, ForeignKey("royals.id"))
|
||||||
|
royal = relationship("Royal", backref="gamelog", lazy="joined")
|
||||||
|
|
||||||
|
username = Column(String)
|
||||||
|
owned_games = Column(Integer)
|
||||||
|
unfinished_games = Column(Integer)
|
||||||
|
beaten_games = Column(Integer)
|
||||||
|
completed_games = Column(Integer)
|
||||||
|
mastered_games = Column(Integer)
|
||||||
|
|
||||||
|
|
||||||
class ParsedRedditPost(Base):
|
class ParsedRedditPost(Base):
|
||||||
__tablename__ = "parsedredditposts"
|
__tablename__ = "parsedredditposts"
|
||||||
|
|
||||||
id = Column(String, primary_key=True)
|
id = Column(String, primary_key=True)
|
||||||
|
|
||||||
|
author_username = Column(String)
|
||||||
|
|
||||||
|
|
||||||
# If run as script, create all the tables in the db
|
# If run as script, create all the tables in the db
|
||||||
|
|
Loading…
Reference in a new issue