# Generated by Django 3.2.4 on 2021-07-05 13:03

import apps.users.models
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='Products',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=50)),
                ('product_type', models.CharField(choices=[('Торт', 'Торт'), ('Пицца', 'Пицца'), ('Суши', 'Суши')], max_length=50)),
                ('price', models.PositiveSmallIntegerField()),
                ('weight', models.PositiveSmallIntegerField(blank=True)),
                ('description', models.TextField(blank=True, max_length=350)),
                ('ingredients', models.TextField(blank=True, max_length=350)),
                ('delivery_local', models.BooleanField(default=True)),
                ('delivery_general', models.BooleanField(default=False)),
                ('local_price', models.PositiveSmallIntegerField(blank=True)),
                ('general_price', models.PositiveSmallIntegerField(blank=True)),
                ('date_added', models.DateField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='SellerProfile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='SellerGallery',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('picture', models.ImageField(upload_to=apps.users.models.gallery_path)),
                ('seller', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='users.sellerprofile')),
            ],
        ),
        migrations.CreateModel(
            name='ProductsPictures',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('picture', models.ImageField(upload_to=apps.users.models.products_path)),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='users.products')),
            ],
        ),
        migrations.CreateModel(
            name='ProductsLottery',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('participants', models.PositiveSmallIntegerField()),
                ('date_end', models.DateTimeField()),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='users.products')),
            ],
        ),
        migrations.AddField(
            model_name='products',
            name='seller',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='users.sellerprofile'),
        ),
    ]
