# Generated by Django 3.1.2 on 2020-11-16 12:00

import datetime
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='AsosiyOmbor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('narxi', models.PositiveIntegerField(default=0)),
                ('hajm', models.DecimalField(decimal_places=2, default=0, max_digits=20)),
            ],
            options={
                'verbose_name_plural': 'AsosiyOmbor',
                'ordering': ('-id',),
            },
        ),
        migrations.CreateModel(
            name='Buyurtma',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('buyurtma_nomi', models.CharField(max_length=200)),
                ('boyi', models.FloatField()),
                ('eni', models.FloatField()),
                ('ochilishi', models.CharField(blank=True, max_length=200)),
                ('buyurtma_soni', models.IntegerField(default=1)),
                ('picture', models.ImageField(upload_to='media/')),
                ('qabul_qilingan_vaqt', models.DateField()),
                ('deadline', models.DateField()),
                ('sotilish_protsenti', models.PositiveIntegerField()),
                ('kvm_uchun_ishchi_tolovi', models.FloatField()),
                ('montaj_tolovi', models.FloatField(default=0)),
                ('izox', models.TextField(blank=True)),
                ('ishchi_nazorati', models.BooleanField(default=False)),
                ('ish_yakunlandi', models.BooleanField(default=False)),
                ('toliq_yopildi', models.BooleanField(default=False)),
            ],
            options={
                'verbose_name_plural': 'Buyurtma',
                'ordering': ('deadline',),
            },
        ),
        migrations.CreateModel(
            name='Buyurtmachi',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(max_length=50)),
                ('last_name', models.CharField(max_length=50)),
                ('firma', models.CharField(blank=True, max_length=50)),
                ('phone_number', models.CharField(max_length=13)),
                ('adress', models.CharField(max_length=255)),
            ],
            options={
                'verbose_name_plural': 'Buyurtmachi',
                'ordering': ('-id',),
            },
        ),
        migrations.CreateModel(
            name='Ishchi',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ism', models.CharField(max_length=200)),
                ('familya', models.CharField(max_length=200)),
                ('telfon', models.CharField(max_length=200)),
            ],
            options={
                'ordering': ('-id',),
            },
        ),
        migrations.CreateModel(
            name='Maxsulot',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nomi', models.CharField(max_length=200)),
            ],
            options={
                'verbose_name_plural': 'Maxsulot',
                'ordering': ('-id',),
            },
        ),
        migrations.CreateModel(
            name='MaxsulotTuri',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nomi', models.CharField(max_length=200)),
            ],
            options={
                'verbose_name_plural': 'MaxsulotTuri',
                'ordering': ('-id',),
            },
        ),
        migrations.CreateModel(
            name='Staff',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.PositiveIntegerField()),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='OmborTarix',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('narxi', models.PositiveIntegerField(default=0)),
                ('hajm', models.DecimalField(decimal_places=1, default=0, max_digits=20)),
                ('qabul_sanasi', models.DateField()),
                ('maxsulot', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rainglass_app.maxsulot')),
            ],
            options={
                'verbose_name_plural': 'OmborTarix',
                'ordering': ('-id',),
            },
        ),
        migrations.AddField(
            model_name='maxsulot',
            name='turi',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='maxsulotlar', to='rainglass_app.maxsulotturi'),
        ),
        migrations.CreateModel(
            name='KerakliMax',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('hajm', models.DecimalField(decimal_places=2, default=0, max_digits=20)),
                ('buyurtma', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='kerakli_maxsulotlar', to='rainglass_app.buyurtma')),
                ('maxsulot', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rainglass_app.asosiyombor')),
            ],
        ),
        migrations.CreateModel(
            name='Davomad',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sana', models.DateField(default=datetime.date(2020, 11, 16))),
                ('keldi', models.BooleanField(default=False)),
                ('ish_miqdori', models.DecimalField(decimal_places=2, default=0, max_digits=20)),
                ('ishchi', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='davomadlar', to='rainglass_app.ishchi')),
            ],
            options={
                'ordering': ('-sana',),
            },
        ),
        migrations.AddField(
            model_name='buyurtma',
            name='buyurtmachi',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='buyurtmalar', to='rainglass_app.buyurtmachi'),
        ),
        migrations.AddField(
            model_name='asosiyombor',
            name='maxsulot',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rainglass_app.maxsulot'),
        ),
    ]
