Пример #1
0
class Migration(migrations.Migration):

    dependencies = [
        ('backend', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Html',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('signature_code', models.CharField(max_length=32)),
                ('name', models.CharField(max_length=256)),
                ('html_code', models.TextField()),
                ('count', models.IntegerField()),
                ('category', models.CharField(max_length=256)),
                ('code_type', models.CharField(max_length=32)),
                ('created_at',
                 models.FloatField(default=backend.models.get_created_at)),
                ('updated_at',
                 models.FloatField(default=backend.models.get_created_at)),
                ('user',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='signatures',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Пример #2
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Poll',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('description', models.CharField(max_length=300)),
                ('startDate', models.DateField()),
                ('finishDate', models.DateField()),
            ],
        ),
        migrations.CreateModel(
            name='Submission',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('userId', models.IntegerField(db_index=True)),
                ('submitTime', models.DateTimeField(auto_now_add=True)),
                ('poll', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Poll')),
            ],
        ),
        migrations.CreateModel(
            name='Question',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(max_length=30, validators=[backend.models.validateQuestionType])),
                ('text', models.CharField(max_length=300)),
                ('poll', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Poll')),
            ],
        ),
        migrations.CreateModel(
            name='Option',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('index', models.PositiveIntegerField()),
                ('text', models.CharField(max_length=100)),
                ('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Question')),
            ],
        ),
        migrations.CreateModel(
            name='Answer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('questionType', models.CharField(max_length=30, validators=[backend.models.validateQuestionType])),
                ('questionText', models.CharField(max_length=300)),
                ('answerText', models.CharField(max_length=300)),
                ('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Question')),
                ('submission', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Submission')),
            ],
        ),
    ]
Пример #3
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(default='NULL', max_length=256,
                                  unique=True)),
                ('details', models.CharField(max_length=512)),
                ('image',
                 models.ImageField(upload_to=backend.models.upload_task)),
            ],
        ),
        migrations.CreateModel(
            name='Submission',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(
                     upload_to=backend.models.upload_submission)),
                ('score', models.IntegerField(blank=True, null=True)),
                ('task',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='backend.task')),
            ],
        ),
    ]
Пример #4
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Cart',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_archived', models.BooleanField(blank=True, default=False)),
                ('is_published', models.BooleanField(blank=True, default=True)),
                ('created_date', models.DateTimeField(blank=True, default=django.utils.timezone.now, editable=False)),
                ('modified_date', models.DateTimeField(blank=True, editable=False, null=True)),
                ('ref', models.CharField(blank=True, max_length=10, null=True)),
                ('total', models.IntegerField(default=0)),
                ('status', models.CharField(default='Open', max_length=25)),
            ],
            options={
                'abstract': False,
                'ordering': ['-created_date'],
            },
        ),
        migrations.CreateModel(
            name='Catalog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_archived', models.BooleanField(blank=True, default=False)),
                ('is_published', models.BooleanField(blank=True, default=True)),
                ('created_date', models.DateTimeField(blank=True, default=django.utils.timezone.now, editable=False)),
                ('modified_date', models.DateTimeField(blank=True, editable=False, null=True)),
                ('title', models.CharField(max_length=50)),
                ('slug', models.SlugField(unique=True)),
                ('picture', models.FileField(null=True, upload_to='catalogs')),
            ],
            options={
                'abstract': False,
                'ordering': ['-created_date'],
            },
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_archived', models.BooleanField(blank=True, default=False)),
                ('is_published', models.BooleanField(blank=True, default=True)),
                ('created_date', models.DateTimeField(blank=True, default=django.utils.timezone.now, editable=False)),
                ('modified_date', models.DateTimeField(blank=True, editable=False, null=True)),
                ('title', models.CharField(max_length=50)),
                ('slug', models.SlugField(unique=True)),
                ('picture', models.FileField(null=True, upload_to='categories')),
            ],
            options={
                'abstract': False,
                'ordering': ['-created_date'],
            },
        ),
        migrations.CreateModel(
            name='Collection',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_archived', models.BooleanField(blank=True, default=False)),
                ('is_published', models.BooleanField(blank=True, default=True)),
                ('created_date', models.DateTimeField(blank=True, default=django.utils.timezone.now, editable=False)),
                ('modified_date', models.DateTimeField(blank=True, editable=False, null=True)),
                ('title', models.CharField(max_length=50)),
                ('slug', models.SlugField(unique=True)),
                ('picture', models.FileField(null=True, upload_to='collections')),
            ],
            options={
                'abstract': False,
                'ordering': ['-created_date'],
            },
        ),
        migrations.CreateModel(
            name='Color',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_archived', models.BooleanField(blank=True, default=False)),
                ('is_published', models.BooleanField(blank=True, default=True)),
                ('created_date', models.DateTimeField(blank=True, default=django.utils.timezone.now, editable=False)),
                ('modified_date', models.DateTimeField(blank=True, editable=False, null=True)),
                ('title', models.CharField(max_length=200)),
                ('slug', models.SlugField(unique=True)),
                ('picture', models.FileField(null=True, upload_to='motifs')),
            ],
            options={
                'abstract': False,
                'ordering': ['-created_date'],
            },
        ),
        migrations.CreateModel(
            name='Group',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_archived', models.BooleanField(blank=True, default=False)),
                ('is_published', models.BooleanField(blank=True, default=True)),
                ('created_date', models.DateTimeField(blank=True, default=django.utils.timezone.now, editable=False)),
                ('modified_date', models.DateTimeField(blank=True, editable=False, null=True)),
                ('title', models.CharField(max_length=100)),
                ('slug', models.SlugField(unique=True)),
            ],
            options={
                'abstract': False,
                'ordering': ['-created_date'],
            },
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_archived', models.BooleanField(blank=True, default=False)),
                ('is_published', models.BooleanField(blank=True, default=True)),
                ('created_date', models.DateTimeField(blank=True, default=django.utils.timezone.now, editable=False)),
                ('modified_date', models.DateTimeField(blank=True, editable=False, null=True)),
                ('ref', models.CharField(max_length=12)),
                ('title', models.CharField(max_length=50)),
                ('slug', models.SlugField(unique=True)),
                ('price', models.IntegerField()),
                ('description', models.TextField(default='')),
                ('material', models.CharField(blank=True, max_length=150, null=True)),
                ('is_feature', models.BooleanField(default=False)),
                ('is_discount', models.BooleanField(default=False)),
                ('catalog', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='backend.Catalog')),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Category')),
                ('collection', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='backend.Collection')),
            ],
            options={
                'abstract': False,
                'ordering': ['-created_date'],
            },
        ),
        migrations.CreateModel(
            name='Size',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_archived', models.BooleanField(blank=True, default=False)),
                ('is_published', models.BooleanField(blank=True, default=True)),
                ('created_date', models.DateTimeField(blank=True, default=django.utils.timezone.now, editable=False)),
                ('modified_date', models.DateTimeField(blank=True, editable=False, null=True)),
                ('name', models.CharField(max_length=50)),
                ('size_system', models.CharField(default='', max_length=20)),
                ('quantity', models.IntegerField(default=0)),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Category')),
            ],
            options={
                'abstract': False,
                'ordering': ['-created_date'],
            },
        ),
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('gender', models.CharField(max_length=10)),
                ('title', models.CharField(blank=True, max_length=4, null=True)),
                ('phone_number', models.CharField(blank=True, max_length=50, null=True)),
                ('first_name', models.CharField(blank=True, max_length=100, null=True)),
                ('last_name', models.CharField(blank=True, max_length=100, null=True)),
                ('city', models.CharField(blank=True, max_length=100, null=True)),
                ('country', models.CharField(blank=True, max_length=100, null=True)),
                ('address', models.CharField(blank=True, default='', max_length=250, null=True)),
                ('birth_date', models.DateField(blank=True, null=True)),
                ('created_date', models.DateTimeField(blank=True, default=django.utils.timezone.now, editable=False)),
                ('modified_date', models.DateTimeField(blank=True, editable=False, null=True)),
                ('user', models.OneToOneField(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='userprofile', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Variety',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_archived', models.BooleanField(blank=True, default=False)),
                ('is_published', models.BooleanField(blank=True, default=True)),
                ('created_date', models.DateTimeField(blank=True, default=django.utils.timezone.now, editable=False)),
                ('modified_date', models.DateTimeField(blank=True, editable=False, null=True)),
                ('quantity', models.IntegerField(default=0)),
                ('picture1', models.FileField(blank=True, null=True, upload_to=backend.models.product_variety_image_path)),
                ('picture2', models.FileField(blank=True, null=True, upload_to=backend.models.product_variety_image_path)),
                ('picture3', models.FileField(blank=True, null=True, upload_to=backend.models.product_variety_image_path)),
                ('picture4', models.FileField(blank=True, null=True, upload_to=backend.models.product_variety_image_path)),
                ('color', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='backend.Color')),
                ('created_by', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile')),
                ('modified_by', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Product')),
                ('size', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='backend.Size')),
            ],
            options={
                'abstract': False,
                'ordering': ['-created_date'],
            },
        ),
        migrations.AddField(
            model_name='size',
            name='created_by',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile'),
        ),
        migrations.AddField(
            model_name='size',
            name='modified_by',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile'),
        ),
        migrations.AddField(
            model_name='product',
            name='created_by',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile'),
        ),
        migrations.AddField(
            model_name='product',
            name='group',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='backend.Group'),
        ),
        migrations.AddField(
            model_name='product',
            name='modified_by',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile'),
        ),
        migrations.AddField(
            model_name='group',
            name='created_by',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile'),
        ),
        migrations.AddField(
            model_name='group',
            name='modified_by',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile'),
        ),
        migrations.AddField(
            model_name='color',
            name='created_by',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile'),
        ),
        migrations.AddField(
            model_name='color',
            name='modified_by',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile'),
        ),
        migrations.AddField(
            model_name='collection',
            name='created_by',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile'),
        ),
        migrations.AddField(
            model_name='collection',
            name='modified_by',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile'),
        ),
        migrations.AddField(
            model_name='category',
            name='created_by',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile'),
        ),
        migrations.AddField(
            model_name='category',
            name='modified_by',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile'),
        ),
        migrations.AddField(
            model_name='catalog',
            name='created_by',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile'),
        ),
        migrations.AddField(
            model_name='catalog',
            name='modified_by',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile'),
        ),
        migrations.CreateModel(
            name='CartItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_archived', models.BooleanField(blank=True, default=False)),
                ('is_published', models.BooleanField(blank=True, default=True)),
                ('created_date', models.DateTimeField(blank=True, default=django.utils.timezone.now, editable=False)),
                ('modified_date', models.DateTimeField(blank=True, editable=False, null=True)),
                ('quantity', models.IntegerField(default=1)),
                ('line_total', models.IntegerField(default=1)),
                ('cart', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='backend.Cart')),
                ('created_by', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile')),
                ('modified_by', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile')),
                ('variety', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Variety')),
            ],
            options={
                'abstract': False,
                'ordering': ['-created_date'],
            },
        ),
        migrations.AddField(
            model_name='cart',
            name='created_by',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile'),
        ),
        migrations.AddField(
            model_name='cart',
            name='modified_by',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile'),
        ),
    ]
Пример #5
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='StoredFile',
            fields=[
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('filename',
                 models.CharField(blank=True, db_index=True, max_length=128)),
                ('metadata',
                 django.contrib.postgres.fields.jsonb.JSONField(blank=True,
                                                                null=True)),
                ('kind',
                 models.CharField(blank=True, default='', max_length=128)),
                ('mime_type',
                 models.CharField(blank=True, default='', max_length=128)),
                ('location',
                 django.contrib.gis.db.models.fields.PointField(blank=True,
                                                                null=True,
                                                                srid=4326)),
                ('size_bytes', models.IntegerField(db_index=True, default=0)),
                ('content',
                 models.FileField(db_index=True,
                                  max_length=1024,
                                  unique=True,
                                  upload_to=backend.models._get_upload_path)),
                ('content_sha',
                 models.CharField(blank=True,
                                  db_index=True,
                                  default='',
                                  editable=False,
                                  max_length=64)),
                ('start',
                 models.DateTimeField(blank=True,
                                      db_index=True,
                                      help_text='For Time-Series Files',
                                      null=True)),
                ('end',
                 models.DateTimeField(blank=True,
                                      db_index=True,
                                      help_text='For Time-Series Files',
                                      null=True)),
                ('created',
                 models.DateTimeField(auto_now_add=True,
                                      help_text='DB Insertion Time')),
                ('modified',
                 models.DateTimeField(auto_now=True,
                                      help_text='DB Modification Time')),
                ('columns',
                 django.contrib.postgres.fields.jsonb.JSONField(blank=True,
                                                                null=True)),
                ('processor_metadata',
                 django.contrib.postgres.fields.jsonb.JSONField(blank=True,
                                                                null=True)),
                ('related_files',
                 models.ManyToManyField(
                     blank=True,
                     related_name='_storedfile_related_files_+',
                     to='backend.StoredFile')),
            ],
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(db_index=True, max_length=64, unique=True)),
            ],
        ),
        migrations.AddField(
            model_name='storedfile',
            name='tags',
            field=models.ManyToManyField(blank=True, to='backend.Tag'),
        ),
        migrations.AddField(
            model_name='storedfile',
            name='user',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to=settings.AUTH_USER_MODEL),
        ),
    ]
class Migration(migrations.Migration):

    replaces = [('backend', '0035_auto_20201212_1810'),
                ('backend', '0036_auto_20201212_1826'),
                ('backend', '0037_auto_20201212_1831'),
                ('backend', '0038_auto_20201212_1831'),
                ('backend', '0039_auto_20201212_1831'),
                ('backend', '0040_auto_20201212_1840'),
                ('backend', '0041_userinformation_avatar'),
                ('backend', '0042_auto_20201212_1847'),
                ('backend', '0043_auto_20201212_2057'),
                ('backend', '0044_verifiedemail_user'),
                ('backend', '0045_remove_userinformation_emails'),
                ('backend', '0046_auto_20201212_2126'),
                ('backend', '0047_auto_20201212_2127'),
                ('backend', '0048_auto_20201212_2151'),
                ('backend', '0049_populate_emails'),
                ('backend', '0050_auto_20201212_2211'),
                ('backend', '0051_auto_20201212_2258'),
                ('backend', '0052_auto_20201212_2327'),
                ('backend', '0053_auto_20201212_2341'),
                ('backend', '0054_auto_20201212_2343'),
                ('backend', '0055_auto_20201213_0022'),
                ('backend', '0056_auto_20201213_0041'),
                ('backend', '0057_auto_20201213_0125'),
                ('backend', '0058_auto_20201213_0126'),
                ('backend', '0059_verifiableemail_domain')]

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('backend', '0034_auto_20201203_1151'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='userpreferences',
            name='description',
        ),
        migrations.CreateModel(
            name='Expertise',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(help_text='Expertise description',
                                  max_length=100)),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='ExpertiseKeyword',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(help_text='Expertise keyword description',
                                  max_length=100)),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='UserInformation',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.TextField(blank=True,
                                  help_text='Your position',
                                  null=True)),
                ('bio',
                 models.TextField(
                     blank=True,
                     help_text='Self-description (degree, biography, ...)',
                     null=True)),
                ('comment_anonymously',
                 models.BooleanField(
                     default=False,
                     help_text='Comment anonymously by-default')),
                ('show_online_presence',
                 models.BooleanField(
                     default=False,
                     help_text='Show my online presence on Tournesol')),
                ('birth_year',
                 models.IntegerField(
                     blank=True,
                     help_text='Year of birth',
                     null=True,
                     validators=[
                         django.core.validators.MinValueValidator(1900),
                         django.core.validators.MaxValueValidator(2100)
                     ])),
                ('gender',
                 models.CharField(blank=True,
                                  help_text='Your gender',
                                  max_length=50,
                                  null=True)),
                ('nationality',
                 models.CharField(blank=True,
                                  help_text='Your nationality',
                                  max_length=50,
                                  null=True)),
                ('race',
                 models.CharField(blank=True,
                                  help_text='Your race',
                                  max_length=50,
                                  null=True)),
                ('political_affiliation',
                 models.CharField(blank=True,
                                  help_text='Your political affiliation',
                                  max_length=50,
                                  null=True)),
                ('religion',
                 models.CharField(blank=True,
                                  help_text='Your religion',
                                  max_length=50,
                                  null=True)),
                ('degree_of_political_engagement',
                 models.CharField(
                     blank=True,
                     help_text='Your degree of political engagement',
                     max_length=50,
                     null=True)),
                ('user',
                 models.OneToOneField(
                     help_text='DjangoUser that the info belong to',
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
                ('expertises',
                 models.ManyToManyField(blank=True,
                                        help_text='Your expertise.',
                                        related_name='expertises',
                                        to='backend.Expertise')),
                ('expertise_keywords',
                 models.ManyToManyField(blank=True,
                                        help_text='Your expertise keywords.',
                                        related_name='expertise_keywords',
                                        to='backend.ExpertiseKeyword')),
                ('first_name',
                 models.CharField(blank=True,
                                  help_text='First name',
                                  max_length=100,
                                  null=True)),
                ('google_scholar',
                 models.URLField(blank=True,
                                 help_text='Your Google Scholar URL',
                                 max_length=500,
                                 null=True)),
                ('last_name',
                 models.CharField(blank=True,
                                  help_text='Last name',
                                  max_length=100,
                                  null=True)),
                ('linkedin',
                 models.URLField(blank=True,
                                 help_text='Your LinkedIn URL',
                                 max_length=500,
                                 null=True)),
                ('orcid',
                 models.URLField(blank=True,
                                 help_text='Your ORCID',
                                 max_length=500,
                                 null=True)),
                ('twitter',
                 models.URLField(blank=True,
                                 help_text='Your Twitter handle',
                                 max_length=500,
                                 null=True)),
                ('website',
                 models.URLField(blank=True,
                                 help_text='Your website URL',
                                 max_length=500,
                                 null=True)),
                ('youtube',
                 models.URLField(blank=True,
                                 help_text='Your Youtube channel URL',
                                 max_length=500,
                                 null=True)),
                ('avatar',
                 models.ImageField(
                     blank=True,
                     help_text='Your profile picture.',
                     upload_to='profiles',
                     validators=[
                         backend.models.UserInformation.validate_avatar
                     ])),
            ],
        ),
        migrations.CreateModel(
            name='Degree',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('level',
                 models.CharField(help_text='Degree level', max_length=100)),
                ('domain',
                 models.CharField(help_text='Degree domain', max_length=100)),
                ('institution',
                 models.CharField(help_text='Degree institution',
                                  max_length=100)),
                ('user',
                 models.ForeignKey(
                     help_text='User that the degree belongs to.',
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     to='backend.UserInformation')),
            ],
            options={
                'ordering': ['level', 'domain', 'institution'],
            },
        ),
        migrations.CreateModel(
            name='VerifiableEmail',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('email',
                 models.EmailField(help_text='E-mail address',
                                   max_length=100,
                                   unique=True)),
                ('is_verified',
                 models.BooleanField(
                     default=False,
                     help_text='If true, this e-mail is verified')),
                ('token',
                 models.CharField(
                     blank=True,
                     help_text=
                     'The token that needs to be supplied to verify this e-mail address',
                     max_length=1000,
                     null=True)),
                ('user',
                 models.ForeignKey(
                     help_text='User that this e-mail belongs to',
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     to='backend.UserInformation')),
            ],
        ),
        migrations.AlterField(
            model_name='verifiableemail',
            name='user',
            field=models.ForeignKey(
                default=None,
                help_text='User that this e-mail belongs to',
                on_delete=django.db.models.deletion.CASCADE,
                to='backend.UserInformation'),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name='degree',
            name='user',
            field=models.ForeignKey(
                help_text='User that the degree belongs to.',
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='degrees',
                to='backend.UserInformation'),
        ),
        migrations.AlterField(
            model_name='verifiableemail',
            name='user',
            field=models.ForeignKey(
                help_text='User that this e-mail belongs to',
                on_delete=django.db.models.deletion.CASCADE,
                related_name='emails',
                to='backend.UserInformation'),
        ),
        migrations.AlterField(
            model_name='expertise',
            name='name',
            field=models.CharField(help_text='Expertise description',
                                   max_length=100,
                                   unique=True),
        ),
        migrations.AlterField(
            model_name='expertisekeyword',
            name='name',
            field=models.CharField(help_text='Expertise keyword description',
                                   max_length=100,
                                   unique=True),
        ),
        migrations.AlterField(
            model_name='userinformation',
            name='avatar',
            field=models.ImageField(
                blank=True,
                help_text='Your profile picture.',
                null=True,
                upload_to='profiles',
                validators=[backend.models.UserInformation.validate_avatar]),
        ),
        migrations.AlterUniqueTogether(
            name='degree',
            unique_together={('level', 'domain', 'institution', 'user')},
        ),
        migrations.RemoveField(
            model_name='userinformation',
            name='expertise_keywords',
        ),
        migrations.RemoveField(
            model_name='userinformation',
            name='expertises',
        ),
        migrations.AddField(
            model_name='expertise',
            name='user',
            field=models.ForeignKey(
                help_text='User for the expertise',
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='expertises',
                to='backend.UserInformation'),
        ),
        migrations.AddField(
            model_name='expertisekeyword',
            name='user',
            field=models.ForeignKey(
                help_text='User for the expertise keywords',
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='expertise_keywords',
                to='backend.UserInformation'),
        ),
        migrations.AlterField(
            model_name='expertise',
            name='name',
            field=models.CharField(help_text='Expertise description',
                                   max_length=100),
        ),
        migrations.AlterField(
            model_name='expertisekeyword',
            name='name',
            field=models.CharField(help_text='Expertise keyword description',
                                   max_length=100),
        ),
        migrations.AlterUniqueTogether(
            name='expertise',
            unique_together={('name', 'user')},
        ),
        migrations.AlterUniqueTogether(
            name='expertisekeyword',
            unique_together={('name', 'user')},
        ),
        migrations.AlterModelOptions(
            name='degree',
            options={'ordering': ['rank', 'level', 'domain', 'institution']},
        ),
        migrations.AlterModelOptions(
            name='expertise',
            options={'ordering': ['rank', 'name']},
        ),
        migrations.AlterModelOptions(
            name='expertisekeyword',
            options={'ordering': ['rank', 'name']},
        ),
        migrations.AlterModelOptions(
            name='verifiableemail',
            options={'ordering': ['rank']},
        ),
        migrations.AddField(
            model_name='degree',
            name='rank',
            field=models.IntegerField(default=0, help_text='Ordering field'),
        ),
        migrations.AddField(
            model_name='expertise',
            name='rank',
            field=models.IntegerField(default=0, help_text='Ordering field'),
        ),
        migrations.AddField(
            model_name='expertisekeyword',
            name='rank',
            field=models.IntegerField(default=0, help_text='Ordering field'),
        ),
        migrations.AddField(
            model_name='verifiableemail',
            name='rank',
            field=models.IntegerField(default=0, help_text='Ordering field'),
        ),
        migrations.AlterField(
            model_name='verifiableemail',
            name='email',
            field=models.EmailField(help_text='E-mail address',
                                    max_length=100),
        ),
        migrations.AlterUniqueTogether(
            name='verifiableemail',
            unique_together={('email', 'user')},
        ),
        migrations.AlterField(
            model_name='verifiableemail',
            name='user',
            field=models.ForeignKey(
                help_text='User that this e-mail belongs to',
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='emails',
                to='backend.UserInformation'),
        ),
        migrations.AddField(
            model_name='verifiableemail',
            name='domain',
            field=computed_property.fields.ComputedCharField(
                compute_from='email_domain',
                default=uuid.uuid1,
                editable=False,
                help_text='Email domain with @',
                max_length=50),
        ),
    ]
Пример #7
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Author',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100,
                                          verbose_name='Name')),
                ('email',
                 models.EmailField(max_length=50,
                                   null=True,
                                   verbose_name='Email')),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Book',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.CharField(max_length=100, verbose_name='Book Name')),
                ('slug', models.SlugField(blank=True, unique=True)),
                ('description', models.TextField(blank=True)),
                ('image',
                 models.ImageField(
                     blank=True,
                     null=True,
                     upload_to=backend.models.upload_image_path)),
                ('page', models.IntegerField(null=True, verbose_name='Page')),
                ('publish_date',
                 models.DateField(verbose_name='Published Date')),
                ('price', models.DecimalField(decimal_places=2,
                                              max_digits=10)),
                ('stock', models.PositiveIntegerField()),
                ('available', models.BooleanField(default=True)),
            ],
            options={
                'ordering': ['title'],
            },
        ),
        migrations.CreateModel(
            name='BookLinkAuthor',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('author',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='backend.Author')),
                ('book',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='backend.Book')),
            ],
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.CharField(default='',
                                  max_length=100,
                                  verbose_name='title')),
                ('description', models.TextField()),
                ('is_active', models.BooleanField(default=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('slug', models.SlugField(blank=True, null=True, unique=True)),
            ],
            options={
                'verbose_name_plural': 'Categories',
                'ordering': ['title'],
            },
        ),
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('contact',
                 models.CharField(blank=True, max_length=14, null=True)),
                ('location', models.TextField(blank=True, null=True)),
                ('user',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='customer_profile',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='book',
            name='category',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='backend.Category',
                verbose_name='Category;'),
        ),
    ]
Пример #8
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Administrator',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('username', models.CharField(default='', max_length=12, verbose_name='登录账号')),
                ('password', models.CharField(default='', max_length=50, verbose_name='密码')),
                ('grade', models.CharField(default='', max_length=50, verbose_name='管理年级')),
            ],
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('id', models.CharField(max_length=12, primary_key=True, serialize=False, verbose_name='学号')),
                ('password', models.CharField(default='', max_length=50, verbose_name='密码')),
                ('name', models.CharField(default='', max_length=50, verbose_name='学生姓名')),
                ('gender', models.IntegerField(choices=[(0, '男'), (1, '女')], default=0, verbose_name='性别')),
                ('Avatar', models.ImageField(upload_to=backend.models.get_path, verbose_name='学生头像')),
                ('grade', models.CharField(default='', max_length=4, verbose_name='年级')),
                ('college', models.CharField(default='', max_length=50, verbose_name='学院名称')),
                ('subject', models.CharField(default='', max_length=50, verbose_name='专业名称')),
                ('class_name', models.CharField(default='', max_length=50, verbose_name='班级名称')),
                ('profile', models.TextField(default='', verbose_name='个人简介')),
                ('award', models.TextField(default='', verbose_name='获奖情况')),
                ('agree_distribution', models.BooleanField(default=False, verbose_name='接受分配')),
            ],
        ),
        migrations.CreateModel(
            name='Teacher',
            fields=[
                ('id', models.CharField(max_length=12, primary_key=True, serialize=False, verbose_name='工号')),
                ('password', models.CharField(default='', max_length=50, verbose_name='密码')),
                ('name', models.CharField(default='', max_length=50, verbose_name='教师姓名')),
                ('gender', models.IntegerField(choices=[(0, '男'), (1, '女')], default=0, verbose_name='性别')),
                ('Avatar', models.ImageField(upload_to=backend.models.get_path, verbose_name='教师头像')),
                ('college', models.CharField(default='', max_length=50, verbose_name='学院名称')),
                ('subject', models.CharField(default='', max_length=50, verbose_name='导师方向')),
                ('profile', models.TextField(default='', verbose_name='个人简介')),
                ('award', models.TextField(default='', verbose_name='获奖情况')),
            ],
        ),
        migrations.CreateModel(
            name='Selection',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_first', models.BooleanField(default=True, verbose_name='是否为第一志愿导师')),
                ('pass_status', models.IntegerField(choices=[(0, '待通过'), (1, '通过'), (2, '未通过')], verbose_name='通过情况')),
                ('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Student', verbose_name='学生')),
                ('teacher', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Teacher', verbose_name='导师')),
            ],
        ),
        migrations.CreateModel(
            name='Publicity',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('grade', models.CharField(default='', max_length=4, verbose_name='年级')),
                ('content', models.TextField(verbose_name='公示内容')),
                ('start_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='开始公示时间')),
                ('end_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='公示结束时间')),
                ('admin', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Administrator', verbose_name='发布者')),
            ],
        ),
        migrations.CreateModel(
            name='OpeningTime',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('grade', models.CharField(default='', max_length=4, verbose_name='年级')),
                ('start_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='开始开放时间')),
                ('end_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='公示开放时间')),
                ('admin', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Administrator', verbose_name='开放者')),
            ],
        ),
        migrations.CreateModel(
            name='File',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file', models.FileField(upload_to='file')),
                ('publicity', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Publicity', verbose_name='公示')),
            ],
        ),
    ]
Пример #9
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('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')),
                ('created_date', models.DateTimeField(auto_now_add=True)),
                ('modified_date', models.DateTimeField(auto_now=True)),
                ('last_seen', models.DateTimeField(blank=True, null=True)),
                ('app_installed', models.BooleanField(default=False)),
            ],
            options={
                'verbose_name': 'Perfil de Usuario',
                'verbose_name_plural': 'Perfiles de usuario',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Account',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_date', models.DateTimeField(auto_now_add=True)),
                ('modified_date', models.DateTimeField(auto_now=True)),
                ('token', models.CharField(max_length=16)),
                ('status',
                 models.IntegerField(choices=[(0, 'Creada'), (1, 'Activada'),
                                              (2, 'Bloqueada')],
                                     default=0)),
            ],
            options={
                'verbose_name': 'Cuenta',
                'verbose_name_plural': 'Cuentas',
            },
        ),
        migrations.CreateModel(
            name='Card',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_date', models.DateTimeField(auto_now_add=True)),
                ('modified_date', models.DateTimeField(auto_now=True)),
                ('type',
                 models.IntegerField(choices=[(0, 'MasterCard'), (1, 'Visa')],
                                     default=0)),
                ('alias', models.CharField(max_length=40,
                                           verbose_name='Alias')),
                ('number',
                 models.CharField(max_length=16, verbose_name='Nº tarjeta')),
                ('cvv',
                 models.CharField(max_length=4,
                                  verbose_name='Código de Verificación')),
            ],
            options={
                'verbose_name': 'Tarjeta',
                'verbose_name_plural': 'Tarjetas',
            },
        ),
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_date', models.DateTimeField(auto_now_add=True)),
                ('modified_date', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=40,
                                          verbose_name='Nombre')),
                ('identifier',
                 models.CharField(max_length=16,
                                  verbose_name='Identificador')),
                ('icon',
                 models.ImageField(
                     blank=True,
                     null=True,
                     upload_to=backend.models.get_image_path_company,
                     verbose_name='Imagen/Logo')),
            ],
            options={
                'verbose_name': 'Comercio',
                'verbose_name_plural': 'Comercios',
            },
        ),
        migrations.CreateModel(
            name='Device',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_date', models.DateTimeField(auto_now_add=True)),
                ('modified_date', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=40,
                                          verbose_name='Nombre')),
                ('identifier',
                 models.CharField(max_length=16,
                                  verbose_name='Identificador')),
            ],
            options={
                'verbose_name': 'Dispositivo',
                'verbose_name_plural': 'Dispositivos',
            },
        ),
        migrations.CreateModel(
            name='Emisor',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_date', models.DateTimeField(auto_now_add=True)),
                ('modified_date', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=40,
                                          verbose_name='nombre')),
                ('identifier',
                 models.CharField(max_length=16,
                                  verbose_name='Identificador')),
            ],
            options={
                'verbose_name': 'Emisor',
                'verbose_name_plural': 'Emisores',
            },
        ),
        migrations.CreateModel(
            name='ExpirationDateCard',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('month',
                 models.IntegerField(choices=[(0, '2018'), (1, '2019'),
                                              (2, '2020'), (3, '2021'),
                                              (4, '2022'), (5, '2023'),
                                              (6, '2024')],
                                     default=0)),
                ('year',
                 models.IntegerField(choices=[(1, '01'), (2, '02'), (3, '03'),
                                              (4, '04'), (5, '05'), (6, '06'),
                                              (7, '07'), (8, '08'), (9, '09'),
                                              (10, '10'), (11, '11'),
                                              (12, '12')],
                                     default=0)),
            ],
        ),
        migrations.AddField(
            model_name='card',
            name='emisor',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='card_emisor',
                to='backend.Emisor'),
        ),
        migrations.AddField(
            model_name='card',
            name='expiration_date',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='expiration_date_card',
                to='backend.ExpirationDateCard'),
        ),
        migrations.AddField(
            model_name='userprofile',
            name='account',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='user_account',
                to='backend.Account'),
        ),
        migrations.AddField(
            model_name='userprofile',
            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='userprofile',
            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='UserCustom',
            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')),
                ('perm',
                 models.CharField(choices=[
                     ('A', 'Бухгалтер'), ('GA', 'Главный бухгалтер'),
                     ('D', 'Default'), ('SM', 'Управляющий складом'),
                     ('GSM', 'Главный Управляющий складами'),
                     ('FM', 'Управляющий фабрикой'),
                     ('GFM', 'Главный управляющий фабриками'),
                     ('OM', 'Управляющий офисом'),
                     ('GOM', 'Главный управляющий офисами'),
                     ('FO', 'Основатель'), ('CFO', 'Компания основателей'),
                     ('SM', 'Менеджер по безопасности'),
                     ('GSM', 'Главный мнеджер по безопасности'),
                     ('H', 'Помощник - контролер'), ('S', 'Поставщик'),
                     ('F', 'Фирма'), ('PM', 'Отдел кадров'),
                     ('GPM', 'Начальник отдела кадров'), ('DIR', 'Директор'),
                     ('AAA', 'ADMIN')
                 ],
                                  max_length=10,
                                  verbose_name='Должность')),
                ('email',
                 models.EmailField(max_length=254,
                                   unique=True,
                                   verbose_name='Почта')),
                ('name', models.CharField(max_length=100,
                                          verbose_name='Логин')),
                ('is_staff',
                 models.BooleanField(default=False,
                                     verbose_name='staff status')),
                ('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={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Address',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('country',
                 models.CharField(max_length=100, verbose_name='Страна')),
                ('city', models.CharField(max_length=100,
                                          verbose_name='Город')),
                ('street',
                 models.CharField(max_length=100, verbose_name='Улица')),
                ('bilding',
                 models.CharField(max_length=100, verbose_name='Здание')),
                ('flat',
                 models.CharField(max_length=100,
                                  verbose_name='Квартира или офис')),
                ('type_org',
                 models.CharField(choices=[('O', 'Офис'), ('F', 'Фабрика'),
                                           ('S', 'Склад'), ('PH', 'Жилой дом'),
                                           ('FH', 'Многоквартирный дом'),
                                           ('EP', 'Рабочее место'),
                                           ('LP', 'Жилое мест')],
                                  max_length=10,
                                  verbose_name='Тип организации')),
            ],
            options={
                'verbose_name': 'Адрес',
                'verbose_name_plural': 'Адрес',
                'ordering': ['-country'],
            },
        ),
        migrations.CreateModel(
            name='DeliveryTransport',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('model_name',
                 models.CharField(max_length=50, verbose_name='Модель')),
                ('type_of_transport',
                 models.CharField(choices=[('S', 'Самолет'), ('V', 'Вертолет'),
                                           ('P', 'Поезд'), ('A', 'Автобус'),
                                           ('MA', 'Микроавтобус'),
                                           ('K', 'Корабль')],
                                  max_length=3,
                                  verbose_name='Тип транспорта')),
                ('year_constructed',
                 models.CharField(max_length=12, verbose_name='Год создания')),
                ('order_coast',
                 models.CharField(max_length=50,
                                  verbose_name='Стоимость перевозки')),
                ('ready',
                 models.BooleanField(db_index=True,
                                     verbose_name='Готовность')),
                ('time_delivery',
                 models.CharField(max_length=50,
                                  verbose_name='Время Доставки')),
                ('done_order',
                 models.CharField(max_length=50,
                                  verbose_name='Рейсов выполненно')),
            ],
            options={
                'verbose_name': 'Доставляющий транспорт',
                'verbose_name_plural': 'Доставляющий транспорт',
                'ordering': ['-type_of_transport'],
            },
        ),
        migrations.CreateModel(
            name='Employee',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('first_name',
                 models.CharField(max_length=100, verbose_name='Имя')),
                ('second_name',
                 models.CharField(max_length=100,
                                  unique=True,
                                  verbose_name='Фамилия')),
                ('photo',
                 models.ImageField(blank=True,
                                   upload_to='',
                                   verbose_name='Фото')),
                ('mobile',
                 models.CharField(max_length=100, verbose_name='Телефон')),
                ('mail',
                 models.EmailField(max_length=254,
                                   unique=True,
                                   verbose_name='Почта')),
                ('info', models.TextField(verbose_name='Информация')),
                ('he', models.BooleanField(verbose_name='Высшее образование')),
                ('salary',
                 models.CharField(max_length=30, verbose_name='Зарплата')),
                ('create_date',
                 models.DateTimeField(db_index=True,
                                      verbose_name='Дата создания')),
                ('experience',
                 models.CharField(max_length=100, verbose_name='Опыт')),
                ('address',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.PROTECT,
                                   related_name='Адрес_работы',
                                   to='backend.Address')),
            ],
            options={
                'verbose_name': 'Работник',
                'verbose_name_plural': 'Работник',
                'ordering': ['second_name'],
            },
            bases=(backend.models.Ret, models.Model),
        ),
        migrations.CreateModel(
            name='Factories',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('holding',
                 models.CharField(max_length=50, verbose_name='Холдинг')),
            ],
            options={
                'verbose_name': 'Фабрики',
                'verbose_name_plural': 'Фабрики',
                'ordering': ['-holding'],
            },
            bases=(models.Model, backend.models.Ret),
        ),
        migrations.CreateModel(
            name='Firm',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=100, verbose_name='Название')),
                ('mobile',
                 models.CharField(max_length=10, verbose_name='Телефон')),
                ('director',
                 models.CharField(max_length=100, verbose_name='Директор')),
                ('mail', models.EmailField(max_length=254,
                                           verbose_name='Почта')),
                ('connect_date_firm',
                 models.DateTimeField(
                     db_index=True,
                     verbose_name='Дата начало сотрудничества')),
                ('create_date_firm',
                 models.DateTimeField(db_index=True,
                                      verbose_name='Дата создания')),
                ('firm_is_supplier',
                 models.BooleanField(verbose_name='Фирма это доставщик')),
                ('info',
                 models.TextField(blank=True,
                                  null=True,
                                  verbose_name='Описание')),
            ],
            options={
                'verbose_name': 'Фирма',
                'verbose_name_plural': 'Фирма',
                'ordering': ['name'],
            },
            bases=(models.Model, backend.models.Ret),
        ),
        migrations.CreateModel(
            name='Founder',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('first_name',
                 models.CharField(max_length=100, verbose_name='Имя')),
                ('second_name',
                 models.CharField(max_length=100, verbose_name='Фамилия')),
                ('age', models.IntegerField(verbose_name='Возраст')),
                ('namber',
                 models.CharField(max_length=10, verbose_name='Телефон')),
                ('mail', models.CharField(max_length=100,
                                          verbose_name='Почта')),
                ('info', models.TextField(verbose_name='Информация')),
            ],
            options={
                'verbose_name': 'Основатель',
                'verbose_name_plural': 'Основатель',
                'ordering': ['second_name'],
            },
        ),
        migrations.CreateModel(
            name='Founders',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('founders',
                 models.CharField(max_length=50, verbose_name='Компания')),
                ('founder',
                 models.ManyToManyField(related_name='Основатель',
                                        to='backend.Founder')),
            ],
            options={
                'verbose_name': 'Основатели',
                'verbose_name_plural': 'Основатели',
                'ordering': ['-founders'],
            },
            bases=(models.Model, backend.models.Ret),
        ),
        migrations.CreateModel(
            name='FoundersCompanyOrganization',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('companyname',
                 models.CharField(max_length=50, verbose_name='Имя компании')),
                ('factories',
                 models.ManyToManyField(blank=True,
                                        related_name='Фабрики_компании',
                                        to='backend.Factories',
                                        verbose_name='Фабрики')),
                ('founders',
                 models.ManyToManyField(related_name='Основатели',
                                        to='backend.Founders',
                                        verbose_name='Основатели')),
            ],
            options={
                'verbose_name': 'Таблица компаний',
                'verbose_name_plural': 'Таблица компаний',
                'ordering': ['-companyname'],
            },
            bases=(models.Model, backend.models.Ret),
        ),
        migrations.CreateModel(
            name='Item',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=100, verbose_name='Название')),
                ('create_date',
                 models.DateTimeField(db_index=True,
                                      verbose_name='Дата создания')),
                ('firm',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.PROTECT,
                                   to='backend.Firm',
                                   verbose_name='Фирма')),
            ],
            options={
                'verbose_name': 'Вещь',
                'verbose_name_plural': 'Вещь',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Items',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name_group',
                 models.CharField(max_length=50,
                                  verbose_name='Название группы')),
                ('count', models.IntegerField(verbose_name='Количество')),
                ('item',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.PROTECT,
                                   to='backend.Item',
                                   verbose_name='Предмет')),
            ],
            options={
                'verbose_name': 'Вещи',
                'verbose_name_plural': 'Вещи',
                'ordering': ['name_group'],
            },
        ),
        migrations.CreateModel(
            name='ItemsSupplier',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name_group',
                 models.CharField(max_length=50,
                                  verbose_name='Название группы')),
                ('items',
                 models.ManyToManyField(
                     related_name='Вещи_доступные_поставщику',
                     to='backend.Items',
                     verbose_name='Вещи, доступные поставщику')),
            ],
            options={
                'verbose_name': 'Вещи, которые доступны от поставщика',
                'verbose_name_plural': 'Вещи, которые доступны от поставщика',
                'ordering': ['name_group'],
            },
            bases=(models.Model, backend.models.Ret),
        ),
        migrations.CreateModel(
            name='Mesh',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('mesh',
                 models.CharField(max_length=100, verbose_name='Материал')),
                ('info_mesh',
                 models.TextField(verbose_name='Информация о материале')),
                ('additional_mesh',
                 models.CharField(max_length=100,
                                  verbose_name='Название доп. материала')),
                ('info_additional_mesh',
                 models.TextField(verbose_name='Информация о доп. материале')),
            ],
            options={
                'verbose_name': 'Материал',
                'verbose_name_plural': 'Материал',
                'ordering': ['mesh'],
            },
        ),
        migrations.CreateModel(
            name='Office',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=50, verbose_name='Название')),
                ('mobile',
                 models.CharField(max_length=20, verbose_name='Телефон')),
                ('mail', models.CharField(max_length=50,
                                          verbose_name='Почта')),
                ('info', models.TextField(verbose_name='Информация о офисе')),
                ('this_company_office',
                 models.BooleanField(
                     db_index=True, verbose_name='Принадлежит этой компании')),
                ('state_or_private',
                 models.BooleanField(db_index=True,
                                     verbose_name='Госсударственная?')),
                ('address',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.PROTECT,
                                   to='backend.Address',
                                   verbose_name='Адрес')),
            ],
            options={
                'verbose_name': 'Офис',
                'verbose_name_plural': 'Офис',
                'ordering': ['-name'],
            },
        ),
        migrations.CreateModel(
            name='Offices',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('holding',
                 models.CharField(max_length=50, verbose_name='Холдинг')),
                ('office',
                 models.ManyToManyField(related_name='Офисы',
                                        to='backend.Office',
                                        verbose_name='Офисы')),
            ],
            options={
                'verbose_name': 'Офисы',
                'verbose_name_plural': 'Офисы',
                'ordering': ['-holding'],
            },
            bases=(models.Model, backend.models.Ret),
        ),
        migrations.CreateModel(
            name='Price',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('price', models.CharField(max_length=100,
                                           verbose_name='Цена')),
                ('sale_price',
                 models.CharField(max_length=100,
                                  verbose_name='Цена со скидкой')),
            ],
            options={
                'verbose_name': 'Цена',
                'verbose_name_plural': 'Цена',
                'ordering': ['price'],
            },
        ),
        migrations.CreateModel(
            name='RoleNow',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=100, verbose_name='Название')),
                ('countpeople',
                 models.IntegerField(
                     verbose_name='Количество людей в подчинении')),
                ('needHE',
                 models.BooleanField(
                     verbose_name='Необходимость высшего образования')),
            ],
            options={
                'verbose_name': 'Должность',
                'verbose_name_plural': 'Должность',
                'ordering': ['name'],
            },
            bases=(models.Model, backend.models.Ret),
        ),
        migrations.CreateModel(
            name='Storage',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=50, verbose_name='Название')),
                ('mobile',
                 models.CharField(max_length=20, verbose_name='Телефон')),
                ('mail', models.CharField(max_length=50,
                                          verbose_name='Почта')),
                ('info', models.TextField(verbose_name='Информация о складе')),
                ('full_content',
                 models.CharField(max_length=50,
                                  verbose_name='Полная вместимость')),
                ('content',
                 models.IntegerField(verbose_name='Заполненность в %')),
                ('this_company_storage',
                 models.BooleanField(
                     db_index=True, verbose_name='Принадлежит этой компании')),
                ('state_or_private',
                 models.BooleanField(db_index=True,
                                     verbose_name='Госсударственная?')),
                ('address',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.PROTECT,
                                   to='backend.Address',
                                   verbose_name='Адрес')),
            ],
            options={
                'verbose_name': 'Склад',
                'verbose_name_plural': 'Склад',
                'ordering': ['-name'],
            },
        ),
        migrations.CreateModel(
            name='Storages',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('holding',
                 models.CharField(max_length=50, verbose_name='Холдинг')),
                ('storage',
                 models.ManyToManyField(related_name='Склады',
                                        to='backend.Storage',
                                        verbose_name='Склады')),
            ],
            options={
                'verbose_name': 'Склады',
                'verbose_name_plural': 'Склады',
                'ordering': ['-holding'],
            },
            bases=(models.Model, backend.models.Ret),
        ),
        migrations.CreateModel(
            name='TotalRole',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=100, verbose_name='Название')),
                ('role_now',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='Должность',
                                   to='backend.RoleNow',
                                   verbose_name='Занимаемая должность')),
            ],
            options={
                'verbose_name': 'Должность',
                'verbose_name_plural': 'Должность',
                'ordering': [],
            },
            bases=(models.Model, backend.models.Ret),
        ),
        migrations.CreateModel(
            name='SupplierInfo',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('count_storages',
                 models.IntegerField(verbose_name='Количество складов')),
                ('average_time_delivery',
                 models.TextField(verbose_name='Среднее время доставки')),
                ('text', models.TextField(verbose_name='Доп. информация')),
                ('delivery_transport',
                 models.ManyToManyField(
                     related_name='Доставляющий_транспорт',
                     to='backend.DeliveryTransport',
                     verbose_name='Доставляющий транспорт')),
                ('factories',
                 models.ManyToManyField(related_name='Фабрики_поставщика',
                                        to='backend.Factories',
                                        verbose_name='Фабрики поставщика')),
                ('offices',
                 models.ManyToManyField(related_name='Офисы_поставщика',
                                        to='backend.Offices',
                                        verbose_name='Офисы поставщика')),
                ('storages',
                 models.ManyToManyField(related_name='Склады_поставщика',
                                        to='backend.Storages',
                                        verbose_name='Склады поставщика')),
            ],
            options={
                'verbose_name': 'Информация о поставщике',
                'verbose_name_plural': 'Информация о поставщике',
                'ordering': ['count_storages'],
            },
            bases=(models.Model, backend.models.Ret),
        ),
        migrations.CreateModel(
            name='Supplier',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=50, verbose_name='Название')),
                ('mobile',
                 models.CharField(max_length=50, verbose_name='Телефон')),
                ('director', models.TextField(verbose_name='Директор')),
                ('mail', models.EmailField(max_length=254,
                                           verbose_name='Почта')),
                ('create_date',
                 models.DateTimeField(db_index=True,
                                      verbose_name='Дата создания')),
                ('connect_date',
                 models.DateTimeField(
                     db_index=True,
                     verbose_name='Дата начала сотрудничества')),
                ('founderscompanyorganization',
                 models.ManyToManyField(
                     related_name='Компании_организаторы',
                     to='backend.FoundersCompanyOrganization',
                     verbose_name='Компании-организаторы')),
                ('items_supplier',
                 models.ManyToManyField(related_name='Постовляемые_вещи',
                                        to='backend.ItemsSupplier',
                                        verbose_name='Поставляемые вещи')),
                ('supplier_info',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='Информация_о_поставщике',
                                   to='backend.SupplierInfo',
                                   verbose_name='Информация о поставщике')),
            ],
            options={
                'verbose_name': 'Поставщик',
                'verbose_name_plural': 'Поставщик',
                'ordering': ['name'],
            },
            bases=(models.Model, backend.models.Ret),
        ),
        migrations.CreateModel(
            name='Ready',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('order_status',
                 models.CharField(choices=[('R', 'Ready'), ('W', 'Wait'),
                                           ('R-P', 'Ready-part')],
                                  max_length=4,
                                  verbose_name='Статус')),
                ('total_price',
                 models.CharField(max_length=100,
                                  verbose_name='Полная стоимость')),
                ('address',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='Адрес_доставки_товаров',
                                   related_query_name='Адрес_доставки_товаров',
                                   to='backend.Address',
                                   verbose_name='Адрес доставки товаров')),
                ('employee',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='Заказавший_работник',
                                   related_query_name='Работник',
                                   to='backend.Employee',
                                   verbose_name='Заказавший работник')),
                ('items',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='Вещи_на_доставку',
                                   related_query_name='Вещи_на_доставку',
                                   to='backend.Items',
                                   verbose_name='Вещи на доставку')),
            ],
            options={
                'verbose_name': 'Статус заказа',
                'verbose_name_plural': 'Статус заказа',
                'ordering': ['order_status'],
            },
        ),
        migrations.CreateModel(
            name='Param',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('height',
                 models.CharField(max_length=20, verbose_name='Высота')),
                ('width', models.CharField(max_length=20,
                                           verbose_name='Ширина')),
                ('thickness',
                 models.CharField(max_length=20, verbose_name='Толщина')),
                ('weight', models.CharField(max_length=20,
                                            verbose_name='Вес')),
                ('diagonal',
                 models.CharField(max_length=20, verbose_name='Диагональ')),
                ('mesh',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.PROTECT,
                                   to='backend.Mesh',
                                   verbose_name='Материал')),
            ],
            options={
                'verbose_name': 'Параметры',
                'verbose_name_plural': 'Параметры',
                'ordering': ['-weight'],
            },
            bases=(models.Model, backend.models.Ret),
        ),
        migrations.CreateModel(
            name='OrderTable',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=50,
                                  verbose_name='Название заказа')),
                ('wornot', models.BooleanField(verbose_name='Доставлен')),
                ('create_date',
                 models.DateTimeField(db_index=True,
                                      verbose_name='Дата создания')),
                ('get_date',
                 models.DateTimeField(db_index=True,
                                      verbose_name='Дата получения')),
                ('address',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='Адрес',
                                   to='backend.Address')),
                ('items',
                 models.ManyToManyField(related_name='Вещи',
                                        to='backend.Items')),
            ],
            options={
                'verbose_name': 'Таблица заказа',
                'verbose_name_plural': 'Таблица заказа',
                'ordering': ['address'],
            },
            bases=(models.Model, backend.models.Ret),
        ),
        migrations.CreateModel(
            name='Orderes',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('total_price',
                 models.CharField(max_length=50,
                                  verbose_name='Полная стоимость')),
                ('send', models.BooleanField(verbose_name='Отправлено')),
                ('received',
                 models.CharField(choices=[('Y', 'Да'), ('N', 'Нет'),
                                           ('N\\A', 'Не определено')],
                                  max_length=3,
                                  verbose_name='Получено?')),
                ('pos_one_get',
                 models.CharField(choices=[('Y', 'Да'), ('N', 'Нет'),
                                           ('N\\A', 'Не определено')],
                                  max_length=3,
                                  verbose_name='Возможность одной доставки')),
                ('date_send',
                 models.DateTimeField(db_index=True,
                                      verbose_name='Дата отправки')),
                ('date_get',
                 models.DateTimeField(db_index=True,
                                      verbose_name='Дата получения')),
                ('orderes',
                 models.ManyToManyField(related_name='Заказы',
                                        related_query_name='Заказы',
                                        to='backend.Ready',
                                        verbose_name='Заказы')),
                ('storage',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='Склад_получатель',
                                   related_query_name='Склад_получатель',
                                   to='backend.Storage',
                                   verbose_name='Склад-получатель')),
                ('supplier',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='Поставщик_товара',
                                   related_query_name='Поставщик_товара',
                                   to='backend.Supplier',
                                   verbose_name='Поставщик')),
            ],
            options={
                'verbose_name': 'Заказы',
                'verbose_name_plural': 'Заказы',
                'ordering': ['total_price'],
            },
            bases=(models.Model, backend.models.Ret),
        ),
        migrations.CreateModel(
            name='ItemsInStorage',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('items',
                 models.ManyToManyField(
                     related_name='Предметы',
                     to='backend.Items',
                     verbose_name='Группы вещей на складе')),
                ('storage',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.PROTECT,
                                   to='backend.Storage',
                                   verbose_name='Склад')),
            ],
            options={
                'verbose_name': 'Вещи на складе',
                'verbose_name_plural': 'Вещи на складе',
                'ordering': ['storage'],
            },
            bases=(models.Model, backend.models.Ret),
        ),
        migrations.AddField(
            model_name='item',
            name='param',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                to='backend.Param',
                verbose_name='Параметры'),
        ),
        migrations.AddField(
            model_name='item',
            name='price',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                to='backend.Price',
                verbose_name='Цена'),
        ),
        migrations.AddField(
            model_name='founderscompanyorganization',
            name='offices',
            field=models.ManyToManyField(blank=True,
                                         related_name='Офисы_компании',
                                         to='backend.Offices',
                                         verbose_name='Офисы'),
        ),
        migrations.AddField(
            model_name='founderscompanyorganization',
            name='storages',
            field=models.ManyToManyField(blank=True,
                                         related_name='Склады_компании',
                                         to='backend.Storages',
                                         verbose_name='Склады'),
        ),
        migrations.AddField(
            model_name='firm',
            name='founderscompanyorganization',
            field=models.ManyToManyField(
                related_name='Организаторы',
                to='backend.FoundersCompanyOrganization',
                verbose_name='Основатели'),
        ),
        migrations.CreateModel(
            name='Factory',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=50, verbose_name='Название')),
                ('mobile',
                 models.CharField(max_length=20, verbose_name='Телефон')),
                ('mail', models.CharField(max_length=50,
                                          verbose_name='Почта')),
                ('info',
                 models.TextField(verbose_name='Информация о фабрике')),
                ('count_empl',
                 models.IntegerField(verbose_name='Колличество сотрудников')),
                ('this_company_factory',
                 models.BooleanField(
                     db_index=True, verbose_name='Принадлежит этой компании')),
                ('state_or_private',
                 models.BooleanField(db_index=True,
                                     verbose_name='Госсударственная?')),
                ('address',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.PROTECT,
                                   to='backend.Address',
                                   verbose_name='Адрес')),
            ],
            options={
                'verbose_name': 'Фабрикa',
                'verbose_name_plural': 'Фабрикa',
                'ordering': ['-name'],
            },
        ),
        migrations.AddField(
            model_name='factories',
            name='factory',
            field=models.ManyToManyField(related_name='Фабрики',
                                         to='backend.Factory',
                                         verbose_name='Фабрики'),
        ),
        migrations.AddField(
            model_name='employee',
            name='orderes',
            field=models.ManyToManyField(blank=True,
                                         related_name='Заказы_работника',
                                         to='backend.OrderTable'),
        ),
        migrations.AddField(
            model_name='employee',
            name='trole',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='Права',
                to='backend.TotalRole'),
        ),
        migrations.AddField(
            model_name='employee',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.PROTECT,
                related_name='Логин',
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.CreateModel(
            name='DeliveryInAWay',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('items',
                 models.ManyToManyField(related_name='Вещи_в_пути',
                                        to='backend.Items',
                                        verbose_name='Вещи в пути')),
                ('transport',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='Транспорт_доставки',
                                   to='backend.DeliveryTransport',
                                   verbose_name='Транспорт доставки')),
            ],
            options={
                'verbose_name': 'Транспорт с грузом',
                'verbose_name_plural': 'Транспорт с грузом',
                'ordering': ['transport'],
            },
            bases=(models.Model, backend.models.Ret),
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Cidade',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=50, verbose_name='nome')),
            ],
        ),
        migrations.CreateModel(
            name='Endereco',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cep', models.IntegerField(max_length=8, verbose_name='cep')),
                ('tipo', models.CharField(max_length=20, verbose_name='tipo')),
                ('logradouro', models.CharField(max_length=50, verbose_name='logradouro')),
                ('complemento', models.CharField(max_length=100, verbose_name='complemento')),
                ('bairro', models.CharField(max_length=50, verbose_name='bairro')),
                ('cidade', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Cidade')),
            ],
        ),
        migrations.CreateModel(
            name='Estado',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=50, verbose_name='nome')),
                ('uf', models.CharField(max_length=2, verbose_name='uf')),
            ],
        ),
        migrations.CreateModel(
            name='Evento',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=100, verbose_name='nome')),
                ('sigla', models.CharField(max_length=20, verbose_name='sigla')),
                ('numero', models.IntegerField(max_length=4, verbose_name='numero')),
                ('ano', models.IntegerField(max_length=4, verbose_name='ano')),
                ('descricao', models.TextField()),
                ('palavras_chave', models.CharField(max_length=100, verbose_name='palavras_chave')),
                ('data_inicio', models.DateTimeField()),
                ('data_fim', models.DateTimeField()),
                ('endereco', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Endereco')),
            ],
        ),
        migrations.CreateModel(
            name='Inscricao',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('data', models.DateTimeField()),
                ('ticket', models.IntegerField(verbose_name=backend.models.Ticket)),
                ('evento', models.IntegerField(verbose_name=backend.models.Evento)),
            ],
        ),
        migrations.CreateModel(
            name='Pessoa',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=100, verbose_name='nome')),
                ('sexo', models.CharField(max_length=1, verbose_name='sexo')),
                ('dataNascimento', models.DateField()),
                ('imagem', models.ImageField(upload_to='')),
            ],
        ),
        migrations.CreateModel(
            name='Ticket',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=100, verbose_name='nome')),
                ('descricao', models.TextField()),
                ('preco', models.FloatField()),
                ('vagas', models.IntegerField()),
                ('evento', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Evento')),
            ],
        ),
        migrations.CreateModel(
            name='PessoaFisica',
            fields=[
                ('pessoa_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='backend.Pessoa')),
                ('cpf', models.CharField(max_length=14, verbose_name='cpf')),
            ],
            bases=('backend.pessoa',),
        ),
        migrations.AddField(
            model_name='pessoa',
            name='endereco',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='backend.Endereco'),
        ),
        migrations.AddField(
            model_name='pessoa',
            name='usuario',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='evento',
            name='realizador',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Pessoa'),
        ),
        migrations.AddField(
            model_name='cidade',
            name='estado',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Estado'),
        ),
        migrations.AddField(
            model_name='inscricao',
            name='pessoaFisica',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.PessoaFisica'),
        ),
    ]
Пример #12
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Item',
            fields=[
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('name', models.CharField(max_length=64)),
                ('description',
                 models.CharField(blank=True, max_length=256, null=True)),
                ('price', models.DecimalField(decimal_places=2, max_digits=6)),
                ('available', models.BooleanField(default=True)),
                ('image',
                 models.ImageField(
                     blank=True,
                     null=True,
                     upload_to=backend.models.get_upload_name_item)),
            ],
        ),
        migrations.CreateModel(
            name='ItemOrder',
            fields=[
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('quantity', models.IntegerField()),
                ('completed', models.BooleanField(default=False)),
                ('notes',
                 models.CharField(blank=True, max_length=256, null=True)),
                ('item',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='backend.Item')),
            ],
        ),
        migrations.CreateModel(
            name='Table',
            fields=[
                ('table_number',
                 models.IntegerField(primary_key=True, serialize=False)),
            ],
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('name', models.CharField(max_length=32)),
                ('icon',
                 models.ImageField(
                     blank=True,
                     null=True,
                     upload_to=backend.models.get_upload_name_tag)),
            ],
        ),
        migrations.CreateModel(
            name='Session',
            fields=[
                ('sessId',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('start_time',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('end_time', models.DateTimeField(blank=True, null=True)),
                ('table',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='backend.Table')),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('submitted',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('items',
                 models.ManyToManyField(through='backend.ItemOrder',
                                        to='backend.Item')),
                ('session',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='backend.Session')),
            ],
        ),
        migrations.CreateModel(
            name='Menu',
            fields=[
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('name', models.CharField(max_length=64)),
                ('description',
                 models.CharField(blank=True, max_length=256, null=True)),
                ('available', models.BooleanField(default=True)),
                ('url_name', models.SlugField(editable=False, max_length=64)),
                ('image',
                 models.ImageField(
                     blank=True,
                     null=True,
                     upload_to=backend.models.get_upload_name_menu)),
                ('start_time', models.TimeField(blank=True, null=True)),
                ('end_time', models.TimeField(blank=True, null=True)),
                ('start_day',
                 models.IntegerField(blank=True,
                                     choices=[(0, 'Monday'), (1, 'Tuesday'),
                                              (2, 'Wednesday'),
                                              (3, 'Thursday'), (4, 'Friday'),
                                              (5, 'Saturday'), (6, 'Sunday')],
                                     null=True)),
                ('end_day',
                 models.IntegerField(blank=True,
                                     choices=[(0, 'Monday'), (1, 'Tuesday'),
                                              (2, 'Wednesday'),
                                              (3, 'Thursday'), (4, 'Friday'),
                                              (5, 'Saturday'), (6, 'Sunday')],
                                     null=True)),
                ('items', models.ManyToManyField(blank=True,
                                                 to='backend.Item')),
                ('super_menu',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='backend.Menu')),
            ],
        ),
        migrations.AddField(
            model_name='itemorder',
            name='order',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='backend.Order'),
        ),
        migrations.AddField(
            model_name='item',
            name='tags',
            field=models.ManyToManyField(blank=True, to='backend.Tag'),
        ),
    ]