# Generated by Django 3.1.3 on 2021-03-17 06:49

import backend.settings.storage_backends
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import uuid


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='OrderItem',
            fields=[
                ('id', models.UUIDField(db_index=True, default=uuid.uuid4, editable=False, primary_key=True, serialize=False, unique=True)),
                ('ordered', models.BooleanField(default=False)),
                ('price_choice', models.PositiveIntegerField(default=0)),
                ('quantity', models.IntegerField(default=1)),
                ('campaign', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='items.campaign')),
                ('giftcard', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='items.giftcard')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Item in Basket',
                'verbose_name_plural': 'Items in Basket',
            },
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.UUIDField(db_index=True, default=uuid.uuid4, editable=False, primary_key=True, serialize=False, unique=True)),
                ('status', models.CharField(default='created', max_length=56)),
                ('first_name', models.CharField(max_length=50)),
                ('last_name', models.CharField(max_length=50)),
                ('email', models.EmailField(max_length=254)),
                ('phone_number', models.CharField(max_length=20)),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('happicard_recipient_myself', models.BooleanField(default=True)),
                ('happicard_recipient_name', models.CharField(blank=True, max_length=50, null=True)),
                ('happicard_delivery_date', models.DateTimeField(blank=True, null=True)),
                ('happicard_recipient_email_choice', models.BooleanField(default=False)),
                ('happicard_recipient_email', models.EmailField(blank=True, max_length=254, null=True)),
                ('happicard_recipient_sms_choice', models.BooleanField(default=False)),
                ('happicard_recipient_number', models.CharField(blank=True, max_length=20, null=True)),
                ('happicard_personal_message', models.TextField(blank=True, null=True)),
                ('happicard_personal_image', models.FileField(blank=True, null=True, storage=backend.settings.storage_backends.HappicardImageStorage(), upload_to='')),
                ('happicard_personal_video', models.FileField(blank=True, null=True, storage=backend.settings.storage_backends.HappicardVideoStorage(), upload_to='')),
                ('items', models.ManyToManyField(blank=True, to='orders.OrderItem')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
