class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='CustomUser',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('patronymic',
                 models.CharField(blank='True',
                                  max_length=50,
                                  verbose_name='Отчество')),
                ('phone',
                 models.CharField(blank=True,
                                  max_length=20,
                                  verbose_name='Номер телефона')),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Auto',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('number',
                 models.CharField(max_length=15, verbose_name='Гос. номер')),
                ('brand', models.CharField(max_length=30,
                                           verbose_name='Марка')),
                ('model', models.CharField(max_length=30,
                                           verbose_name='Модель')),
                ('year', models.IntegerField(verbose_name='Год выпуска')),
                ('tech_passport',
                 models.CharField(max_length=20,
                                  unique=True,
                                  verbose_name='Тех. паспорт')),
                ('owner',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='autos',
                                   to=settings.AUTH_USER_MODEL,
                                   verbose_name='Владелец')),
            ],
            options={
                'verbose_name': 'Автомобиль',
                'verbose_name_plural': 'Автомобили',
            },
        ),
        migrations.CreateModel(
            name='Employee',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('first_name',
                 models.CharField(max_length=50, verbose_name='Имя')),
                ('last_name',
                 models.CharField(max_length=50, verbose_name='Фамилия')),
                ('patronymic',
                 models.CharField(blank=True,
                                  max_length=50,
                                  verbose_name='Отчество')),
                ('phone',
                 models.CharField(blank=True,
                                  max_length=20,
                                  verbose_name='Номер телефона')),
            ],
            options={
                'verbose_name': 'Работник',
                'verbose_name_plural': 'Работники',
            },
        ),
        migrations.CreateModel(
            name='Workshop',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('number',
                 models.IntegerField(unique=True, verbose_name='Номер')),
                ('address',
                 models.CharField(max_length=50, verbose_name='Адрес')),
            ],
            options={
                'verbose_name': 'Мастерская',
                'verbose_name_plural': 'Мастерские',
            },
        ),
        migrations.CreateModel(
            name='Work',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('date_beg', models.DateField(verbose_name='Дата начала')),
                ('date_end',
                 models.DateField(blank=True, verbose_name='Дата завершения')),
                ('description',
                 models.TextField(verbose_name='Описание работ')),
                ('price',
                 models.FloatField(blank=True, verbose_name='Стоимость')),
                ('auto',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='auto_works',
                     to='django_app.Auto',
                     verbose_name='Автомобиль')),
                ('employee',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='employee_works',
                     to='django_app.Employee',
                     verbose_name='Работник')),
            ],
            options={
                'verbose_name': 'Ремонтная работа',
                'verbose_name_plural': 'Ремонтные работы',
            },
        ),
        migrations.CreateModel(
            name='Served_brands',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('brand',
                 models.CharField(db_index=True,
                                  max_length=30,
                                  verbose_name='Обслуживаемая марка')),
                ('workshop',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='brands',
                                   to='django_app.Workshop',
                                   verbose_name='Мастерская')),
            ],
            options={
                'verbose_name': 'Обслуживаемая марка',
                'verbose_name_plural': 'Обслуживаемые марки',
            },
        ),
        migrations.AddField(
            model_name='employee',
            name='autos',
            field=models.ManyToManyField(related_name='employees',
                                         through='django_app.Work',
                                         to='django_app.Auto',
                                         verbose_name='Ремонтные работы'),
        ),
        migrations.AddField(
            model_name='employee',
            name='workshop',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='django_app.Workshop',
                verbose_name='Мастерская'),
        ),
        migrations.CreateModel(
            name='Application',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('date', models.DateField(verbose_name='Дата записи')),
                ('status',
                 models.CharField(choices=[('cons', 'В рассмотрении'),
                                           ('conf', 'Подтверждено'),
                                           ('refs', 'Отклонено')],
                                  max_length=4)),
                ('date_init',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='Дата создания')),
                ('description', models.TextField(verbose_name='Описание')),
                ('auto',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='applications',
                                   to='django_app.Auto',
                                   verbose_name='Автомобиль')),
                ('workshop',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='django_app.Workshop',
                                   verbose_name='Мастерская')),
            ],
            options={
                'verbose_name': 'Заявка на ремонт',
                'verbose_name_plural': 'Заявки на ремонт',
            },
        ),
    ]
Esempio n. 2
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='GlobalUser',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('phone_number',
                 models.CharField(blank=True, max_length=16, null=True)),
                ('age',
                 models.PositiveSmallIntegerField(blank=True,
                                                  default=0,
                                                  null=True)),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
    ]
Esempio n. 3
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('email', models.EmailField(max_length=254, unique=True)),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='BankAccountType',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=128)),
            ],
        ),
        migrations.CreateModel(
            name='UserBankAccount',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('account_no', models.PositiveIntegerField(unique=True)),
                ('gender',
                 models.CharField(choices=[('M', 'Male'), ('F', 'Female')],
                                  max_length=1)),
                ('birth_date', models.DateField(blank=True, null=True)),
                ('balance',
                 models.DecimalField(decimal_places=2,
                                     default=0,
                                     max_digits=12)),
                ('initial_deposit_date', models.DateField(blank=True,
                                                          null=True)),
                ('account_type',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='accounts',
                                   to='accounts.bankaccounttype')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='account',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Esempio n. 4
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0008_alter_user_username_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='UserInfo',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('gender',
                 models.CharField(choices=[('0', '男'), ('1', '女')],
                                  max_length=1,
                                  verbose_name='性别')),
                ('mobile',
                 models.CharField(blank=True,
                                  max_length=11,
                                  null=True,
                                  verbose_name='电话')),
                ('image',
                 models.ImageField(default='default.png',
                                   max_length=225,
                                   upload_to='image/%Y/%m',
                                   verbose_name='头像')),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': '用户信息',
                'verbose_name_plural': '用户信息',
                'db_table': 'user_info',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('content', models.TextField(verbose_name='评论内容')),
                ('publish_time',
                 models.DateTimeField(default=datetime.datetime.now,
                                      verbose_name='评论时间')),
                ('state', models.BooleanField(default=True,
                                              verbose_name='审核状态')),
                ('ip', models.GenericIPAddressField(verbose_name='用户IP地址')),
            ],
            options={
                'verbose_name': '评论',
                'verbose_name_plural': '评论',
                'db_table': 'comment',
            },
        ),
        migrations.CreateModel(
            name='Content',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=100, verbose_name='标题')),
                ('picture', models.CharField(max_length=20,
                                             verbose_name='标签')),
                ('content', models.TextField(verbose_name='内容')),
                ('image',
                 models.ImageField(default='default.png',
                                   max_length=255,
                                   upload_to='image/%Y/%m',
                                   verbose_name='文章图片')),
                ('publish_time',
                 models.DateTimeField(default=datetime.datetime.now,
                                      verbose_name='发布时间')),
                ('clicked', models.IntegerField(default=0,
                                                verbose_name='点击量')),
            ],
            options={
                'verbose_name': '文章内容',
                'verbose_name_plural': '文章内容',
                'db_table': 'content',
            },
        ),
        migrations.CreateModel(
            name='Type',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=20, verbose_name='新闻类型')),
            ],
            options={
                'verbose_name': '新闻类型',
                'verbose_name_plural': '新闻类型',
                'db_table': 'news_type',
            },
        ),
        migrations.AddField(
            model_name='content',
            name='type_id',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='context',
                to='app.Type',
                verbose_name='新闻类型'),
        ),
        migrations.AddField(
            model_name='content',
            name='user_id',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='context',
                to=settings.AUTH_USER_MODEL,
                verbose_name='用户'),
        ),
        migrations.AddField(
            model_name='comment',
            name='news_id',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='app.Content',
                verbose_name='新闻'),
        ),
        migrations.AddField(
            model_name='comment',
            name='user_id',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL,
                verbose_name='用户'),
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('auth', '0008_alter_user_username_max_length'),
        ('bookapi', '0009_remove_user_image'),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='user',
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users'
            },
        ),
        migrations.AlterModelManagers(
            name='user',
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.AddField(
            model_name='user',
            name='date_joined',
            field=models.DateTimeField(default=django.utils.timezone.now,
                                       verbose_name='date joined'),
        ),
        migrations.AddField(
            model_name='user',
            name='first_name',
            field=models.CharField(blank=True,
                                   max_length=30,
                                   verbose_name='first name'),
        ),
        migrations.AddField(
            model_name='user',
            name='groups',
            field=models.ManyToManyField(
                blank=True,
                help_text=
                'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                related_name='user_set',
                related_query_name='user',
                to='auth.Group',
                verbose_name='groups'),
        ),
        migrations.AddField(
            model_name='user',
            name='is_active',
            field=models.BooleanField(
                default=True,
                help_text=
                'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                verbose_name='active'),
        ),
        migrations.AddField(
            model_name='user',
            name='is_staff',
            field=models.BooleanField(
                default=False,
                help_text=
                'Designates whether the user can log into this admin site.',
                verbose_name='staff status'),
        ),
        migrations.AddField(
            model_name='user',
            name='is_superuser',
            field=models.BooleanField(
                default=False,
                help_text=
                'Designates that this user has all permissions without explicitly assigning them.',
                verbose_name='superuser status'),
        ),
        migrations.AddField(
            model_name='user',
            name='last_login',
            field=models.DateTimeField(blank=True,
                                       null=True,
                                       verbose_name='last login'),
        ),
        migrations.AddField(
            model_name='user',
            name='last_name',
            field=models.CharField(blank=True,
                                   max_length=30,
                                   verbose_name='last name'),
        ),
        migrations.AddField(
            model_name='user',
            name='user_permissions',
            field=models.ManyToManyField(
                blank=True,
                help_text='Specific permissions for this user.',
                related_name='user_set',
                related_query_name='user',
                to='auth.Permission',
                verbose_name='user permissions'),
        ),
        migrations.AlterField(
            model_name='user',
            name='username',
            field=models.CharField(max_length=100, unique=True),
        ),
    ]
Esempio n. 6
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('mobile',
                 models.CharField(max_length=11,
                                  null=True,
                                  unique=True,
                                  verbose_name='手机号')),
                ('nickname',
                 models.CharField(max_length=100, null=True,
                                  verbose_name='昵称')),
                ('realname',
                 models.CharField(max_length=100,
                                  null=True,
                                  verbose_name='真实名称')),
                ('avatar',
                 models.CharField(max_length=500,
                                  null=True,
                                  verbose_name='用户头像')),
                ('sex',
                 models.SmallIntegerField(choices=[(1, '男'), (2, '女')],
                                          default=1,
                                          verbose_name='性别')),
                ('birthday', models.DateField(null=True,
                                              verbose_name='出生年月日')),
                ('website',
                 models.CharField(max_length=100,
                                  null=True,
                                  verbose_name='个人网站')),
                ('city',
                 models.CharField(max_length=100,
                                  null=True,
                                  verbose_name='现居城市')),
                ('address',
                 models.CharField(max_length=100,
                                  null=True,
                                  verbose_name='联系住址')),
                ('update_date',
                 models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('fans',
                 models.ManyToManyField(null=True,
                                        related_name='idols',
                                        to=settings.AUTH_USER_MODEL)),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': '用户',
                'verbose_name_plural': '用户',
                'db_table': 'tb_user',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='OAuthWeixinUser',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('openid',
                 models.CharField(db_index=True,
                                  max_length=64,
                                  verbose_name='openid')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL,
                                   verbose_name='用户')),
            ],
            options={
                'verbose_name': '微信登录用户数据',
                'verbose_name_plural': '微信登录用户数据',
                'db_table': 'tb_oauth_weixin',
            },
        ),
    ]
Esempio n. 7
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0007_alter_validators_add_error_messages'),
    ]

    operations = [
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=30,
                     unique=True,
                     validators=[
                         django.core.validators.RegexValidator(
                             '^[\\w.@+-]+$',
                             'Enter a valid username. This value may contain only letters, numbers and @/./+/-/_ characters.'
                         )
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('nick_name',
                 models.CharField(default='',
                                  max_length=50,
                                  verbose_name='\u6635\u79f0')),
                ('birday',
                 models.DateField(blank=True,
                                  null=True,
                                  verbose_name='\u751f\u65e5')),
                ('gender',
                 models.CharField(choices=[('male', '\u7537'),
                                           ('female', '\u5973')],
                                  default='female',
                                  max_length=5)),
                ('address', models.CharField(default='', max_length=100)),
                ('mobile',
                 models.CharField(blank=True, max_length=11, null=True)),
                ('image',
                 models.ImageField(default='image/default.png',
                                   upload_to='image/%Y/%m')),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': '\u7528\u6237\u4fe1\u606f',
                'verbose_name_plural': '\u7528\u6237\u4fe1\u606f',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
    ]
Esempio n. 8
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='UserInfo',
            fields=[
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
                ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('telephone', models.CharField(max_length=20, unique=True, verbose_name='手机号')),
                ('email', models.CharField(max_length=128, unique=True, verbose_name='邮箱')),
                ('nickname', models.CharField(blank=True, default='小白', max_length=16, verbose_name='昵称')),
                ('sex', models.CharField(blank=True, choices=[('M', '男性-Male'), ('F', '女性-Female')], default='M', max_length=2, verbose_name='性别')),
                ('age', models.IntegerField(blank=True, default=18, verbose_name='年龄')),
                ('birthday', models.DateField(blank=True, null=True, verbose_name='生日')),
                ('address', models.CharField(blank=True, default='无', max_length=128, verbose_name='地址')),
                ('avatar', models.FileField(default='avatars/default.png', upload_to='avatars/', verbose_name='头像')),
                ('time_create', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='AppSystem',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=32, verbose_name='应用名称')),
                ('comment', models.CharField(blank=True, max_length=256, null=True, verbose_name='应用备注')),
            ],
        ),
        migrations.CreateModel(
            name='Menu',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('icon', models.CharField(default='glyphicon glyphicon-tags', max_length=32, verbose_name='图标')),
                ('title', models.CharField(max_length=32, verbose_name='菜单名称')),
                ('type', models.IntegerField(choices=[(1, '一级导航菜单'), (2, '二级导航菜单'), (10, '普通按钮')], verbose_name='类型')),
                ('state', models.IntegerField(default=0, verbose_name='状态')),
                ('comment', models.CharField(blank=True, max_length=256, null=True, verbose_name='备注')),
                ('priority', models.IntegerField(default=0, verbose_name='菜单优先级')),
                ('create_time', models.DateTimeField(auto_now_add=True, null=True, verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now_add=True, null=True, verbose_name='更新时间')),
                ('app_system', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app_c_rbac.AppSystem', verbose_name='菜单所属应用系统')),
                ('create_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='create_user', to=settings.AUTH_USER_MODEL, verbose_name='创建人')),
                ('parent_menu', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='app_c_rbac.Menu', verbose_name='父菜单')),
                ('update_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='update_user', to=settings.AUTH_USER_MODEL, verbose_name='更新人')),
            ],
        ),
        migrations.CreateModel(
            name='Role',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=32, verbose_name='角色名称')),
            ],
        ),
        migrations.CreateModel(
            name='UserToRole',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('role', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app_c_rbac.Role', verbose_name='角色')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='用户')),
            ],
            options={
                'unique_together': {('user', 'role')},
            },
        ),
        migrations.CreateModel(
            name='URL',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('url', models.CharField(max_length=256, verbose_name='含正则的URL')),
                ('name', models.CharField(max_length=32, unique=True, verbose_name='URL别名')),
                ('comment', models.CharField(blank=True, max_length=256, null=True, verbose_name='备注')),
                ('create_time', models.DateTimeField(auto_now_add=True, null=True, verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now_add=True, null=True, verbose_name='更新时间')),
                ('create_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='url_create_user', to=settings.AUTH_USER_MODEL, verbose_name='创建人')),
                ('update_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='url_update_user', to=settings.AUTH_USER_MODEL, verbose_name='更新人')),
            ],
        ),
        migrations.CreateModel(
            name='RoleToUrlPermission',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('role', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app_c_rbac.Role', verbose_name='角色')),
                ('url', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app_c_rbac.URL', verbose_name='URL')),
            ],
            options={
                'unique_together': {('role', 'url')},
            },
        ),
        migrations.CreateModel(
            name='RoleToMenuPermission',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('menu', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app_c_rbac.Menu', verbose_name='菜单')),
                ('role', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app_c_rbac.Role', verbose_name='角色')),
            ],
            options={
                'unique_together': {('role', 'menu')},
            },
        ),
        migrations.AddField(
            model_name='role',
            name='menu_permission',
            field=models.ManyToManyField(blank=True, through='app_c_rbac.RoleToMenuPermission', to='app_c_rbac.Menu', verbose_name='拥有的菜单权限'),
        ),
        migrations.AddField(
            model_name='role',
            name='url_permission',
            field=models.ManyToManyField(blank=True, through='app_c_rbac.RoleToUrlPermission', to='app_c_rbac.URL', verbose_name='拥有的URL权限'),
        ),
        migrations.AddField(
            model_name='menu',
            name='url',
            field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app_c_rbac.URL', verbose_name='对应URL'),
        ),
        migrations.AddField(
            model_name='userinfo',
            name='role',
            field=models.ManyToManyField(blank=True, through='app_c_rbac.UserToRole', to='app_c_rbac.Role', verbose_name='用户对应角色'),
        ),
        migrations.AddField(
            model_name='userinfo',
            name='user_permissions',
            field=models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions'),
        ),
    ]
Esempio n. 9
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0008_alter_user_username_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
                ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=30, verbose_name='last name')),
                ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('userVerified', models.BooleanField(default=False)),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(default='', max_length=200, unique=True)),
            ],
            options={
                'verbose_name_plural': 'categories',
            },
        ),
        migrations.CreateModel(
            name='Notification',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(default='', max_length=200)),
                ('text', models.CharField(default='', max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Poll',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.CharField(default='', max_length=200, unique=True)),
                ('numVotes', models.IntegerField(default=0)),
                ('openForever', models.BooleanField(default=True)),
                ('dayLimit', models.IntegerField(default=0)),
                ('dateCreated', models.DateTimeField(auto_now_add=True, null=True)),
                ('startTimeStamp', models.DateTimeField(auto_now_add=True, null=True)),
                ('username', models.CharField(default='', max_length=300)),
                ('anonymous', models.BooleanField(default=True)),
                ('categoryID', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='knowItAllAPI.Category')),
                ('userID', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='PollChoice',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.CharField(default='', max_length=200)),
                ('numVotes', models.IntegerField(default=0)),
                ('pollID', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='knowItAllAPI.Poll')),
            ],
        ),
        migrations.CreateModel(
            name='Review',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('rating', models.DecimalField(decimal_places=1, max_digits=2)),
                ('comment', models.CharField(default='', max_length=200, null=True)),
                ('dateCreated', models.DateTimeField(auto_now_add=True, null=True)),
                ('username', models.CharField(default='', max_length=200)),
                ('anonymous', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(default='', max_length=200, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='TagLinker',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(default='', max_length=200)),
                ('pollID', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='knowItAllAPI.Poll')),
                ('tagID', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='knowItAllAPI.Tag')),
            ],
        ),
        migrations.CreateModel(
            name='Topic',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(default='', max_length=200, unique=True)),
                ('avRating', models.DecimalField(decimal_places=1, max_digits=2)),
                ('numReviews', models.IntegerField()),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='knowItAllAPI.Category')),
            ],
        ),
        migrations.CreateModel(
            name='Vote',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('pollChoiceID', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='knowItAllAPI.PollChoice')),
                ('userID', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='taglinker',
            name='topicID',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='knowItAllAPI.Topic'),
        ),
        migrations.AddField(
            model_name='review',
            name='topicID',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='knowItAllAPI.Topic'),
        ),
        migrations.AddField(
            model_name='review',
            name='userID',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='notification',
            name='pollID',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='knowItAllAPI.Poll'),
        ),
        migrations.AddField(
            model_name='notification',
            name='userID',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterUniqueTogether(
            name='vote',
            unique_together=set([('userID', 'pollChoiceID')]),
        ),
        migrations.AlterUniqueTogether(
            name='review',
            unique_together=set([('userID', 'topicID')]),
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='A_Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Accessory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('describ', models.TextField()),
                ('price', models.IntegerField(default=0)),
                ('picture', models.ImageField(upload_to='pic_folder/')),
                ('accessoryCat', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='test1.A_Category')),
            ],
        ),
        migrations.CreateModel(
            name='Address',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('address', models.CharField(max_length=300, null=True)),
                ('postal_code', models.CharField(max_length=10, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='City',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(max_length=100, null=True)),
                ('last_name', models.CharField(max_length=100, null=True)),
                ('nat_code', models.CharField(max_length=100, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='G_Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('c_name', models.CharField(max_length=30)),
            ],
        ),
        migrations.CreateModel(
            name='Game',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('describ', models.TextField()),
                ('price', models.IntegerField(default=0)),
                ('picture', models.ImageField(upload_to='pic_folder/')),
                ('gameCat', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='test1.G_Category')),
            ],
        ),
        migrations.CreateModel(
            name='Platform',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='GameOrder',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='test1.Customer')),
                ('gameEntity', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='test1.Game')),
            ],
        ),
        migrations.CreateModel(
            name='GameDelivery',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('address', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='test1.Address')),
                ('order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='test1.GameOrder')),
            ],
        ),
        migrations.AddField(
            model_name='game',
            name='gamePlt',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='test1.Platform'),
        ),
        migrations.AddField(
            model_name='address',
            name='city',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='test1.City'),
        ),
        migrations.CreateModel(
            name='AccessoryOrder',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('accessoryEntity', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='test1.Accessory')),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='test1.Customer')),
            ],
        ),
        migrations.CreateModel(
            name='AccessoryDelivery',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('address', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='test1.Address')),
                ('order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='test1.AccessoryOrder')),
            ],
        ),
        migrations.AddField(
            model_name='accessory',
            name='accessoryPlt',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='test1.Platform'),
        ),
        migrations.CreateModel(
            name='CustomUser',
            fields=[
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
                ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('username', models.CharField(max_length=250, primary_key=True, serialize=False)),
                ('password', models.CharField(max_length=250)),
                ('role', models.CharField(max_length=250, null=True)),
                ('last_visit', models.DateTimeField(blank=True, null=True)),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
    ]
Esempio n. 11
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0009_alter_user_last_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('username', models.EmailField(max_length=254, unique=True)),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'User',
                'verbose_name_plural': 'Users',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
    ]
Esempio n. 12
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('followers',
                 models.ManyToManyField(blank=True,
                                        null=True,
                                        related_name='followees',
                                        to=settings.AUTH_USER_MODEL)),
                ('following',
                 models.ManyToManyField(blank=True,
                                        null=True,
                                        related_name='followieng',
                                        to=settings.AUTH_USER_MODEL)),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Posts',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('post', models.TextField()),
                ('likes', models.IntegerField(default=0)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('uploaded_by',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='posts',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Preferences',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('post',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='p_likes',
                                   to='network.Posts')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='my_likes',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Messages',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('text', models.CharField(max_length=1500)),
                ('read', models.BooleanField(default=False)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('reciever',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='reciever_messages',
                                   to=settings.AUTH_USER_MODEL)),
                ('sender',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='sended_messages',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='LastMessageSeen',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('last_time_read', models.DateTimeField(blank=True,
                                                        null=True)),
                ('user1',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='u1',
                                   to=settings.AUTH_USER_MODEL)),
                ('user2',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='u2',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Esempio n. 13
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='Worker',
            fields=[
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('id',
                 models.AutoField(primary_key=True,
                                  serialize=False,
                                  unique=True)),
                ('fio', models.CharField(max_length=100, verbose_name='ФИО')),
                ('age',
                 models.IntegerField(
                     default=18,
                     validators=[django.core.validators.MinValueValidator(18)],
                     verbose_name='Возраст')),
                ('education',
                 models.CharField(choices=[('VSH', 'Высшее'),
                                           ('VSN', 'Высшее неоконченное'),
                                           ('SRD', 'Среднее'),
                                           ('SRS', 'Среднее специальное')],
                                  max_length=3,
                                  verbose_name='уровень образования')),
                ('stajh_raboty',
                 models.IntegerField(verbose_name='Стаж работы')),
                ('passport',
                 models.CharField(max_length=10,
                                  verbose_name='Паспортные данные')),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Ekipazh',
            fields=[
                ('id',
                 models.AutoField(primary_key=True,
                                  serialize=False,
                                  unique=True)),
                ('name',
                 models.CharField(max_length=20,
                                  verbose_name='Название экипажа')),
            ],
        ),
        migrations.CreateModel(
            name='Plane',
            fields=[
                ('id',
                 models.AutoField(primary_key=True,
                                  serialize=False,
                                  unique=True)),
                ('type', models.CharField(max_length=15, verbose_name='Тип')),
                ('number',
                 models.CharField(max_length=8, verbose_name='Номер модели')),
                ('mesta', models.IntegerField(verbose_name='Количество мест')),
                ('speed',
                 models.IntegerField(verbose_name='Скорость полёта (км/ч)')),
                ('avia',
                 models.CharField(max_length=20, verbose_name='Авиакомпания')),
            ],
        ),
        migrations.CreateModel(
            name='Tranzit',
            fields=[
                ('id',
                 models.AutoField(primary_key=True,
                                  serialize=False,
                                  unique=True)),
                ('punkt_peresadki',
                 models.CharField(max_length=20,
                                  verbose_name='Пункт пересадки')),
            ],
        ),
        migrations.CreateModel(
            name='Reys',
            fields=[
                ('number',
                 models.IntegerField(primary_key=True,
                                     serialize=False,
                                     unique=True)),
                ('distance',
                 models.IntegerField(
                     verbose_name='Расстояние до пункта назначения')),
                ('punkt_start',
                 models.CharField(max_length=20, verbose_name='Пункт вылета')),
                ('punkt_end',
                 models.CharField(max_length=20,
                                  verbose_name='Пункт прилёта')),
                ('id_tranzita',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='airport.tranzit',
                                   verbose_name='ID транзита')),
            ],
        ),
        migrations.CreateModel(
            name='Remont',
            fields=[
                ('id',
                 models.AutoField(primary_key=True,
                                  serialize=False,
                                  unique=True)),
                ('polomka',
                 models.CharField(max_length=100, verbose_name='Поломка')),
                ('id_plane',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='airport.plane',
                                   verbose_name='ID самолёта')),
            ],
        ),
        migrations.CreateModel(
            name='Razrechenie',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('razrechenie', models.BooleanField(default=True)),
                ('id_ekipazha',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='airport.ekipazh',
                                   verbose_name='ID экипажа')),
                ('id_plane',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='airport.plane',
                                   verbose_name='ID самолёта')),
            ],
        ),
        migrations.CreateModel(
            name='Polet',
            fields=[
                ('id_poleta',
                 models.AutoField(primary_key=True,
                                  serialize=False,
                                  unique=True)),
                ('date_start', models.DateField(verbose_name='Дата вылета')),
                ('time_start', models.TimeField(verbose_name='Время вылета')),
                ('date_end', models.DateField(verbose_name='Дата прилёта')),
                ('time_end', models.TimeField(verbose_name='Время прилёта')),
                ('sell_tickets',
                 models.IntegerField(
                     verbose_name='Количество проданных билетов')),
                ('made_reys',
                 models.IntegerField(
                     verbose_name='Количество совершённых рейсов')),
                ('date_start_tranzit',
                 models.DateField(verbose_name='Дата транзитной посадки')),
                ('time_start_tranzit',
                 models.TimeField(verbose_name='Время транзитной посадки')),
                ('date_end_tranzit',
                 models.DateField(verbose_name='Дата вылета из транзита')),
                ('time_end_tranzit',
                 models.TimeField(verbose_name='Время вылета из транзита')),
                ('id_plane',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='airport.plane',
                                   verbose_name='ID самолёта')),
                ('nubmer_reysa',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='airport.reys',
                                   verbose_name='Номер рейса')),
            ],
        ),
        migrations.CreateModel(
            name='Dopusk',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nalichie_dopuska', models.BooleanField(default=True)),
                ('id_ekipazha',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='airport.ekipazh',
                                   verbose_name='ID экипажа')),
                ('number_reysa',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='airport.reys',
                                   verbose_name='Номер рейса')),
            ],
        ),
        migrations.CreateModel(
            name='Aviacompany',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('work',
                 models.CharField(max_length=30,
                                  verbose_name='Занимаемая должность')),
                ('id_ekipazha',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='airport.ekipazh',
                                   verbose_name='ID экипажа')),
                ('id_workera',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL,
                                   verbose_name='ID работника')),
            ],
        ),
        migrations.AddField(
            model_name='worker',
            name='work',
            field=models.ManyToManyField(through='airport.Aviacompany',
                                         to='airport.Ekipazh'),
        ),
    ]
Esempio n. 14
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0009_alter_user_last_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='Case',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50)),
                ('description', models.CharField(max_length=200)),
                ('content', models.TextField()),
            ],
            options={
                'verbose_name': '用例',
                'verbose_name_plural': '用例',
            },
        ),
        migrations.CreateModel(
            name='Environment',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50)),
                ('description', models.CharField(max_length=100, null=True)),
                ('url', models.CharField(max_length=100)),
                ('private_key', models.CharField(max_length=50)),
            ],
            options={
                'verbose_name': '测试环境',
                'verbose_name_plural': '测试环境',
            },
        ),
        migrations.CreateModel(
            name='Interface',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50)),
                ('url', models.CharField(max_length=50)),
                ('method', models.CharField(max_length=4)),
                ('data_type', models.CharField(max_length=4)),
                ('is_sign', models.IntegerField()),
                ('description', models.CharField(max_length=100, null=True)),
                ('request_header_param', models.TextField()),
                ('request_body_param', models.TextField()),
                ('response_header_param', models.TextField()),
                ('response_body_param', models.TextField()),
            ],
            options={
                'verbose_name': '接口',
                'verbose_name_plural': '接口',
            },
        ),
        migrations.CreateModel(
            name='Plan',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50)),
                ('description', models.CharField(max_length=200)),
                ('content', models.TextField()),
                ('environment',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='APICloud.Environment')),
            ],
            options={
                'verbose_name': '测试计划',
                'verbose_name_plural': '测试计划',
            },
        ),
        migrations.CreateModel(
            name='Project',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50)),
                ('description', models.CharField(max_length=100, null=True)),
            ],
            options={
                'verbose_name': '项目',
                'verbose_name_plural': '项目',
            },
        ),
        migrations.CreateModel(
            name='Report',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=255)),
                ('content', models.TextField()),
                ('case_num', models.IntegerField(null=True)),
                ('pass_num', models.IntegerField(null=True)),
                ('fail_num', models.IntegerField(null=True)),
                ('error_num', models.IntegerField(null=True)),
                ('plan',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='APICloud.Plan')),
            ],
            options={
                'verbose_name': '测试报告',
                'verbose_name_plural': '测试报告',
            },
        ),
        migrations.CreateModel(
            name='Sign',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50)),
                ('description', models.CharField(max_length=100, null=True)),
            ],
            options={
                'verbose_name': '签名',
                'verbose_name_plural': '签名',
            },
        ),
        migrations.CreateModel(
            name='UserInfo',
            fields=[
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('phone',
                 models.CharField(max_length=11,
                                  null=True,
                                  unique=True,
                                  verbose_name='手机号')),
                ('avatar',
                 models.FileField(default='avatars/default.png',
                                  upload_to='avatars/')),
                ('create_time',
                 models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': '用户',
                'verbose_name_plural': '用户',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.AddField(
            model_name='project',
            name='sign',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='APICloud.Sign'),
        ),
        migrations.AddField(
            model_name='plan',
            name='project',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='APICloud.Project'),
        ),
        migrations.AddField(
            model_name='interface',
            name='project',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='APICloud.Project'),
        ),
        migrations.AddField(
            model_name='environment',
            name='project',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='APICloud.Project'),
        ),
        migrations.AddField(
            model_name='case',
            name='project',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='APICloud.Project'),
        ),
    ]
Esempio n. 15
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0009_alter_user_last_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='MyUser',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     help_text=
                     'Tələb olunur. 75 simvol və ya az. Hərflər, Rəqəmlər və @/./+/-/_ simvollar.',
                     max_length=100,
                     unique=True,
                     validators=[
                         django.core.validators.RegexValidator(
                             '^[\\w.@+-]+$',
                             'Düzgün istifadəçi adı daxil edin.', 'yanlışdır')
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=255,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=255,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(max_length=255,
                                   verbose_name='email address')),
                ('profile_picture',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to=base_user.tools.common.
                                   get_user_profile_photo_file_name)),
                ('gender',
                 models.IntegerField(blank=True,
                                     choices=[(1, 'Man'), (2, 'Woman')],
                                     null=True,
                                     verbose_name='cinsi')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name_plural': 'İstifadəçilər',
                'verbose_name': 'İstifadəçi',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
    ]
Esempio n. 16
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='Client',
            fields=[
                ('id_client',
                 models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(default='', max_length=45)),
                ('country',
                 internationalflavor.countries.models.CountryField(
                     default='BE')),
                ('company_name',
                 models.CharField(blank=True, max_length=45, null=True)),
                ('TVA_number',
                 internationalflavor.vat_number.models.VATNumberField(
                     blank=True,
                     default='BE0000000000',
                     eu_only=True,
                     null=True)),
                ('street',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('city', models.CharField(blank=True, max_length=45,
                                          null=True)),
                ('postcode', models.IntegerField(default=1234)),
            ],
            options={
                'db_table': 'Clients',
                'managed': True,
                'unique_together': {('name', 'TVA_number')},
            },
        ),
        migrations.CreateModel(
            name='Facture',
            fields=[
                ('id_facture',
                 models.AutoField(primary_key=True, serialize=False)),
                ('dateFacturation', models.DateField()),
                ('montant', models.DecimalField(decimal_places=2,
                                                max_digits=11)),
                ('nomDeFichier', models.FileField(upload_to='')),
                ('id_client',
                 models.ForeignKey(
                     blank=True,
                     db_column='id_cient',
                     null=True,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='InvoiceBook.client')),
            ],
            options={
                'db_table': 'Factures',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='Fournisseur',
            fields=[
                ('id_fournisseur',
                 models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(default='', max_length=45)),
                ('TVA_number',
                 internationalflavor.vat_number.models.VATNumberField(
                     default='BE0000000000', eu_only=True)),
                ('iban',
                 internationalflavor.iban.models.IBANField(sepa_only=True)),
                ('country',
                 internationalflavor.countries.models.CountryField(
                     default='BE')),
                ('street', models.CharField(default='', max_length=100)),
                ('city', models.CharField(default='', max_length=45)),
                ('postcode', models.IntegerField(default=1234)),
                ('contact_lastname',
                 models.CharField(blank=True, max_length=45, null=True)),
                ('contact_firstname',
                 models.CharField(blank=True, max_length=45, null=True)),
                ('email',
                 models.EmailField(blank=True, max_length=256, null=True)),
            ],
            options={
                'db_table': 'Fournisseurs',
                'managed': True,
                'unique_together': {('name', 'TVA_number', 'iban')},
            },
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='UserFournisseur',
            fields=[
                ('id_userFournisseur',
                 models.AutoField(primary_key=True, serialize=False)),
                ('id_fournisseur',
                 models.ForeignKey(
                     db_column='id_fournisseur',
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='InvoiceBook.fournisseur')),
                ('id_user',
                 models.ForeignKey(
                     db_column='id',
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'UserFournisseurs',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='UserFacture',
            fields=[
                ('id_userFacture',
                 models.AutoField(primary_key=True, serialize=False)),
                ('id_facture',
                 models.ForeignKey(
                     db_column='id_facture',
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='InvoiceBook.facture')),
                ('id_user',
                 models.ForeignKey(
                     db_column='id',
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'UserFactures',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='UserClient',
            fields=[
                ('id_userClient',
                 models.AutoField(primary_key=True, serialize=False)),
                ('id_client',
                 models.ForeignKey(
                     db_column='id_client',
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='InvoiceBook.client')),
                ('id_user',
                 models.ForeignKey(
                     db_column='id',
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'UserClients',
                'managed': True,
            },
        ),
        migrations.AddField(
            model_name='facture',
            name='id_fournisseur',
            field=models.ForeignKey(
                blank=True,
                db_column='id_fournisseur',
                null=True,
                on_delete=django.db.models.deletion.DO_NOTHING,
                to='InvoiceBook.fournisseur'),
        ),
    ]
Esempio n. 17
0
class Migration(migrations.Migration):

    replaces = [('mrsuser', '0001_initial'), ('mrsuser', '0002_user_caisses'),
                ('mrsuser', '0003_meta'), ('mrsuser', '0004_user_profile'),
                ('mrsuser', '0005_nonschematic_options'),
                ('mrsuser', '0006_add_is_superuser'),
                ('mrsuser', '0007_superviseur'),
                ('mrsuser', '0008_user_number')]

    initial = True

    dependencies = [
        ('auth', '0009_alter_user_last_name_max_length'),
        ('caisse', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
                ('caisses',
                 models.ManyToManyField(null=True, to='caisse.Caisse')),
                ('profile',
                 models.CharField(choices=[('admin', 'Admin'), ('upn', 'UPN'),
                                           ('stat', 'Stat'),
                                           ('support', 'Relation client')],
                                  max_length=50,
                                  verbose_name='profil')),
                ('number',
                 models.CharField(max_length=30,
                                  null=True,
                                  verbose_name="Numéro d'agent")),
            ],
            options={
                'db_table': 'auth_user',
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
            },
            managers=[
                ('objects', mrsuser.models.UserManager()),
            ],
        ),
        migrations.RunPython(provision_profile),
        migrations.RemoveField(
            model_name='user',
            name='is_staff',
        ),
        migrations.RunPython(profile_to_groups),
        migrations.RemoveField(
            model_name='user',
            name='profile',
        ),
        migrations.RunPython(add_superviseur),
        migrations.RunPython(provision_user_number),
    ]
Esempio n. 18
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=20,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('phone',
                 models.CharField(blank=True,
                                  max_length=12,
                                  null=True,
                                  verbose_name='Phone Number')),
                ('is_staff', models.BooleanField(default=False)),
                ('is_superuser', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Location',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('address', models.TextField()),
                ('city', models.CharField(max_length=15)),
                ('zip_code', models.CharField(max_length=10)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='locations',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Esempio n. 19
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0009_alter_user_last_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admins site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('nick',
                 models.CharField(max_length=30, null=True,
                                  verbose_name='昵称')),
                ('ctime',
                 models.DateTimeField(auto_now_add=True,
                                      null=True,
                                      verbose_name='创建时间')),
                ('birthday', models.DateTimeField(null=True,
                                                  verbose_name='生日')),
                ('tel', models.CharField(max_length=11, verbose_name='电话')),
                ('age', models.SmallIntegerField(null=True,
                                                 verbose_name='年龄')),
                ('sex',
                 models.SmallIntegerField(choices=[(0, '女'), (1, '男')],
                                          default=0,
                                          verbose_name='性别')),
                ('home_addr',
                 models.CharField(max_length=255, verbose_name='住址')),
                ('account', models.CharField(max_length=20,
                                             verbose_name='账号')),
            ],
            options={
                'verbose_name': '用户',
                'verbose_name_plural': '用户',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Addr',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=10, verbose_name='收件人')),
                ('site',
                 models.CharField(max_length=150,
                                  null=True,
                                  verbose_name='详细地址')),
                ('Zip_Code', models.IntegerField(null=True,
                                                 verbose_name='邮编')),
                ('tel', models.CharField(max_length=12, verbose_name='电话')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL,
                                   verbose_name='用户编号')),
            ],
            options={
                'verbose_name': '收货地址',
                'verbose_name_plural': '收货地址',
            },
        ),
        migrations.CreateModel(
            name='Banner',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='名字')),
                ('img', models.ImageField(upload_to='img/',
                                          verbose_name='图片')),
                ('title',
                 models.IntegerField(choices=[(0, '静态图片'), (1, '轮播图')],
                                     default=0,
                                     verbose_name='标题')),
                ('status',
                 models.IntegerField(choices=[(0, '不启用'), (1, '启用')],
                                     default=1,
                                     verbose_name='是否启用')),
            ],
            options={
                'verbose_name': '轮播图',
                'verbose_name_plural': '轮播图',
            },
        ),
        migrations.CreateModel(
            name='Goods',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=50, null=True,
                                  verbose_name='名称')),
                ('img1',
                 models.ImageField(null=True,
                                   upload_to='img/',
                                   verbose_name='商品图片1')),
                ('seller', models.IntegerField(null=True,
                                               verbose_name='卖家编号')),
                ('goods_info',
                 models.CharField(max_length=255,
                                  null=True,
                                  verbose_name='商品详情')),
                ('is_buy', models.IntegerField(default=1,
                                               verbose_name='是否上架')),
                ('zyxs',
                 models.IntegerField(choices=[(0, 'NO'), (1, '主页显示')],
                                     default=1,
                                     verbose_name='主页显示')),
                ('tj',
                 models.IntegerField(choices=[(0, 'NO'), (1, '推荐')],
                                     default=0,
                                     verbose_name='新品推荐')),
                ('price', models.FloatField(default=0, verbose_name='价格')),
                ('unit',
                 models.CharField(default='500g',
                                  max_length=50,
                                  verbose_name='商品单位')),
            ],
            options={
                'verbose_name': '商品',
                'verbose_name_plural': '商品',
            },
        ),
        migrations.CreateModel(
            name='Goods_type',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=10, null=True,
                                  verbose_name='名称')),
                ('img1',
                 models.ImageField(null=True,
                                   upload_to='img/',
                                   verbose_name='图片1-图标')),
                ('note',
                 models.CharField(max_length=255, null=True,
                                  verbose_name='说明')),
                ('ctime',
                 models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('icon',
                 models.CharField(max_length=20, null=True,
                                  verbose_name='图标')),
            ],
            options={
                'verbose_name': '商品分类',
                'verbose_name_plural': '商品分类',
            },
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('ctime',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='订单生成时间')),
                ('total1', models.FloatField(null=True, verbose_name='商品小计')),
                ('num1', models.IntegerField(null=True, verbose_name='商品数量')),
                ('order_status',
                 models.IntegerField(choices=[(0, '未付款'), (1, '已付款')],
                                     default=1,
                                     verbose_name='订单状态')),
                ('status',
                 models.IntegerField(choices=[(0, '去付款'), (1, '查看物流')],
                                     default=0,
                                     verbose_name='付款/查看')),
                ('goods',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='shopping.Goods',
                                   verbose_name='商品编号')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL,
                                   verbose_name='用户编号')),
            ],
            options={
                'verbose_name': '订单',
                'verbose_name_plural': '订单',
            },
        ),
        migrations.CreateModel(
            name='Pay_type',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=50,
                                  null=True,
                                  verbose_name='支付类型名称')),
                ('status',
                 models.IntegerField(choices=[(0, 'NO'), (1, '启用')],
                                     default=1,
                                     verbose_name='是否启用')),
                ('img', models.CharField(max_length=50,
                                         verbose_name='支付平台图标')),
            ],
            options={
                'verbose_name': '支付平台',
                'verbose_name_plural': '支付平台',
            },
        ),
        migrations.CreateModel(
            name='Shop_cart',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('count', models.IntegerField(null=True, verbose_name='数量')),
                ('status',
                 models.IntegerField(choices=[(0, 'NO'), (1, '启用')],
                                     default=1,
                                     verbose_name='是否启用')),
                ('is_del',
                 models.IntegerField(choices=[(0, 'NO'), (1, '删除')],
                                     default=0,
                                     verbose_name='是否删除')),
                ('goods1',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='shopping.Goods',
                                   verbose_name='商品编号')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL,
                                   verbose_name='用户编号')),
            ],
            options={
                'verbose_name': '购物车',
                'verbose_name_plural': '购物车',
            },
        ),
        migrations.AddField(
            model_name='goods',
            name='goods',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='shopping.Goods_type',
                verbose_name='商品种类'),
        ),
        migrations.AddField(
            model_name='user',
            name='goods1',
            field=models.ManyToManyField(through='shopping.Shop_cart',
                                         to='shopping.Goods',
                                         verbose_name='商品'),
        ),
        migrations.AddField(
            model_name='user',
            name='groups',
            field=models.ManyToManyField(
                blank=True,
                help_text=
                'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                related_name='user_set',
                related_query_name='user',
                to='auth.Group',
                verbose_name='groups'),
        ),
        migrations.AddField(
            model_name='user',
            name='user_permissions',
            field=models.ManyToManyField(
                blank=True,
                help_text='Specific permissions for this user.',
                related_name='user_set',
                related_query_name='user',
                to='auth.Permission',
                verbose_name='user permissions'),
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
        ('user', '0002_profile_signup_confirmation'),
    ]

    operations = [
        migrations.AlterModelManagers(
            name='profile',
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.RemoveField(
            model_name='profile',
            name='user',
        ),
        migrations.AddField(
            model_name='profile',
            name='date_joined',
            field=models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined'),
        ),
        migrations.AddField(
            model_name='profile',
            name='email',
            field=models.EmailField(blank=True, max_length=254, verbose_name='email address'),
        ),
        migrations.AddField(
            model_name='profile',
            name='first_name',
            field=models.CharField(blank=True, max_length=30, verbose_name='first name'),
        ),
        migrations.AddField(
            model_name='profile',
            name='groups',
            field=models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups'),
        ),
        migrations.AddField(
            model_name='profile',
            name='is_active',
            field=models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active'),
        ),
        migrations.AddField(
            model_name='profile',
            name='is_staff',
            field=models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status'),
        ),
        migrations.AddField(
            model_name='profile',
            name='is_superuser',
            field=models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status'),
        ),
        migrations.AddField(
            model_name='profile',
            name='last_login',
            field=models.DateTimeField(blank=True, null=True, verbose_name='last login'),
        ),
        migrations.AddField(
            model_name='profile',
            name='last_name',
            field=models.CharField(blank=True, max_length=150, verbose_name='last name'),
        ),
        migrations.AddField(
            model_name='profile',
            name='password',
            field=models.CharField(default='test', max_length=128, verbose_name='password'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='profile',
            name='user_permissions',
            field=models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions'),
        ),
        migrations.AddField(
            model_name='profile',
            name='username',
            field=models.CharField(default='test', error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username'),
            preserve_default=False,
        ),
    ]
Esempio n. 21
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='FavouriteGroup',
            fields=[
                ('seq', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50)),
                ('reg_date', models.DateField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='TodoGroup',
            fields=[
                ('seq', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50)),
                ('reg_date', models.DateField(auto_now_add=True)),
                ('del_yn', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='Todo',
            fields=[
                ('seq', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50, validators=[second.models.min_length_3])),
                ('status', models.CharField(choices=[('pending', '할 일'), ('inprogress', '진행중'), ('end', '완료')], max_length=10)),
                ('reg_date', models.DateField(auto_now_add=True)),
                ('end_date', models.DateField()),
                ('del_yn', models.BooleanField(default=False)),
                ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='second.todogroup')),
            ],
        ),
        migrations.CreateModel(
            name='Favourite',
            fields=[
                ('seq', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50)),
                ('url', models.CharField(max_length=100)),
                ('memo', models.TextField()),
                ('reg_date', models.DateField(auto_now_add=True)),
                ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='second.favouritegroup')),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
                ('first_name', models.CharField(blank=True, max_length=150, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
                ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('phone_number', models.CharField(blank=True, max_length=20)),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
    ]
Esempio n. 22
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.CharField(max_length=255, verbose_name='Заголовок')),
                ('anons',
                 models.DateTimeField(auto_now_add=True,
                                      null=True,
                                      verbose_name='Дата публикации')),
                ('text', models.CharField(max_length=255,
                                          verbose_name='Текст')),
                ('image',
                 models.ImageField(blank=True,
                                   upload_to=app.utilities.get_timestamp_path,
                                   verbose_name='Изображение')),
            ],
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=255, verbose_name='Заголовок')),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('author',
                 models.CharField(max_length=255, verbose_name='Автор')),
                ('comment',
                 models.TextField(max_length=255, verbose_name='Текст')),
                ('datatime',
                 models.DateTimeField(auto_now_add=True,
                                      null=True,
                                      verbose_name='Дата публикации')),
                ('post',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='comments',
                                   to='app.Post',
                                   verbose_name='Пост')),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
    ]
Esempio n. 23
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='Actor',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Author',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Director',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Genre',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Membership',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('duration', models.IntegerField()),
                ('price', models.CharField(max_length=50)),
                ('Resolution', models.IntegerField()),
                ('no_of_Active_Screens', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Prize',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Producer',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Show',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('show_type', models.CharField(max_length=50)),
                ('story', models.TextField()),
                ('country', models.CharField(max_length=50)),
                ('duration', models.DurationField()),
                ('production_Date', models.DateField()),
                ('rating', models.FloatField()),
                ('classification', models.CharField(max_length=50)),
                ('publish_Date', models.DateField()),
                ('video_Source', models.URLField()),
                ('poster', models.URLField()),
                ('language', models.CharField(max_length=50)),
                ('actors', models.ManyToManyField(to='Netflix.Actor')),
                ('authors', models.ManyToManyField(to='Netflix.Author')),
                ('directors', models.ManyToManyField(to='Netflix.Director')),
                ('genres', models.ManyToManyField(to='Netflix.Genre')),
                ('prizes',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='Netflix.prize')),
                ('producers', models.ManyToManyField(to='Netflix.Producer')),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('username', models.CharField(max_length=50, unique=True)),
                ('first_name', models.CharField(max_length=255)),
                ('last_name', models.CharField(max_length=255)),
                ('password', models.CharField(max_length=255)),
                ('email', models.EmailField(max_length=254)),
                ('phone', models.CharField(max_length=255)),
                ('country', models.CharField(max_length=100)),
                ('birth_date', models.DateField()),
                ('gender', models.CharField(max_length=50)),
                ('register_date', models.DateField(auto_now_add=True)),
                ('avatar', models.TextField(null=True)),
                ('payment_day', models.IntegerField()),
                ('membership_Start_Date', models.DateField()),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('membership',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='Netflix.membership')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='WatchLater',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('Show_id',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='Netflix.show')),
                ('User_id',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Watched',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('User_Rating', models.IntegerField()),
                ('Show_id',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='Netflix.show')),
                ('User_id',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Watch',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('Date', models.DateField()),
                ('Current_Duration', models.DurationField()),
                ('User_id',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
                ('show_id',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='Netflix.show')),
            ],
        ),
        migrations.CreateModel(
            name='Subscribe',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('start_date', models.DateTimeField()),
                ('payment_date', models.DateTimeField()),
                ('membership',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='Netflix.membership')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Esempio n. 24
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [("auth", "0009_alter_user_last_name_max_length")]

    operations = [
        migrations.CreateModel(
            name="User",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("password", models.CharField(max_length=128, verbose_name="password")),
                (
                    "last_login",
                    models.DateTimeField(
                        blank=True, null=True, verbose_name="last login"
                    ),
                ),
                (
                    "is_superuser",
                    models.BooleanField(
                        default=False,
                        help_text="Designates that this user has all permissions without explicitly assigning them.",
                        verbose_name="superuser status",
                    ),
                ),
                (
                    "username",
                    models.CharField(
                        error_messages={
                            "unique": "A user with that username already exists."
                        },
                        help_text="Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.",
                        max_length=150,
                        unique=True,
                        validators=[
                            django.contrib.auth.validators.UnicodeUsernameValidator()
                        ],
                        verbose_name="username",
                    ),
                ),
                (
                    "first_name",
                    models.CharField(
                        blank=True, max_length=30, verbose_name="first name"
                    ),
                ),
                (
                    "last_name",
                    models.CharField(
                        blank=True, max_length=150, verbose_name="last name"
                    ),
                ),
                (
                    "email",
                    models.EmailField(
                        blank=True, max_length=254, verbose_name="email address"
                    ),
                ),
                (
                    "is_staff",
                    models.BooleanField(
                        default=False,
                        help_text="Designates whether the user can log into this admin site.",
                        verbose_name="staff status",
                    ),
                ),
                (
                    "is_active",
                    models.BooleanField(
                        default=True,
                        help_text="Designates whether this user should be treated as active. Unselect this instead of deleting accounts.",
                        verbose_name="active",
                    ),
                ),
                (
                    "date_joined",
                    models.DateTimeField(
                        default=django.utils.timezone.now, verbose_name="date joined"
                    ),
                ),
                (
                    "groups",
                    models.ManyToManyField(
                        blank=True,
                        help_text="The groups this user belongs to. A user will get all permissions granted to each of their groups.",
                        related_name="user_set",
                        related_query_name="user",
                        to="auth.Group",
                        verbose_name="groups",
                    ),
                ),
                (
                    "user_permissions",
                    models.ManyToManyField(
                        blank=True,
                        help_text="Specific permissions for this user.",
                        related_name="user_set",
                        related_query_name="user",
                        to="auth.Permission",
                        verbose_name="user permissions",
                    ),
                ),
            ],
            options={
                "verbose_name": "user",
                "abstract": False,
                "verbose_name_plural": "users",
            },
            managers=[("objects", django.contrib.auth.models.UserManager())],
        )
    ]
Esempio n. 25
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=64)),
            ],
        ),
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=256)),
                ('description', models.CharField(max_length=256)),
                ('img', models.CharField(blank=True, max_length=2048)),
                ('date',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('category',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='category',
                                   to='courses.category')),
                ('enrolled',
                 models.ManyToManyField(blank=True,
                                        related_name='enrolled',
                                        to=settings.AUTH_USER_MODEL)),
                ('like',
                 models.ManyToManyField(blank=True,
                                        related_name='like',
                                        to=settings.AUTH_USER_MODEL)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='creator',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Unit',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=256)),
                ('description', models.CharField(max_length=256)),
                ('notes', models.CharField(max_length=2048)),
                ('video', models.CharField(max_length=1024)),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='course',
                                   to='courses.course')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
                ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
                ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='GroupOfUsers',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Location',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('room', models.CharField(max_length=50)),
                ('furniture', models.CharField(max_length=100)),
                ('position_x', models.IntegerField(help_text='value in pixels')),
                ('position_y', models.IntegerField(help_text='value in pixels')),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(default='default.jpg', upload_to='profile_pics')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Item',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('image', models.ImageField(default='def-item.png', upload_to='items_pics')),
                ('category', models.CharField(choices=[('Tools', 'Tools'), ('Books', 'Books'), ('Computer stuff', 'Computer stuff'), ('Clothes', 'Clothes'), ('Kitchen', 'Kitchen'), ('Bedclothes', 'Bedclothes'), ('Holidays', 'Holidays'), ('Bathroom', 'Bathroom'), ('Car stuff', 'Car stuff'), ('Toys', 'Toys'), ('Board games', 'Board games'), ('Other', 'Other')], max_length=20)),
                ('description', models.TextField(blank=True, null=True)),
                ('is_borrowed', models.BooleanField(blank=True, default=False)),
                ('who_borrowed', models.CharField(blank=True, default='', max_length=30, verbose_name='If yes, who has borrowed it:')),
                ('when_borrowed', models.DateTimeField(blank=True, null=True, verbose_name='If yes, then when was that(YYYY-MM-DD):')),
                ('groups', models.ManyToManyField(to='whereisit_app.GroupOfUsers')),
                ('location', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='whereisit_app.Location')),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.AddField(
            model_name='user',
            name='u_groups',
            field=models.ManyToManyField(to='whereisit_app.GroupOfUsers'),
        ),
        migrations.AddField(
            model_name='user',
            name='user_permissions',
            field=models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions'),
        ),
    ]
Esempio n. 27
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0009_alter_user_last_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  primary_key=True,
                                  serialize=False)),
                ('username',
                 models.CharField(max_length=128,
                                  unique=True,
                                  verbose_name='Username')),
                ('name', models.CharField(max_length=128,
                                          verbose_name='Name')),
                ('email',
                 models.EmailField(max_length=128,
                                   unique=True,
                                   verbose_name='Email')),
                ('role',
                 models.CharField(blank=True,
                                  choices=[('Admin', 'Administrator'),
                                           ('User', 'User')],
                                  default='User',
                                  max_length=36,
                                  verbose_name='Role')),
                ('phone',
                 models.CharField(blank=True,
                                  max_length=20,
                                  null=True,
                                  verbose_name='Phone')),
                ('otp_level',
                 models.SmallIntegerField(choices=[(0, 'Disable'),
                                                   (1, 'Enable'),
                                                   (2, 'Force enable')],
                                          default=0,
                                          verbose_name='MFA')),
                ('date_expired',
                 models.DateTimeField(blank=True,
                                      default=users.utils.date_expired_default,
                                      null=True,
                                      verbose_name='Date expired')),
                ('comment',
                 models.TextField(blank=True,
                                  max_length=200,
                                  verbose_name='Comment')),
            ],
            options={
                'verbose_name': 'User',
                'ordering': ['username'],
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='AccessKey',
            fields=[
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='AccessKeyID')),
                ('secret',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  verbose_name='AccessKeySecret')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='access_key',
                                   to=settings.AUTH_USER_MODEL,
                                   verbose_name='User')),
            ],
        ),
        migrations.CreateModel(
            name='PrivateToken',
            fields=[
                ('key',
                 models.CharField(max_length=40,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='Key')),
                ('created',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='Created')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='auth_token',
                     to=settings.AUTH_USER_MODEL,
                     verbose_name='User')),
            ],
            options={
                'verbose_name': 'Private Token',
            },
        ),
        migrations.CreateModel(
            name='UserGroup',
            fields=[
                ('is_discard',
                 models.BooleanField(default=False,
                                     verbose_name='is discard')),
                ('discard_time',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='discard time')),
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  primary_key=True,
                                  serialize=False)),
                ('name',
                 models.CharField(max_length=128,
                                  unique=True,
                                  verbose_name='Name')),
                ('comment', models.TextField(blank=True,
                                             verbose_name='Comment')),
                ('date_created',
                 models.DateTimeField(auto_now_add=True,
                                      null=True,
                                      verbose_name='Date created')),
                ('created_by',
                 models.CharField(blank=True, max_length=100, null=True)),
            ],
            options={
                'verbose_name': 'User group',
                'ordering': ['name'],
            },
        ),
        migrations.AddField(
            model_name='user',
            name='groups',
            field=models.ManyToManyField(blank=True,
                                         related_name='users',
                                         to='users.UserGroup',
                                         verbose_name='User group'),
        ),
        migrations.AddField(
            model_name='user',
            name='user_permissions',
            field=models.ManyToManyField(
                blank=True,
                help_text='Specific permissions for this user.',
                related_name='user_set',
                related_query_name='user',
                to='auth.Permission',
                verbose_name='user permissions'),
        ),
    ]
Esempio n. 28
0
class Migration(migrations.Migration):

    dependencies = [
        ('contenttypes', '__first__'),
    ]

    operations = [
        migrations.CreateModel(
            name='Permission',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('name', models.CharField(max_length=50, verbose_name='name')),
                ('content_type', models.ForeignKey(
                    to='contenttypes.ContentType',
                    on_delete=models.CASCADE,
                    to_field='id',
                    verbose_name='content type',
                )),
                ('codename', models.CharField(max_length=100, verbose_name='codename')),
            ],
            options={
                'ordering': ('content_type__app_label', 'content_type__model', 'codename'),
                'unique_together': {('content_type', 'codename')},
                'verbose_name': 'permission',
                'verbose_name_plural': 'permissions',
            },
            managers=[
                ('objects', django.contrib.auth.models.PermissionManager()),
            ],
        ),
        migrations.CreateModel(
            name='Group',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('name', models.CharField(unique=True, max_length=80, verbose_name='name')),
                ('permissions', models.ManyToManyField(to='auth.Permission', verbose_name='permissions', blank=True)),
            ],
            options={
                'verbose_name': 'group',
                'verbose_name_plural': 'groups',
            },
            managers=[
                ('objects', django.contrib.auth.models.GroupManager()),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(default=timezone.now, verbose_name='last users')),
                ('is_superuser', models.BooleanField(
                    default=False,
                    help_text='Designates that this user has all permissions without explicitly assigning them.',
                    verbose_name='superuser status'
                )),
                ('username', models.CharField(
                    help_text='Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only.', unique=True,
                    max_length=30, verbose_name='username',
                    validators=[validators.UnicodeUsernameValidator()],
                )),
                ('first_name', models.CharField(max_length=30, verbose_name='first name', blank=True)),
                ('last_name', models.CharField(max_length=30, verbose_name='last name', blank=True)),
                ('email', models.EmailField(max_length=75, verbose_name='email address', blank=True)),
                ('is_staff', models.BooleanField(
                    default=False, help_text='Designates whether the user can log into this admin site.',
                    verbose_name='staff status'
                )),
                ('is_active', models.BooleanField(
                    default=True, verbose_name='active', help_text=(
                        'Designates whether this user should be treated as active. Unselect this instead of deleting '
                        'accounts.'
                    )
                )),
                ('date_joined', models.DateTimeField(default=timezone.now, verbose_name='date joined')),
                ('groups', models.ManyToManyField(
                    to='auth.Group', verbose_name='groups', blank=True, related_name='user_set',
                    related_query_name='user', help_text=(
                        'The groups this user belongs to. A user will get all permissions granted to each of their '
                        'groups.'
                    )
                )),
                ('user_permissions', models.ManyToManyField(
                    to='auth.Permission', verbose_name='user permissions', blank=True,
                    help_text='Specific permissions for this user.', related_name='user_set',
                    related_query_name='user')
                 ),
            ],
            options={
                'swappable': 'AUTH_USER_MODEL',
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
    ]
Esempio n. 29
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0009_alter_user_last_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  null=True,
                                  verbose_name='姓名')),
                ('birthday',
                 models.DateField(blank=True, null=True, verbose_name='出生年月')),
                ('gender',
                 models.CharField(choices=[('male', '男'), ('female', '女')],
                                  default='female',
                                  max_length=6,
                                  verbose_name='性别')),
                ('mobile',
                 models.CharField(blank=True,
                                  max_length=11,
                                  null=True,
                                  verbose_name='电话')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=100,
                                   null=True,
                                   verbose_name='邮箱')),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': '用户信息',
                'verbose_name_plural': '用户信息',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='VerifyCode',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('code', models.CharField(max_length=10, verbose_name='验证码')),
                ('mobile', models.CharField(max_length=11, verbose_name='电话')),
                ('add_time',
                 models.DateTimeField(default=datetime.datetime.now,
                                      verbose_name='添加时间')),
            ],
            options={
                'verbose_name': '短信验证',
                'verbose_name_plural': '短信验证',
            },
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('myapp', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Password',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('email', models.CharField(max_length=200)),
                ('code', models.CharField(max_length=20)),
                ('timestamp', models.DateTimeField(blank=True, default=django.utils.timezone.now)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('age', models.CharField(blank=True, max_length=255)),
                ('sex', models.CharField(blank=True, choices=[('M', 'male'), ('F', 'female'), ('O', 'other')], max_length=1)),
                ('phone', models.CharField(blank=True, max_length=255)),
                ('pic', models.ImageField(blank=True, null=True, upload_to='Profile/picture/')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Prescription',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField()),
                ('age', models.CharField(max_length=200, null=True)),
                ('medications', models.CharField(max_length=255)),
                ('read', models.BooleanField(default=False)),
                ('doctor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='doctor', to=settings.AUTH_USER_MODEL)),
                ('patient', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='patient', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Notification',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('appointment', models.IntegerField(blank=True, null=True)),
                ('prescription', models.IntegerField(blank=True, null=True)),
                ('message', models.IntegerField(blank=True, null=True)),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Message',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('message', models.CharField(blank=True, max_length=255)),
                ('file', models.FileField(blank=True, null=True, upload_to='Message/file/')),
                ('pic', models.ImageField(blank=True, null=True, upload_to='Message/pic/')),
                ('read', models.BooleanField(default=False)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('receiver', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='receiver', to=settings.AUTH_USER_MODEL)),
                ('sender', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sender', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Health',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('T_report', models.FileField(blank=True, null=True, upload_to='profile/health/document/')),
                ('diabetic', models.CharField(blank=True, choices=[('No', 'No'), ('20%', '20%'), ('40%', '40%'), ('60%', '60%'), ('80%', '80%'), ('90%', '90%'), ('100%', '100%')], default='No', max_length=20, null=True)),
                ('allergy', models.CharField(blank=True, choices=[('No', 'No'), ('20%', '20%'), ('40%', '40%'), ('60%', '60%'), ('80%', '80%'), ('90%', '90%'), ('100%', '100%')], default='No', max_length=20, null=True)),
                ('fiver', models.CharField(blank=True, choices=[('No', 'No'), ('20%', '20%'), ('40%', '40%'), ('60%', '60%'), ('80%', '80%'), ('90%', '90%'), ('100%', '100%')], default='No', max_length=20, null=True)),
                ('headache', models.CharField(blank=True, choices=[('No', 'No'), ('20%', '20%'), ('40%', '40%'), ('60%', '60%'), ('80%', '80%'), ('90%', '90%'), ('100%', '100%')], default='No', max_length=20, null=True)),
                ('caff', models.CharField(blank=True, choices=[('No', 'No'), ('20%', '20%'), ('40%', '40%'), ('60%', '60%'), ('80%', '80%'), ('90%', '90%'), ('100%', '100%')], default='No', max_length=20, null=True)),
                ('body_pain', models.CharField(blank=True, choices=[('No', 'No'), ('20%', '20%'), ('40%', '40%'), ('60%', '60%'), ('80%', '80%'), ('90%', '90%'), ('100%', '100%')], default='No', max_length=20, null=True)),
                ('b_des', models.TextField(blank=True, null=True)),
                ('comment', models.TextField(blank=True, null=True)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='DocProfile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('specialist', models.CharField(choices=[('Eye/Year/Throat ', 'Eye/Year/Throat '), ('Dental', 'Dental'), ('Child ', 'child'), ('gynecologist ', 'gynecologist'), ('Dermatologists', 'Dermatologists'), ('Plastic Surgeons', 'Plastic Surgeons'), ('Psychiatrists', 'Psychiatrists'), ('General Surgeons', 'General Surgeons'), ('Urologists', 'Urologists'), ('Pathologists', 'Pathologists')], max_length=20, null=True)),
                ('degree', models.CharField(choices=[('MBBS', 'MBBS'), ('FCPS', 'FCPS')], max_length=20, null=True)),
                ('title', models.CharField(blank=True, max_length=20, null=True)),
                ('description', models.CharField(blank=True, max_length=200, null=True)),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Appointment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.CharField(blank=True, max_length=255, verbose_name=django.contrib.auth.models.User)),
                ('date', models.DateField()),
                ('active', models.BooleanField(blank=True, default=False, null=True)),
                ('read', models.BooleanField(default=False)),
                ('doctor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='patients', to=settings.AUTH_USER_MODEL)),
                ('patient', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='doctors', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Account',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('role', models.CharField(choices=[('PA', 'patient'), ('DOC', 'doctor'), ('EMP', 'employee'), ('OT', 'other')], default='PA', max_length=3)),
                ('profile', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='myapp.Profile')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]