# Generated by Django 2.1.3 on 2018-12-09 21:47

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='Cat1',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=20, null=True)),
                ('name_pretty', models.CharField(max_length=20, unique=True)),
                ('desc', models.CharField(blank=True, max_length=100)),
                ('visible', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='Cat2',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=20, null=True)),
                ('name_pretty', models.CharField(max_length=20, unique=True)),
                ('desc', models.CharField(blank=True, max_length=100, null=True)),
                ('visible', models.BooleanField(default=True)),
                ('unit', models.CharField(blank=True, max_length=20, null=True)),
                ('cat1', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='basic.Cat1')),
            ],
        ),
        migrations.CreateModel(
            name='Param',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=20, null=True)),
                ('name_pretty', models.CharField(max_length=20, unique=True)),
                ('desc', models.CharField(blank=True, max_length=100, null=True)),
                ('unit', models.CharField(blank=True, max_length=20, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(blank=True, max_length=20, null=True)),
                ('name_pretty', models.CharField(max_length=20, unique=True)),
                ('desc', models.CharField(max_length=100, null=True)),
                ('added_date', models.DateTimeField(default=django.utils.timezone.now)),
                ('img', models.ImageField(blank=True, null=True, upload_to='img/')),
                ('volume', models.IntegerField(blank=True, null=True)),
                ('price', models.FloatField(blank=True, null=True)),
                ('value', models.FloatField(blank=True, null=True)),
                ('scaler', models.CharField(blank=True, choices=[('T', 'tera'), ('S', 'giga'), ('M', 'mega'), ('k', 'kilo'), ('-', '-'), ('m', 'mili'), ('u', 'mikro'), ('n', 'nano'), ('p', 'piko')], max_length=1, null=True)),
                ('tolerance', models.FloatField(blank=True, null=True)),
                ('dimensions', models.CharField(blank=True, max_length=30, null=True)),
                ('param1', models.CharField(blank=True, max_length=20, null=True)),
                ('param2', models.CharField(blank=True, max_length=20, null=True)),
                ('param3', models.CharField(blank=True, max_length=20, null=True)),
                ('param4', models.CharField(blank=True, max_length=20, null=True)),
                ('param5', models.CharField(blank=True, max_length=20, null=True)),
                ('type', models.CharField(blank=True, choices=[('T', 'THT'), ('S', 'SMD'), ('o', 'other')], max_length=1, null=True)),
                ('package', models.CharField(blank=True, choices=[('02', '0201'), ('04', '0402'), ('06', '0603'), ('08', '0805'), ('12', '1206'), ('13', '1210'), ('20', '2010'), ('25', '2512'), ('SD', 'SOD'), ('ST', 'SOT'), ('ME', 'MELF'), ('DO', 'DO'), ('SI', 'SOIC'), ('SJ', 'SOJ'), ('TS', 'TSOP'), ('SS', 'SSOP'), ('TP', 'TSSOP'), ('QS', 'QSOP'), ('VS', 'VSOP'), ('DF', 'DFN'), ('PL', 'PLCC'), ('QP', 'QFP'), ('LQ', 'LQFP'), ('PQ', 'PQFP'), ('TQ', 'TQFP'), ('QN', 'QFN'), ('ML', 'MLF'), ('BG', 'BGA'), ('LG', 'LGA'), ('TO', 'TO'), ('OT', 'other')], max_length=2, null=True)),
                ('added_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
                ('cat2', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='basic.Cat2')),
            ],
        ),
        migrations.RemoveField(
            model_name='test',
            name='author',
        ),
        migrations.DeleteModel(
            name='Test',
        ),
        migrations.AddField(
            model_name='cat2',
            name='params',
            field=models.ManyToManyField(blank=True, to='basic.Param'),
        ),
    ]
