1
0

models.py 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. from django.db import models
  2. # Create your models here.
  3. #class ChannelSettings(models.Model):
  4. # id = models.AutoField(
  5. # primary_key = True,
  6. # )
  7. # channel = models.ForeignKey(
  8. # "stats.Channel",
  9. # on_delete = models.CASCADE,
  10. # to_field = "channel_id",
  11. # db_column = "channel",
  12. # )
  13. # interact = models.BooleanField(
  14. # default = False,
  15. # help_text = "Allow the robot to speak and interact with users."
  16. # )
  17. # class Meta:
  18. # managed = False
  19. # db_table = "channel_settings"
  20. # #verbose_name_plural = "accounts"
  21. #from stats import models as stats_models
  22. class GuildAccessToken(models.Model):
  23. id = models.AutoField(
  24. primary_key = True,
  25. )
  26. guild = models.ForeignKey(
  27. #stats_models.Guild,
  28. "stats.Guild",
  29. on_delete = models.CASCADE,
  30. to_field = "guild_id",
  31. db_column = "guild",
  32. )
  33. user = models.ForeignKey(
  34. "stats.User",
  35. on_delete = models.CASCADE,
  36. to_field = "user_id",
  37. db_column = "user",
  38. )
  39. token = models.CharField(
  40. max_length = 40,
  41. unique = True,
  42. )
  43. created = models.DateTimeField(
  44. auto_now_add = True,
  45. )
  46. class Meta:
  47. managed = False
  48. db_table = "guild_access_token"