# Generated by Django 3.2.6 on 2021-09-08 08:58

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),
        ('content', '0005_auto_20210828_1748'),
        ('shipping', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Offs',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number_off', models.IntegerField(verbose_name=' تعداد دفعات مجاز استفاده از کد تخفیف')),
                ('off_codes', models.CharField(max_length=200, unique=True, verbose_name='کدتخفیف')),
                ('off_percentage', models.IntegerField(verbose_name='درصد تخفیف')),
                ('off_expire', models.DateTimeField(verbose_name='تاریخ انقضاء کد')),
                ('user_off', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Orders',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_payed', models.BooleanField(default=False, verbose_name='پرداخت شده/نشده')),
                ('payment_date', models.DateTimeField(blank=True, null=True, verbose_name='تاریخ پرداخت')),
                ('offs', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='financial.offs', verbose_name='کد تخفیف ')),
                ('shipping', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shipping.post', verbose_name='پست شونده')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='مالک سبد')),
            ],
            options={
                'verbose_name': 'سبد خرید',
                'verbose_name_plural': 'سبدهای خرید کاربران',
            },
        ),
        migrations.CreateModel(
            name='OrderDetails',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number_of_products', models.IntegerField(verbose_name='تعداد محصول')),
                ('order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='financial.orders', verbose_name='سبد خرید')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='content.products', verbose_name='محصول')),
            ],
        ),
    ]
