from django.db import models # Create your models here. class Guild(models.Model): id = models.AutoField( primary_key = True, ) guild_id = models.BigIntegerField( #not_null = True, unique = True, ) class Meta: managed = False db_table = "guild" verbose_name_plural = "guilds" class Channel(models.Model): id = models.AutoField( primary_key = True, ) channel_id = models.BigIntegerField( #not_null = True, unique = True, ) guild = models.ForeignKey( 'Guild', on_delete = models.CASCADE, to_field = "guild_id", db_column = "guild", ) interact = models.BooleanField( default = False, ) games = models.BooleanField( default = False, ) class Meta: managed = False db_table = "channel" verbose_name_plural = "channels" class User(models.Model): id = models.AutoField( primary_key = True, ) user_id = models.BigIntegerField( unique = True, #not_null = True, )