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" class GuildAccessToken(models.Model): id = models.AutoField( primary_key = True, ) guild = models.ForeignKey( "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, #not_null = True, ) token varchar[40] UNIQUE NOT NULL, \ created TIMESTAMP NOT NULL DEFAULT now()\