from django.db import models # Create your models here. #class ChannelSettings(models.Model): # id = models.AutoField( # primary_key = True, # ) # channel = models.ForeignKey( # "stats.Channel", # on_delete = models.CASCADE, # to_field = "channel_id", # db_column = "channel", # ) # interact = models.BooleanField( # default = False, # help_text = "Allow the robot to speak and interact with users." # ) # class Meta: # managed = False # db_table = "channel_settings" # #verbose_name_plural = "accounts" #from stats import models as stats_models class GuildAccessToken(models.Model): id = models.AutoField( primary_key = True, ) guild = models.ForeignKey( #stats_models.Guild, "stats.Guild", on_delete = models.CASCADE, to_field = "guild_id", db_column = "guild", ) user = models.ForeignKey( "stats.User", on_delete = models.CASCADE, to_field = "user_id", db_column = "user", ) token = models.CharField( max_length = 40, unique = True, ) created = models.DateTimeField( auto_now_add = True, ) class Meta: managed = False db_table = "guild_access_token"