diff --git a/titles/idac/schema/item.py b/titles/idac/schema/item.py index b58cd4c..e3e4eba 100644 --- a/titles/idac/schema/item.py +++ b/titles/idac/schema/item.py @@ -269,6 +269,7 @@ round_info = Table( Column("count", Integer), Column("win", Integer), Column("points", Integer), + Column("play_dt", TIMESTAMP, server_default=func.now()), UniqueConstraint("user", "round_id", name="idac_user_round_info_uk"), mysql_charset="utf8mb4", ) @@ -831,6 +832,13 @@ class IDACItemData(BaseData): return None return result.fetchall() + def get_round_rank_by_id(self, aime_id: int, round_event_id: int) -> Optional[List[Row]]: + result = self.execute('call query_user_round_ranking(:aime_id, :round_event_id)', {'aime_id': aime_id, 'round_event_id': round_event_id}) + + if result is None: + return None + return result.fetchone() + def get_timetrial_event( self, aime_id: int, timetrial_event_id: int ) -> Optional[Row]: