예제 #1
0
파일: 0001_initial.py 프로젝트: Nabitor/cms
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='CmsUser',
            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')),
                ('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.ASCIIUsernameValidator()], 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')),
                ('password', models.CharField(default='', max_length=16, verbose_name='\u5bc6\u7801')),
                ('phone', models.IntegerField(blank=True, unique=True, verbose_name='\u624b\u673a\u53f7')),
                ('age', models.CharField(blank=True, choices=[('MALE', '\u7537'), ('FEMALE', '\u5973')], max_length=2, verbose_name='\u6027\u522b')),
                ('portrait', models.FilePathField(verbose_name='\u7528\u6237\u5934\u50cf\u8def\u5f84')),
                ('presentation', models.CharField(max_length=100, verbose_name='\u4e00\u53e5\u8bdd\u4ecb\u7ecd\u81ea\u5df1')),
                ('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={
                'db_table': 'cmsuser',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
    ]
예제 #2
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0008_alter_user_username_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=30, 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')),
                ('auth_token', models.CharField(max_length=256, null=True, unique=True, verbose_name='Token码')),
                ('email', models.EmailField(max_length=254, unique=True, verbose_name='邮箱')),
                ('avatar', models.FilePathField(verbose_name='用户头像')),
                ('mobile', models.CharField(db_index=True, max_length=12, unique=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()),
            ],
        ),
    ]
예제 #3
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='newuser',
            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')),
                ('profile',
                 models.CharField(default='',
                                  max_length=256,
                                  verbose_name='profile')),
                ('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='ClassChoose',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='ClassTable',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('class_number',
                 models.PositiveSmallIntegerField(unique=True)),
                ('class_name', models.CharField(max_length=200)),
                ('class_content', models.TextField()),
                ('teacher',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='EmailVerifyRecord',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('code', models.CharField(max_length=20, verbose_name='验证码')),
                ('email', models.EmailField(max_length=50, verbose_name='邮箱')),
                ('send_type',
                 models.CharField(choices=[('register', '注册'),
                                           ('forget', '找回密码')],
                                  max_length=10,
                                  verbose_name='验证码类型')),
                ('send_time',
                 models.DateTimeField(default=datetime.datetime.now,
                                      verbose_name='发送时间')),
            ],
            options={
                'verbose_name': '邮箱验证码',
                'verbose_name_plural': '邮箱验证码',
            },
        ),
        migrations.CreateModel(
            name='Homework',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('homework_number', models.PositiveSmallIntegerField()),
                ('homework_content', models.TextField()),
                ('homework_deadline',
                 models.DateTimeField(blank=True, null=True)),
                ('class_number',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='ancient.ClassTable')),
            ],
        ),
        migrations.CreateModel(
            name='Identity',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('identity',
                 models.CharField(choices=[('TE', 'Teacher'),
                                           ('ST', 'Student')],
                                  default='ST',
                                  max_length=2)),
                ('name',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Submit',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('student_id', models.CharField(default=None, max_length=128)),
                ('class_number', models.CharField(default=None,
                                                  max_length=128)),
                ('homework_number',
                 models.CharField(default=None, max_length=128)),
                ('file_dir', models.FilePathField(default='./NoAddress')),
                ('file_name',
                 models.CharField(default='No Name', max_length=128)),
                ('submit_time', models.DateTimeField(blank=True, null=True)),
            ],
        ),
        migrations.AddField(
            model_name='classchoose',
            name='class_number',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='ancient.ClassTable'),
        ),
        migrations.AddField(
            model_name='classchoose',
            name='student',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
    ]
예제 #4
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Author',
            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')),
                ('date_of_birth', 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')),
                ('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='Keyword',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=120)),
                ('created_at', models.DateField(auto_now_add=True)),
                ('updated_at', models.DateField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=120)),
                ('created_at', models.DateField(auto_now_add=True)),
                ('updated_at', models.DateField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Document',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=120)),
                ('file_path', models.FilePathField()),
                ('file_type', models.CharField(max_length=20)),
                ('word_art', models.FilePathField()),
                ('contents', models.CharField(max_length=255)),
                ('created_at', models.DateField(auto_now_add=True)),
                ('updated_at', models.DateField(auto_now=True)),
                ('author',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
                ('keywords', models.ManyToManyField(to='catalog.Keyword')),
            ],
        ),
    ]
예제 #5
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',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Candidate',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('picture',
                 models.FilePathField(default='blank.png',
                                      path='/static/dashboard/img/user/')),
                ('bio', models.TextField(blank=True, max_length=500)),
                ('street', models.TextField(blank=True, max_length=200)),
                ('city', models.CharField(blank=True, max_length=30)),
                ('state', models.CharField(blank=True, max_length=30)),
                ('postcode', models.CharField(blank=True, max_length=30)),
                ('birth_date', models.DateField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Election',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(default='', max_length=200)),
                ('picture',
                 models.FilePathField(default='blank.png',
                                      path='/static/dashboard/img/user/')),
            ],
        ),
        migrations.CreateModel(
            name='Grade',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(default='', max_length=200)),
                ('code', models.CharField(default='', max_length=10)),
                ('election',
                 models.ForeignKey(default=None,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='vote.Election')),
            ],
        ),
        migrations.CreateModel(
            name='Rating',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('candidate',
                 models.ForeignKey(default=None,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='vote.Candidate')),
                ('grade',
                 models.ForeignKey(default=None,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='vote.Grade')),
            ],
        ),
        migrations.CreateModel(
            name='Voter',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('picture',
                 models.FilePathField(default='blank.png',
                                      path='/static/dashboard/img/user/')),
                ('bio', models.TextField(blank=True, max_length=500)),
                ('street', models.TextField(blank=True, max_length=200)),
                ('city', models.CharField(blank=True, max_length=30)),
                ('state', models.CharField(blank=True, max_length=30)),
                ('postcode', models.CharField(blank=True, max_length=30)),
                ('birth_date', models.DateField(blank=True, null=True)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='rating',
            name='voter',
            field=models.ForeignKey(
                default=None,
                on_delete=django.db.models.deletion.CASCADE,
                to='vote.Voter'),
        ),
        migrations.AddField(
            model_name='candidate',
            name='election',
            field=models.ForeignKey(
                default=None,
                on_delete=django.db.models.deletion.CASCADE,
                to='vote.Election'),
        ),
        migrations.AddField(
            model_name='candidate',
            name='user',
            field=models.OneToOneField(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
    ]
예제 #6
0
class Migration(migrations.Migration):

    dependencies = [
        ('db', '0004_auto_20190302_1503'),
    ]

    operations = [
        migrations.CreateModel(
            name='HeatmapActual',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('intensity', models.IntegerField(default=5, validators=[django.core.validators.MaxValueValidator(10), django.core.validators.MinValueValidator(0)])),
                ('pincode', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='db.Region')),
            ],
        ),
        migrations.CreateModel(
            name='HeatmapPredicted',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('intensity', models.IntegerField(default=5, validators=[django.core.validators.MaxValueValidator(10), django.core.validators.MinValueValidator(0)])),
                ('pincode', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='db.Region')),
            ],
        ),
        migrations.CreateModel(
            name='Hospital',
            fields=[
                ('user_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
                ('malaria_free', models.PositiveSmallIntegerField()),
                ('tb_free', models.PositiveSmallIntegerField()),
                ('dengue_free', models.PositiveSmallIntegerField()),
                ('rating', models.IntegerField(default=3, validators=[django.core.validators.MaxValueValidator(5), django.core.validators.MinValueValidator(1)])),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            bases=('db.user',),
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='HospitalCurrent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('time', models.DateTimeField(auto_now_add=True)),
                ('malaria_rep', models.PositiveSmallIntegerField()),
                ('tb_rep', models.PositiveSmallIntegerField()),
                ('dengue_rep', models.PositiveSmallIntegerField()),
                ('malaria_dis', models.PositiveSmallIntegerField()),
                ('tb_dis', models.PositiveSmallIntegerField()),
                ('dengue_dis', models.PositiveSmallIntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Lab',
            fields=[
                ('user_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
                ('certificate', models.ImageField(upload_to='certificates/user_<built-in function id>/%Y/%m/%d')),
                ('owner', models.CharField(max_length=255)),
                ('govt_id', models.CharField(max_length=255)),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            bases=('db.user',),
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='News',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField()),
                ('article_author', models.CharField(max_length=255)),
                ('article_text_path', models.FilePathField(path='/')),
                ('article_img_path', models.FilePathField(path='/')),
                ('pincode', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='db.Region')),
            ],
        ),
        migrations.CreateModel(
            name='Predict',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('prediction_time', models.DateTimeField(auto_now_add=True)),
                ('disease_predicted', models.CharField(max_length=255)),
                ('pincode', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='db.Region')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='hospitalcurrent',
            name='hospital',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
예제 #7
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')),
                ('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')),
                ('username',
                 models.CharField(
                     db_index=True,
                     max_length=30,
                     unique=True,
                     validators=[
                         django.core.validators.RegexValidator(
                             '^[a-zA-Zа-яА-Я]*$',
                             message='допустимы только буквенные символы.')
                     ],
                     verbose_name='логин для входа в систему')),
                ('nickname',
                 models.CharField(
                     db_index=True,
                     max_length=30,
                     unique=True,
                     validators=[
                         django.core.validators.RegexValidator(
                             '^[0-9a-zA-Z]*$',
                             message=
                             'только буквенноцифровые символы допустимы.')
                     ],
                     verbose_name='имя пользователя в системе')),
                ('email',
                 models.EmailField(max_length=255,
                                   unique=True,
                                   verbose_name='электронная почта')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=40,
                                  null=True,
                                  verbose_name='имя пользователя')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=40,
                                  null=True,
                                  verbose_name='фамилия пользователя')),
                ('tagline',
                 models.CharField(blank=True,
                                  max_length=140,
                                  null=True,
                                  verbose_name='статус')),
                ('photo',
                 models.FilePathField(blank=True,
                                      default='defaultprofileimage.jpg',
                                      null=True,
                                      verbose_name='аватар')),
                ('phone',
                 models.CharField(
                     max_length=10,
                     null=True,
                     validators=[
                         django.core.validators.RegexValidator(
                             message='укажите правильный номер телефона',
                             regex='^\\d{10}$')
                     ],
                     verbose_name='сотовый телефон')),
                ('is_admin', models.BooleanField(default=False)),
                ('is_staff', models.BooleanField(default=False)),
                ('is_company', models.BooleanField(default=False)),
                ('date_joined',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='дата создания')),
                ('date_updated',
                 models.DateTimeField(auto_now=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': 'пользователи',
                'db_table': 'users',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
    ]
예제 #8
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Album',
            fields=[
                ('id_album', models.AutoField(primary_key=True, serialize=False)),
                ('titulo', models.CharField(default='2018-06-10 01:37:23.370672', max_length=40)),
                ('descripcion', models.TextField(blank=True, verbose_name='Descripción de la imagen')),
                ('thumbnail', models.ImageField(height_field=500, upload_to='thumbs', width_field=500)),
                ('fecha_creacion', models.DateTimeField(auto_now_add=True, verbose_name='Fecha de creación')),
                ('fecha_modificacion', models.DateTimeField(auto_now=True, verbose_name='Última edición')),
            ],
        ),
        migrations.CreateModel(
            name='Evento',
            fields=[
                ('id_evento', models.AutoField(primary_key=True, serialize=False)),
                ('nombre', models.CharField(max_length=80, unique=True)),
                ('ubicacion', models.CharField(max_length=80)),
                ('fecha_evento', models.DateTimeField()),
            ],
        ),
        migrations.CreateModel(
            name='Multimedia',
            fields=[
                ('id_multimedia', models.AutoField(primary_key=True, serialize=False)),
                ('titulo', models.CharField(default='image2018-06-10 01:37:23.371574', max_length=80)),
                ('descripción', models.TextField(blank=True, help_text='Descríbeme...')),
                ('path', models.FilePathField(allow_folders=True, path='media')),
                ('fecha_creacion', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Usuario',
            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')),
                ('telefono', phonenumber_field.modelfields.PhoneNumberField(max_length=128)),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Familiar',
            fields=[
                ('usuario_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            bases=('Galeria.usuario',),
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Image',
            fields=[
                ('multimedia_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='Galeria.Multimedia')),
                ('image_width', models.PositiveSmallIntegerField(default=640)),
                ('image_height', models.PositiveSmallIntegerField(default=480)),
                ('imagen', models.ImageField(height_field=models.PositiveSmallIntegerField(default=480), upload_to='files/img', verbose_name='Archivo de imagen', width_field=models.PositiveSmallIntegerField(default=640))),
            ],
            bases=('Galeria.multimedia',),
        ),
        migrations.AddField(
            model_name='usuario',
            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='usuario',
            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='multimedia',
            name='album',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Galeria.Album'),
        ),
        migrations.AddField(
            model_name='album',
            name='evento',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Galeria.Evento'),
        ),
        migrations.AddField(
            model_name='album',
            name='usuario',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='album',
            name='familiar',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Administrador', to='Galeria.Familiar'),
        ),
    ]
예제 #9
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')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Recall',
            fields=[
                ('Recall_ID',
                 models.AutoField(primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('Recall_CODE',
                 models.CharField(max_length=500,
                                  verbose_name='Rückruf-Code')),
                ('Recall_NAME',
                 models.CharField(max_length=500, verbose_name='Name')),
                ('Recall_DESCRIPTION',
                 models.CharField(max_length=500,
                                  verbose_name='Beschreibung')),
                ('Recall_START_DATE',
                 models.DateField(blank=True, verbose_name='Startdatum')),
                ('Recall_PLANNED_COMPLETATION_DATE',
                 models.DateField(
                     blank=True,
                     verbose_name='Geplantes Fertigstellungsdatum')),
                ('Recall_STATUS',
                 models.SmallIntegerField(choices=[(0, 'Erstellt'),
                                                   (1, 'In Planung'),
                                                   (2, 'In Bearbeitung'),
                                                   (3, 'Abgeschlossen'),
                                                   (4, 'Abgebrochen')],
                                          default=0,
                                          verbose_name='Status')),
                ('Recall_DATE_COMPLETED',
                 models.DateField(
                     blank=True,
                     verbose_name='Tatsächliches Fertigstellungsdatum')),
            ],
        ),
        migrations.CreateModel(
            name='Vehicle',
            fields=[
                ('Vehicle_ID',
                 models.AutoField(primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('Vehicle_VIN',
                 models.CharField(max_length=30, verbose_name='FIN')),
                ('Vehicle_PLATE',
                 models.CharField(max_length=10, verbose_name='Kennzeichen')),
                ('Vehicel_MAKE',
                 models.CharField(max_length=30, verbose_name='Hersteller')),
                ('Vehicle_MODEL',
                 models.CharField(max_length=30, verbose_name='Modell')),
                ('Vehicle_TYPE',
                 models.CharField(max_length=60, verbose_name='Typ')),
                ('Vehicle_SERIES',
                 models.CharField(max_length=30, verbose_name='Baureihe')),
                ('Vehicle_FIRST_REGISTRATION_DATE',
                 models.DateField(verbose_name='Erstzulassungsdatum')),
            ],
        ),
        migrations.CreateModel(
            name='Workshop',
            fields=[
                ('Workshop_ID',
                 models.AutoField(primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('Workshop_EXTERNAL_ID',
                 models.CharField(max_length=10, verbose_name='externe ID')),
                ('Workshop_NAME',
                 models.CharField(max_length=50, verbose_name='Name')),
                ('Workshop_ADDRESS',
                 models.CharField(max_length=70, verbose_name='Adresse')),
                ('Workshop_ZIP',
                 models.CharField(max_length=10, verbose_name='PLZ')),
                ('Workshop_CITY',
                 models.CharField(max_length=50, verbose_name='Stadt')),
                ('Workshop_Email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='Email')),
                ('Workshop_PHONE',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='Telefon')),
            ],
        ),
        migrations.CreateModel(
            name='Vehicel_Recall',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('VR_STATUS',
                 models.SmallIntegerField(choices=[(0, 'Offen'),
                                                   (1, 'Vorbelegt'),
                                                   (0, 'Abgeschlossen')],
                                          default=0,
                                          verbose_name='Status')),
                ('VR_DATE_CREATED',
                 models.DateField(auto_now=True, verbose_name='Anlagedatum')),
                ('VR_DATE_COMPLETED',
                 models.DateField(blank=True,
                                  verbose_name='Fertigstellungsdatum')),
                ('Recall',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='dfa_App.Recall')),
                ('Vehicle',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='dfa_App.Vehicle')),
            ],
        ),
        migrations.CreateModel(
            name='Recall_Docs',
            fields=[
                ('Document_ID',
                 models.AutoField(primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('Document_CLASS',
                 models.SmallIntegerField(choices=[(0, 'Anleitung'),
                                                   (1,
                                                    'Technische Information'),
                                                   (2, 'Anschreiben'),
                                                   (3, 'Sonstiges')],
                                          default=3,
                                          verbose_name='Dokumententyp')),
                ('Document_PATH',
                 models.FilePathField(
                     path=
                     'C:\\Users\\felix\\Desktop\\Projects\\my_env\\dfa\\dfa_App\\media\\uploads\\documents\\',
                     verbose_name='Upload Pfad')),
                ('Recall',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='dfa_App.Recall')),
            ],
        ),
        migrations.CreateModel(
            name='Note',
            fields=[
                ('Note_ID',
                 models.AutoField(primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('Note_TEXT',
                 models.CharField(max_length=500, verbose_name='Bemerkung')),
                ('Note_DATE',
                 models.DateTimeField(auto_now=True,
                                      verbose_name='Zeitpunkt')),
                ('Note_ODOMETER',
                 models.IntegerField(verbose_name='Kilometerstand')),
                ('User',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
                ('Vehicle',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='dfa_App.Vehicle')),
            ],
        ),
        migrations.CreateModel(
            name='History',
            fields=[
                ('History_ID',
                 models.AutoField(primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('History_EXTERNAL_ID',
                 models.CharField(max_length=500, verbose_name='Externe ID')),
                ('History_DESCRIPTION',
                 models.CharField(max_length=500,
                                  verbose_name='Beschreibung')),
                ('History_ODOMETER',
                 models.IntegerField(verbose_name='Kilometerstand')),
                ('History_DATE', models.DateField(verbose_name='Datum')),
                ('Vehicle',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='dfa_App.Vehicle')),
                ('Workshop',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='dfa_App.Workshop')),
            ],
        ),
        migrations.AddField(
            model_name='user',
            name='Workshop',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='dfa_App.Workshop'),
        ),
        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'),
        ),
    ]
예제 #10
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')),
                ('cedula', models.IntegerField(null=True)),
                ('telefono',
                 models.CharField(blank=True, max_length=20, null=True)),
                ('fecha_nacimiento', models.DateField(blank=True, null=True)),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Apartment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('apto',
                 models.CharField(choices=[('a', 'A'), ('b', 'B'), ('c', 'C'),
                                           ('d', 'D')],
                                  default='a',
                                  max_length=1)),
                ('torres',
                 models.CharField(choices=[(1, '1'), (2, '2'), (3, '3'),
                                           (4, '4'), (5, '5'), (6, '6')],
                                  default=1,
                                  max_length=1)),
                ('piso',
                 models.CharField(choices=[(0, 'PB'), (1, '1'), (2, '2'),
                                           (3, '3')],
                                  default=0,
                                  max_length=1)),
                ('deuda', models.BigIntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='Arduino',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('cadena', models.CharField(max_length=10)),
            ],
        ),
        migrations.CreateModel(
            name='Luces',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('parque', models.BooleanField()),
                ('mesas', models.BooleanField()),
                ('estacionamiento1', models.BooleanField()),
                ('estacionamiento2', models.BooleanField()),
            ],
        ),
        migrations.CreateModel(
            name='Tanque',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('volumen', models.IntegerField()),
                ('time', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='RegUser',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('luz',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='cond.Luces')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Recibo',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('recibourl',
                 models.FilePathField(path='cond/static/cond/recibos')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Porton',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='user',
            name='apartament',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='cond.Apartment'),
        ),
        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'),
        ),
    ]
예제 #11
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')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('type',
                 models.CharField(choices=[('shop', 'Магазин'),
                                           ('buyer', 'Покупатель')],
                                  default='buyer',
                                  max_length=5,
                                  verbose_name='Тип пользователя')),
                ('company',
                 models.CharField(blank=True,
                                  max_length=40,
                                  verbose_name='Компания')),
                ('position',
                 models.CharField(blank=True,
                                  max_length=40,
                                  verbose_name='Должность')),
                ('is_active', 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': 'Пользователь',
                'verbose_name_plural': 'Пользователи',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Cart',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
            ],
            options={
                'verbose_name_plural': 'Корзина',
            },
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=40, verbose_name='Название')),
            ],
            options={
                'verbose_name': 'Категория',
                'verbose_name_plural': 'Список категорий',
                'ordering': ('-name', ),
            },
        ),
        migrations.CreateModel(
            name='Contact',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('city', models.CharField(max_length=50,
                                          verbose_name='Город')),
                ('street',
                 models.CharField(max_length=100, verbose_name='Улица')),
                ('house',
                 models.CharField(blank=True,
                                  max_length=15,
                                  verbose_name='Дом')),
                ('structure',
                 models.CharField(blank=True,
                                  max_length=15,
                                  verbose_name='Корпус')),
                ('building',
                 models.CharField(blank=True,
                                  max_length=15,
                                  verbose_name='Строение')),
                ('apartment',
                 models.CharField(blank=True,
                                  max_length=15,
                                  verbose_name='Квартира')),
                ('phone',
                 models.CharField(max_length=20, verbose_name='Телефон')),
                ('user',
                 models.ForeignKey(blank=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='contacts',
                                   to=settings.AUTH_USER_MODEL,
                                   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')),
                ('external_id',
                 models.PositiveIntegerField(
                     null=True, verbose_name='Дополнительный ID')),
                ('dt', models.DateTimeField(auto_now_add=True)),
                ('state',
                 models.CharField(choices=[('new', 'Новый'),
                                           ('confirmed', 'Подтвержден'),
                                           ('assembled', 'Собран'),
                                           ('sent', 'Отправлен'),
                                           ('delivered', 'Доставлен'),
                                           ('canceled', 'Отменен')],
                                  default='new',
                                  max_length=15,
                                  verbose_name='Статус')),
                ('total_summ',
                 models.PositiveIntegerField(default=0, verbose_name='Cумма')),
                ('order_pdf',
                 models.FilePathField(blank=True,
                                      null=True,
                                      verbose_name='Заказ в PDF')),
                ('contact',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='backend.Contact',
                     verbose_name='Контакт')),
            ],
            options={
                'verbose_name': 'Заказ',
                'verbose_name_plural': 'Список заказ',
                'ordering': ('-dt', ),
            },
        ),
        migrations.CreateModel(
            name='Parameter',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=40, verbose_name='Название')),
            ],
            options={
                'verbose_name': 'Имя параметра',
                'verbose_name_plural': 'Список имен параметров',
                'ordering': ('-name', ),
            },
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=80, verbose_name='Название')),
                ('on_sale',
                 models.BooleanField(default=True, verbose_name='На продаже')),
                ('category',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='products',
                                   to='backend.Category',
                                   verbose_name='Категория')),
            ],
            options={
                'verbose_name': 'Продукт',
                'verbose_name_plural': 'Список продуктов',
                'ordering': ('-name', ),
            },
        ),
        migrations.CreateModel(
            name='ProductInfo',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('model',
                 models.CharField(blank=True,
                                  max_length=80,
                                  verbose_name='Модель')),
                ('external_id',
                 models.PositiveIntegerField(verbose_name='Внешний ИД')),
                ('quantity',
                 models.PositiveIntegerField(verbose_name='Количество')),
                ('price', models.PositiveIntegerField(verbose_name='Цена')),
                ('price_rrc',
                 models.PositiveIntegerField(
                     verbose_name='Рекомендуемая розничная цена')),
                ('product',
                 models.ForeignKey(blank=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='product_infos',
                                   to='backend.Product',
                                   verbose_name='Продукт')),
            ],
            options={
                'verbose_name': 'Информация о продукте',
                'verbose_name_plural': 'Информационный список о продуктах',
            },
        ),
        migrations.CreateModel(
            name='Shop',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=50, verbose_name='Название')),
                ('url',
                 models.URLField(blank=True, null=True,
                                 verbose_name='Ссылка')),
                ('state',
                 models.BooleanField(default=True,
                                     verbose_name='статус получения заказов')),
                ('user',
                 models.OneToOneField(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL,
                     verbose_name='Пользователь')),
            ],
            options={
                'verbose_name': 'Магазин',
                'verbose_name_plural': 'Список магазинов',
                'ordering': ('-name', ),
            },
        ),
        migrations.CreateModel(
            name='ProductParameter',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('value',
                 models.CharField(max_length=100, verbose_name='Значение')),
                ('parameter',
                 models.ForeignKey(blank=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='product_parameters',
                                   to='backend.Parameter',
                                   verbose_name='Параметр')),
                ('product_info',
                 models.ForeignKey(blank=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='product_parameters',
                                   to='backend.ProductInfo',
                                   verbose_name='Информация о продукте')),
            ],
            options={
                'verbose_name': 'Параметр',
                'verbose_name_plural': 'Список параметров',
            },
        ),
        migrations.AddField(
            model_name='productinfo',
            name='shop',
            field=models.ForeignKey(
                blank=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='product_infos',
                to='backend.Shop',
                verbose_name='Магазин'),
        ),
        migrations.CreateModel(
            name='OrderItem',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('quantity',
                 models.PositiveIntegerField(verbose_name='Количество')),
                ('order',
                 models.ForeignKey(blank=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='ordered_items',
                                   to='backend.Order',
                                   verbose_name='Заказ')),
                ('product_info',
                 models.ForeignKey(blank=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='ordered_items',
                                   to='backend.ProductInfo',
                                   verbose_name='Информация о продукте')),
            ],
            options={
                'verbose_name': 'Заказанная позиция',
                'verbose_name_plural': 'Список заказанных позиций',
            },
        ),
        migrations.AddField(
            model_name='order',
            name='items',
            field=models.ManyToManyField(related_name='ordered_items',
                                         to='backend.OrderItem'),
        ),
        migrations.AddField(
            model_name='order',
            name='shop',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='backend.Shop',
                verbose_name='Магазин'),
        ),
        migrations.AddField(
            model_name='order',
            name='user',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name='orders',
                to=settings.AUTH_USER_MODEL,
                verbose_name='Пользователь'),
        ),
        migrations.CreateModel(
            name='ConformaionCode',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('code', models.CharField(max_length=100)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='category',
            name='shops',
            field=models.ManyToManyField(blank=True,
                                         related_name='categories',
                                         to='backend.Shop',
                                         verbose_name='Магазины'),
        ),
        migrations.CreateModel(
            name='CartItem',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('quantity',
                 models.IntegerField(default=0, verbose_name='Количество')),
                ('cart',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='cart_items',
                                   to='backend.Cart')),
                ('product_info',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='backend.ProductInfo',
                                   verbose_name='Товар')),
            ],
        ),
        migrations.AddField(
            model_name='cart',
            name='items',
            field=models.ManyToManyField(blank=True,
                                         related_name='cart_items',
                                         to='backend.CartItem'),
        ),
        migrations.AddField(
            model_name='cart',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL,
                verbose_name='Пользователь'),
        ),
        migrations.AddConstraint(
            model_name='productparameter',
            constraint=models.UniqueConstraint(
                fields=('product_info', 'parameter'),
                name='unique_product_parameter'),
        ),
        migrations.AddConstraint(
            model_name='productinfo',
            constraint=models.UniqueConstraint(fields=('product', 'shop',
                                                       'external_id'),
                                               name='unique_product_info'),
        ),
        migrations.AddConstraint(
            model_name='orderitem',
            constraint=models.UniqueConstraint(fields=('order_id',
                                                       'product_info'),
                                               name='unique_order_item'),
        ),
    ]
예제 #12
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Newusers',
            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')),
                ('qq',
                 models.IntegerField(blank=True,
                                     null=True,
                                     unique=True,
                                     verbose_name='qq')),
                ('mobile',
                 models.IntegerField(blank=True,
                                     null=True,
                                     unique=True,
                                     verbose_name='手机号')),
                ('login_lock',
                 models.BooleanField(default=False, verbose_name='是否锁定')),
                ('status', models.BooleanField(default=False,
                                               verbose_name='状态')),
                ('token',
                 models.CharField(max_length=252,
                                  null=True,
                                  verbose_name='token')),
                ('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': '用户',
                'ordering': ['-id'],
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='FunctionalLofic',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('makedatye',
                 models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('desc', models.CharField(max_length=252,
                                          verbose_name='功能描述')),
                ('functionname',
                 models.CharField(max_length=16,
                                  null=True,
                                  verbose_name='功能名称')),
                ('status', models.BooleanField(default=False,
                                               verbose_name='状态')),
                ('update',
                 models.CharField(max_length=8, null=True,
                                  verbose_name='更新人')),
                ('update_time',
                 models.DateTimeField(default=datetime.datetime(
                     2021, 8, 21, 15, 35, 13, 70128),
                                      verbose_name='更新时间')),
            ],
            options={
                'verbose_name': '功能',
                'verbose_name_plural': '功能',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='JiekouDeail',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('useuser',
                 models.CharField(max_length=64, null=True,
                                  verbose_name='使用')),
                ('usedate',
                 models.DateTimeField(auto_now_add=True, verbose_name='调用时间')),
                ('useip', models.CharField(max_length=252,
                                           verbose_name='调用者ip')),
                ('userheaders',
                 models.CharField(max_length=252, verbose_name='调用者请求头')),
                ('userjiekou',
                 models.CharField(max_length=252, verbose_name='调用接口')),
            ],
            options={
                'verbose_name': '接口调用',
                'verbose_name_plural': '接口调用',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='Mode',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('makedate',
                 models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('name', models.CharField(max_length=32, verbose_name='名称')),
                ('status', models.BooleanField(default=False,
                                               verbose_name='状态')),
                ('makeuser',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': '模块',
                'verbose_name_plural': '模块',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='Project',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=32, verbose_name='名称')),
                ('desc',
                 models.CharField(max_length=255, null=True,
                                  verbose_name='简介')),
                ('makedate',
                 models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('status', models.BooleanField(default=False,
                                               verbose_name='状态')),
                ('fenlei',
                 models.CharField(choices=[('app', 'app'), ('web', 'web')],
                                  max_length=8,
                                  null=True,
                                  verbose_name='类型')),
                ('proeject',
                 models.CharField(default='android',
                                  max_length=8,
                                  null=True,
                                  verbose_name='项目类型')),
                ('change_time',
                 models.DateTimeField(auto_now_add=True, verbose_name='更新时间')),
                ('makeuser',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': '项目',
                'verbose_name_plural': '项目',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='TaskList',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('status', models.BooleanField(default=False,
                                               verbose_name='状态')),
                ('tasktype',
                 models.IntegerField(blank=True,
                                     default=0,
                                     null=True,
                                     verbose_name='任务状态')),
                ('taskiphonetype',
                 models.CharField(default='android',
                                  max_length=8,
                                  verbose_name='任务设备')),
                ('project', models.IntegerField(blank=True,
                                                verbose_name='所属项目')),
                ('runphonenum',
                 models.IntegerField(blank=True,
                                     default=1,
                                     null=True,
                                     verbose_name='执行设备数')),
                ('iscollectperformncedata',
                 models.BooleanField(default=True, verbose_name='是否收集性能数据')),
                ('tasklisttype',
                 models.IntegerField(blank=True,
                                     default=0,
                                     verbose_name='任务列表的类型')),
            ],
            options={
                'verbose_name': '任务列表',
                'verbose_name_plural': '任务列表',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='TasklistCase',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('status', models.BooleanField(default=False,
                                               verbose_name='状态')),
                ('task',
                 models.IntegerField(blank=True,
                                     null=True,
                                     verbose_name='执行任务')),
                ('caserun',
                 models.IntegerField(blank=True,
                                     null=True,
                                     verbose_name='执行caseID')),
            ],
            options={
                'verbose_name': '任务用例表',
                'verbose_name_plural': '任务用例表',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='TasklistTask',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('status', models.BooleanField(default=False,
                                               verbose_name='状态')),
                ('task',
                 models.IntegerField(blank=True,
                                     null=True,
                                     verbose_name='执行任务')),
                ('taskrun',
                 models.IntegerField(blank=True,
                                     null=True,
                                     verbose_name='执行任务ID')),
            ],
            options={
                'verbose_name': '任务定时任务表',
                'verbose_name_plural': '任务定时任务表',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='Testcase',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('makedate',
                 models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('casenum',
                 models.CharField(default=1,
                                  max_length=252,
                                  unique=True,
                                  verbose_name='测试用例编号')),
                ('data', models.CharField(max_length=252, verbose_name='参数')),
                ('yilai',
                 models.BooleanField(default=False, verbose_name='是否依赖登录')),
                ('is_yilai',
                 models.BooleanField(default=False,
                                     verbose_name='是否作为项目登录的依赖')),
                ('asser', models.CharField(max_length=252, verbose_name='预期')),
                ('savetest',
                 models.BooleanField(default=False, verbose_name='是否保存测试结果')),
                ('status', models.BooleanField(default=False,
                                               verbose_name='状态')),
            ],
            options={
                'verbose_name': '测试用例',
                'verbose_name_plural': '测试用例',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='Testeven',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('makedate',
                 models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('status', models.BooleanField(default=False,
                                               verbose_name='状态')),
                ('name',
                 models.CharField(default='开发环境',
                                  max_length=252,
                                  verbose_name='测试环境名字')),
                ('url_test',
                 models.CharField(max_length=252, verbose_name='url')),
                ('port_test',
                 models.IntegerField(default=80, verbose_name='port')),
                ('projetc',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='app.project')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': '测试环境',
                'verbose_name_plural': '测试环境',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='Work',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('makedate',
                 models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('zhiwei', models.CharField(max_length=32, verbose_name='职位')),
                ('status',
                 models.BooleanField(default=False, verbose_name='是否删除')),
            ],
            options={
                'verbose_name': '工作',
                'verbose_name_plural': '工作',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='Timmingtask',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=64,
                                          verbose_name='定时任务名字')),
                ('taskstart',
                 models.CharField(max_length=64, verbose_name='任务执行时间')),
                ('taskmakedate',
                 models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('taskiphonetype',
                 models.CharField(default='android',
                                  max_length=8,
                                  verbose_name='任务设备类型')),
                ('taskiphonenum',
                 models.IntegerField(default=1,
                                     max_length=8,
                                     verbose_name='任务设备的数量')),
                ('status',
                 models.BooleanField(default=False, verbose_name='任务状态')),
                ('yunxing_status',
                 models.CharField(default='创建',
                                  max_length=16,
                                  verbose_name='任务的运行状态,')),
                ('case', models.ManyToManyField(to='app.Testcase')),
                ('makeuser',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
                ('prject',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='app.project')),
                ('tesevent',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='app.testeven')),
            ],
            options={
                'verbose_name': '定时任务',
                'verbose_name_plural': '定时任务',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='Testreport',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('testcallnum',
                 models.CharField(max_length=252, verbose_name='测试报告编号')),
                ('tatal', models.IntegerField(verbose_name='总计')),
                ('passnum',
                 models.IntegerField(blank=True, null=True,
                                     verbose_name='通过')),
                ('failnum',
                 models.IntegerField(blank=True, null=True,
                                     verbose_name='失败')),
                ('errornum',
                 models.IntegerField(blank=True, null=True,
                                     verbose_name='错误')),
                ('testhour',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='测试耗时')),
                ('makedate',
                 models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('testlog',
                 models.FilePathField(null=True,
                                      path='/testreport/',
                                      verbose_name='测试日志')),
                ('testrept',
                 models.FilePathField(null=True,
                                      path='/testreport/',
                                      verbose_name='测试报告')),
                ('status', models.BooleanField(default=False,
                                               verbose_name='状态')),
                ('mode',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='app.mode')),
                ('project',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='app.project')),
                ('task',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='app.timmingtask')),
                ('testeven',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='app.testeven')),
                ('testuser',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': '测试报告',
                'verbose_name_plural': '测试报告',
                'ordering': ['-id'],
            },
        ),
        migrations.AddField(
            model_name='testcase',
            name='events',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='app.testeven'),
        ),
        migrations.AddField(
            model_name='testcase',
            name='luoji',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='app.functionallofic'),
        ),
        migrations.AddField(
            model_name='testcase',
            name='mode',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='app.mode'),
        ),
        migrations.AddField(
            model_name='testcase',
            name='project',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='app.project'),
        ),
        migrations.AddField(
            model_name='testcase',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.CreateModel(
            name='Test_xing',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('cpu',
                 models.CharField(max_length=16, null=True,
                                  verbose_name='CPU')),
                ('neicun',
                 models.CharField(max_length=16, null=True,
                                  verbose_name='内存')),
                ('shangxing',
                 models.CharField(max_length=16,
                                  null=True,
                                  verbose_name='上传流量')),
                ('xiaxing',
                 models.CharField(max_length=16,
                                  null=True,
                                  verbose_name='下行流量')),
                ('make_date',
                 models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('shebei', models.CharField(max_length=16, verbose_name='设备')),
                ('jihe',
                 models.CharField(max_length=8,
                                  null=True,
                                  verbose_name='几核CPU')),
                ('fix',
                 models.CharField(max_length=8, null=True,
                                  verbose_name='分辨率')),
                ('xitongbanben',
                 models.CharField(max_length=8, null=True,
                                  verbose_name='系统版本')),
                ('xinghao',
                 models.CharField(max_length=8, null=True, verbose_name='型号')),
                ('pinpai',
                 models.CharField(max_length=8, null=True, verbose_name='品牌')),
                ('status', models.BooleanField(default=False,
                                               verbose_name='状态')),
                ('functionluo',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='app.functionallofic')),
                ('testreport',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='app.testreport')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': '测试性能',
                'verbose_name_plural': '测试性能',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='Project_user',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('is_guanliyuan',
                 models.BooleanField(default=False, verbose_name='项目管理员')),
                ('productname',
                 models.ManyToManyField(null=True, to='app.Project')),
                ('username',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='mode',
            name='project',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='app.project'),
        ),
        migrations.AddField(
            model_name='functionallofic',
            name='mode',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='app.mode'),
        ),
        migrations.AddField(
            model_name='functionallofic',
            name='project',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE, to='app.project'),
        ),
        migrations.AddField(
            model_name='functionallofic',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.CreateModel(
            name='Function_element',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('makedatye',
                 models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('desc',
                 models.CharField(max_length=252,
                                  null=True,
                                  verbose_name='步骤描述')),
                ('element_api',
                 models.CharField(max_length=8, verbose_name='定位api')),
                ('index',
                 models.IntegerField(default=0, null=True, verbose_name='索引')),
                ('element_ty',
                 models.CharField(choices=[('id', 'id'), ('name', 'name'),
                                           ('css_selector', 'css selector'),
                                           ('xpath', 'xpath'),
                                           ('class_name', 'class name'),
                                           ('tag_name', 'tag name'),
                                           ('link_text', 'link text'),
                                           ('portial_link_text',
                                            'portial link text')],
                                  max_length=32,
                                  null=True,
                                  verbose_name='定位的类型')),
                ('elemnet_by',
                 models.CharField(max_length=252, null=True,
                                  verbose_name='定位')),
                ('caozuo',
                 models.CharField(choices=[('click', 'click'),
                                           ('sendkeys', 'sendkeys')],
                                  max_length=32,
                                  null=True,
                                  verbose_name='操作')),
                ('canshu',
                 models.CharField(max_length=252, null=True,
                                  verbose_name='参数')),
                ('is_asser',
                 models.BooleanField(default=False, verbose_name='是否是断言')),
                ('xianhoui', models.IntegerField(default=0,
                                                 verbose_name='先后顺序')),
                ('status', models.BooleanField(default=False,
                                               verbose_name='状态')),
                ('function',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='app.functionallofic')),
                ('user',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': '逻辑',
                'verbose_name_plural': '逻辑',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='Casetestresult',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('status', models.BooleanField(default=False,
                                               verbose_name='状态')),
                ('makedate',
                 models.DateTimeField(auto_now_add=True, verbose_name='时间')),
                ('testreport',
                 models.CharField(max_length=252, verbose_name='测试结果')),
                ('case',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='app.testcase')),
                ('events',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='app.testeven')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': '测试结果',
                'verbose_name_plural': '测试结果',
                'ordering': ['-id'],
            },
        ),
        migrations.AddField(
            model_name='newusers',
            name='work',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='app.work'),
        ),
    ]
예제 #13
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Author',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(max_length=50)),
                ('last_name', models.CharField(max_length=50)),
                ('birth_date', models.DateField()),
                ('photo', models.FilePathField(default='img/no_photo.png', path='BookList/static/img/')),
            ],
        ),
        migrations.CreateModel(
            name='Book',
            fields=[
                ('ISBN', models.CharField(max_length=13, primary_key=True, serialize=False, unique=True)),
                ('title', models.CharField(max_length=50)),
                ('cover_page', models.FilePathField(path='BookList/static/img/')),
                ('synopsis', models.TextField()),
                ('release_date', models.DateField()),
                ('authors', models.ManyToManyField(to='BookList.Author')),
            ],
        ),
        migrations.CreateModel(
            name='List',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('books', models.ManyToManyField(to='BookList.Book')),
            ],
        ),
        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')),
                ('birth_date', models.DateField(null=True)),
                ('photo', models.FilePathField(default='img/no_photo.png', path='BookList/static/img/')),
                ('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')),
                ('lists', models.ManyToManyField(to='BookList.List')),
                ('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()),
            ],
        ),
    ]