Improved other models

This commit is contained in:
Sven Heidemann 2021-12-01 20:03:14 +01:00
parent 60172e0cfe
commit ce70e816fe
2 changed files with 4 additions and 4 deletions

View File

@ -72,12 +72,12 @@ class Server(TableABC):
UPDATE `Servers` UPDATE `Servers`
SET `DiscordServerId` = {self._discord_server_id}, SET `DiscordServerId` = {self._discord_server_id},
`LastModifiedAt` = '{self._modified_at}' `LastModifiedAt` = '{self._modified_at}'
WHERE `Id` = {self._id}; WHERE `Id` = {self._server_id};
""") """)
@property @property
def delete_string(self) -> str: def delete_string(self) -> str:
return str(f""" return str(f"""
DELETE FROM `Servers` DELETE FROM `Servers`
WHERE `Id` = {self._id}; WHERE `Id` = {self._server_id};
""") """)

View File

@ -93,12 +93,12 @@ class User(TableABC):
UPDATE `Users` UPDATE `Users`
SET `XP` = {self._xp}, SET `XP` = {self._xp},
`LastModifiedAt` = '{self._modified_at}' `LastModifiedAt` = '{self._modified_at}'
WHERE `Id` = {self._id}; WHERE `Id` = {self._user_id};
""") """)
@property @property
def delete_string(self) -> str: def delete_string(self) -> str:
return str(f""" return str(f"""
DELETE FROM `Users` DELETE FROM `Users`
WHERE `Id` = {self._id}; WHERE `Id` = {self._user_id};
""") """)