2024-03-11 22:42:58 +00:00

38 lines
2.4 KiB
Python

# Generated by Django 5.0.1 on 2024-03-11 17:38
import apps.authentication.managers
import django.utils.timezone
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='DiscordUser',
fields=[
('id', models.PositiveBigIntegerField(help_text="the user's id", primary_key=True, serialize=False)),
('username', models.CharField(help_text="the user's username, not unique across the platform", max_length=32, unique=True, verbose_name='username')),
('global_name', models.CharField(help_text="the user's display name, if it is set. For bots, this is the application name", max_length=32, verbose_name='nickname')),
('avatar', models.CharField(help_text="the user's avatar hash", max_length=64, verbose_name='avatar')),
('public_flags', models.IntegerField(help_text="the public flags on a user's account", verbose_name='public flags')),
('flags', models.IntegerField(help_text="the flags on a user's account", verbose_name='flags')),
('locale', models.CharField(help_text="the user's chosen language option", max_length=16, verbose_name='locale')),
('mfa_enabled', models.BooleanField(help_text='whether the user has two factor enabled on their account', verbose_name='mfa enabled')),
('last_login', models.DateTimeField(default=django.utils.timezone.now, help_text='datetime of the previous login', verbose_name='last login')),
('access_token', models.CharField(help_text='token for the application to make api calls on behalf of the user.', max_length=100, verbose_name='access token')),
('is_active', models.BooleanField(default=True, help_text='Use as a "soft delete" rather than deleting the user.', verbose_name='active status')),
('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
('is_superuser', models.BooleanField(default=False, help_text='Designates whether the user has unrestricted site control.', verbose_name='superuser status')),
],
managers=[
('objects', apps.authentication.managers.DiscordUserOAuth2Manager()),
],
),
]