2020-11-08 01:07:27 +01:00
|
|
|
import tortoise
|
|
|
|
from tortoise import fields
|
|
|
|
|
|
|
|
|
|
|
|
class AliasesModel(tortoise.Model):
|
|
|
|
id = fields.BigIntField(pk=True)
|
|
|
|
user_id = fields.BigIntField()
|
|
|
|
alias = fields.TextField(max_length=255)
|
|
|
|
command = fields.TextField(max_length=255)
|
|
|
|
guild = fields.BigIntField()
|
|
|
|
|
|
|
|
class Meta:
|
|
|
|
table = "aliases"
|
|
|
|
|
|
|
|
def __str__(self):
|
2020-11-09 01:18:55 +01:00
|
|
|
return (
|
|
|
|
f"<AliasesModel id={self.id} "
|
|
|
|
f"user_id={self.user_id} "
|
|
|
|
f"alias='{self.alias}' "
|
|
|
|
f"command='{self.command}' "
|
|
|
|
f"guild={self.guild}>"
|
|
|
|
)
|
2020-11-08 01:07:27 +01:00
|
|
|
|
|
|
|
__repr__ = __str__
|