# Generated by Django 2.2.3 on 2020-05-26 12:56

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Description',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('processor', models.CharField(blank=True, max_length=50, null=True)),
                ('memory', models.CharField(blank=True, max_length=20, null=True)),
                ('hdd', models.CharField(blank=True, max_length=20, null=True)),
                ('videocard', models.CharField(blank=True, max_length=20, null=True)),
                ('screen', models.CharField(blank=True, max_length=50, null=True)),
                ('os', models.CharField(blank=True, max_length=30, null=True)),
                ('connector', models.CharField(blank=True, max_length=50, null=True)),
                ('color', models.CharField(blank=True, max_length=20, null=True)),
                ('diagonal', models.CharField(blank=True, max_length=20, null=True)),
                ('resolution', models.CharField(blank=True, max_length=20, null=True)),
                ('frequency', models.CharField(blank=True, max_length=20, null=True)),
            ],
            options={
                'verbose_name': 'Характеристики',
                'verbose_name_plural': 'Характеристики',
            },
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('brand', models.CharField(blank=True, choices=[('China', 'China'), ('Japan', 'Japan'), ('Taiwan', 'Thaiwan'), ('Usa', 'Usa')], default='', max_length=20, verbose_name='Производитель')),
                ('name', models.CharField(blank=True, max_length=50, null=True, unique=True, verbose_name='Модель')),
                ('price', models.DecimalField(decimal_places=2, max_digits=10, null=True, verbose_name='Цена')),
                ('quantity', models.IntegerField(default=0, verbose_name='Количество')),
                ('category', models.CharField(choices=[('notebook', 'notebook'), ('monitor', 'monitor')], default='', max_length=50, verbose_name='Категория')),
                ('image', models.ImageField(blank=True, null=True, upload_to='')),
                ('descrip', models.ForeignKey(blank=True, max_length=20, null=True, on_delete=django.db.models.deletion.CASCADE, to='my_first_site.Description', verbose_name='Характеристики товара')),
            ],
            options={
                'verbose_name': 'Товар',
                'verbose_name_plural': 'Товары',
                'ordering': ['-id'],
            },
        ),
        migrations.AddField(
            model_name='description',
            name='product_name',
            field=models.ForeignKey(max_length=30, null=True, on_delete=django.db.models.deletion.CASCADE, to='my_first_site.Product'),
        ),
    ]
