# Generated by Django 3.2.18 on 2023-04-02 16:23 from django.db import migrations, models import django.db.models.deletion import uuid class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Account', fields=[ ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')), ('update_time', models.DateTimeField(auto_now=True, verbose_name='更新时间')), ('name', models.CharField(max_length=20, unique=True)), ('real_name', models.CharField(max_length=10, null=True)), ('phone', models.CharField(max_length=11, null=True, unique=True)), ('password', models.CharField(max_length=20)), ('email', models.CharField(max_length=30, null=True, unique=True)), ('gender', models.IntegerField(choices=[(0, 'Unknown'), (1, 'Female'), (2, 'Male')], default=0)), ('avatar_url', models.CharField(max_length=255, null=True)), ('signature', models.CharField(max_length=255, null=True)), ('title_name', models.CharField(max_length=20, null=True)), ('is_active', models.BooleanField(default=True)), ], options={ 'db_table': 'account_account', }, ), migrations.CreateModel( name='Role', fields=[ ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')), ('update_time', models.DateTimeField(auto_now=True, verbose_name='更新时间')), ('role', models.CharField(choices=[('admin', 'Admin'), ('teacher', 'Teacher'), ('tourist', 'Tourist'), ('user', 'User')], default='user', max_length=20)), ('description', models.CharField(max_length=255, null=True)), ('is_active', models.BooleanField(default=True)), ('accounts', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='account.account')), ], options={ 'db_table': 'account_role', }, ), migrations.CreateModel( name='Auth', fields=[ ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')), ('update_time', models.DateTimeField(auto_now=True, verbose_name='更新时间')), ('type', models.CharField(choices=[('admin', 'Admin'), ('super admin', 'Superadmin'), ('common', 'Common'), ('contest', 'Contest')], default='common', max_length=20)), ('permission', models.CharField(max_length=50)), ('is_active', models.BooleanField(default=True)), ('roles', models.ManyToManyField(to='account.Role')), ], options={ 'db_table': 'account_auth', }, ), ]