let black do it's magic

This commit is contained in:
2023-03-09 11:38:58 -05:00
parent fa7206848c
commit a76bb94eb1
150 changed files with 8474 additions and 4843 deletions

View File

@ -15,11 +15,13 @@ gp_log = Table(
Column("usedCredit", Integer),
Column("placeName", String(255)),
Column("trxnDate", String(255)),
Column("placeId", Integer), # Making this an FK would mess with people playing with default KC
Column("kind", Integer),
Column("pattern", Integer),
Column(
"placeId", Integer
), # Making this an FK would mess with people playing with default KC
Column("kind", Integer),
Column("pattern", Integer),
Column("currentGP", Integer),
mysql_charset='utf8mb4'
mysql_charset="utf8mb4",
)
session_log = Table(
@ -32,12 +34,22 @@ session_log = Table(
Column("playDate", String(10)),
Column("userPlayDate", String(25)),
Column("isPaid", Boolean),
mysql_charset='utf8mb4'
mysql_charset="utf8mb4",
)
class OngekiLogData(BaseData):
def put_gp_log(self, aime_id: Optional[int], used_credit: int, place_name: str, tx_date: str, place_id: int,
kind: int, pattern: int, current_gp: int) -> Optional[int]:
def put_gp_log(
self,
aime_id: Optional[int],
used_credit: int,
place_name: str,
tx_date: str,
place_id: int,
kind: int,
pattern: int,
current_gp: int,
) -> Optional[int]:
sql = insert(gp_log).values(
user=aime_id,
usedCredit=used_credit,
@ -51,5 +63,7 @@ class OngekiLogData(BaseData):
result = self.execute(sql)
if result is None:
self.logger.warn(f"put_gp_log: Failed to insert GP log! aime_id: {aime_id} kind {kind} pattern {pattern} current_gp {current_gp}")
return result.lastrowid
self.logger.warn(
f"put_gp_log: Failed to insert GP log! aime_id: {aime_id} kind {kind} pattern {pattern} current_gp {current_gp}"
)
return result.lastrowid