# Generated by Django 4.2.2 on 2023-06-30 22:04

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.BigAutoField(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_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')),
                ('email', models.EmailField(max_length=254, unique=True, verbose_name='Эл. почта')),
                ('first_name', models.CharField(blank=True, max_length=150, null=True, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=150, null=True, verbose_name='last name')),
                ('middle_name', models.CharField(blank=True, max_length=150, null=True, verbose_name='Отчество')),
                ('job_title', models.CharField(choices=[('admin', 'Администратор'), ('ordermanager', 'Менеджер по заказам'), ('productmanager', 'Менеджер по закупкам')], max_length=30, verbose_name='Должность')),
                ('manager_id', models.CharField(blank=True, max_length=5, null=True, verbose_name='ID менеджера')),
                ('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={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', store.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20, verbose_name='Название')),
                ('slug', models.SlugField(verbose_name='Идентификатор')),
            ],
        ),
        migrations.CreateModel(
            name='GlobalSettings',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('yuan_rate', models.DecimalField(decimal_places=2, max_digits=10)),
                ('delivery_price_CN', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True)),
                ('delivery_price_CN_RU', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True)),
                ('commission_rub', models.DecimalField(decimal_places=2, default=0, max_digits=10)),
            ],
        ),
        migrations.CreateModel(
            name='PromoCode',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='Название')),
                ('discount', models.PositiveSmallIntegerField(verbose_name='Скидка')),
                ('free_delivery', models.BooleanField(default=False, verbose_name='Бесплатная доставка')),
                ('no_comission', models.BooleanField(default=False, verbose_name='Без комиссии')),
            ],
        ),
        migrations.CreateModel(
            name='Checklist',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('status_updated_at', models.DateTimeField()),
                ('status', models.CharField(choices=[('draft', 'Черновик'), ('neworder', 'Новый заказ'), ('payment', 'Проверка оплаты'), ('buying', 'На закупке'), ('china', 'На складе в Китае'), ('chinarush', 'Доставка на склад РФ'), ('rush', 'На складе в РФ'), ('completed', 'Завершен')], max_length=15, verbose_name='Статус заказа')),
                ('product_link', models.URLField(blank=True, null=True)),
                ('subcategory', models.CharField(blank=True, max_length=20, null=True, verbose_name='Подкатегория')),
                ('brand', models.CharField(blank=True, max_length=100, null=True, verbose_name='Бренд')),
                ('model', models.CharField(blank=True, max_length=100, null=True, verbose_name='Модель')),
                ('size', models.PositiveSmallIntegerField(blank=True, null=True, verbose_name='Размер')),
                ('image', models.ImageField(blank=True, null=True, upload_to='')),
                ('preview_image', models.ImageField(blank=True, null=True, upload_to='')),
                ('price_yuan', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True)),
                ('comission', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True)),
                ('real_price', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True)),
                ('promocode', models.CharField(blank=True, max_length=100, null=True, verbose_name='Промокод')),
                ('comment', models.CharField(blank=True, max_length=200, null=True, verbose_name='Комментарий')),
                ('buyer_name', models.CharField(blank=True, max_length=100, null=True, verbose_name='Имя покупателя')),
                ('buyer_phone', models.CharField(blank=True, max_length=100, null=True, verbose_name='Телефон покупателя')),
                ('buyer_telegram', models.CharField(blank=True, max_length=100, null=True, verbose_name='Telegram покупателя')),
                ('receiver_name', models.CharField(blank=True, max_length=100, null=True, verbose_name='Имя получателя')),
                ('receiver_phone', models.CharField(blank=True, max_length=100, null=True, verbose_name='Телефон получателя')),
                ('payment_type', models.CharField(blank=True, choices=[('alfa', 'Альфа-Банк'), ('tink', 'Тинькофф Банк'), ('raif', 'Райффайзен Банк')], max_length=10, null=True, verbose_name='Метод оплаты')),
                ('payment_proof', models.ImageField(blank=True, null=True, upload_to='', verbose_name='Подтверждение оплаты')),
                ('cheque_photo', models.ImageField(blank=True, null=True, upload_to='', verbose_name='Фото чека')),
                ('delivery', models.CharField(blank=True, choices=[('pickup', 'Самовывоз из шоурума'), ('cdek', 'Пункт выдачи заказов CDEK')], max_length=10, null=True, verbose_name='Тип доставки')),
                ('track_number', models.CharField(blank=True, max_length=100, null=True, verbose_name='Трек-номер')),
                ('category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='store.category', verbose_name='Категория')),
                ('manager', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
