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`
SET `DiscordServerId` = {self._discord_server_id},
`LastModifiedAt` = '{self._modified_at}'
WHERE `Id` = {self._id};
WHERE `Id` = {self._server_id};
""")
@property
def delete_string(self) -> str:
return str(f"""
DELETE FROM `Servers`
WHERE `Id` = {self._id};
WHERE `Id` = {self._server_id};
""")

View File

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