Skip to content

Commit

Permalink
prepare for tables
Browse files Browse the repository at this point in the history
  • Loading branch information
TrueRou committed Sep 24, 2023
1 parent 4e8bce2 commit 615f2ae
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
13 changes: 13 additions & 0 deletions app/repositories/addition/scores_foreign.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from app.state.services import orm_base
from sqlalchemy import Column, Integer, String, Boolean, DateTime, text

class ScoresForeign(orm_base):
__tablename__ = "scores_foreign"

id = Column(Integer, primary_key=True)
server = Column(String(32), nullable=False)
original_score_id = Column(Integer, nullable=False)
original_player_id = Column(Integer, nullable=False)
recipient_id = Column(Integer, nullable=False)
has_replay = Column(Boolean, nullable=False)
receipt_time = Column(DateTime, nullable=False, server_default=text("now()"))
11 changes: 11 additions & 0 deletions app/repositories/addition/scores_suspicion.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from app.state.services import orm_base
from sqlalchemy import Column, Integer, String, Boolean, DateTime, JSON, text

class ScoresSuspicion(orm_base):
__tablename__ = "scores_suspicion"

score_id = Column(Integer, primary_key=True)
suspicion_reason = Column(String(128), nullable=False)
ignored = Column(Boolean, nullable=False, default=False)
circleguard_detail = Column(JSON, nullable=True)
datetime = Column(DateTime, nullable=False, server_default=text("now()"))
9 changes: 9 additions & 0 deletions app/repositories/addition/username_history.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from app.state.services import orm_base
from sqlalchemy import Column, Integer, String, DateTime, text

class UsernameHistory(orm_base):
__tablename__ = "username_history"

user_id = Column(Integer, primary_key=True)
change_date = Column(DateTime, primary_key=True, nullable=False, server_default=text("now()"))
username = Column(String(32), nullable=False)

0 comments on commit 615f2ae

Please sign in to comment.