# Generated by Django 3.2.5 on 2021-07-26 13:27

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('product', '0001_initial'),
        ('vendor', '0001_initial'),
        ('customer', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('total', models.FloatField()),
                ('items', models.IntegerField()),
                ('payment', models.BooleanField(default=False)),
                ('shipping_cost', models.FloatField(null=True)),
                ('grand_total', models.FloatField()),
                ('shipping_location', models.CharField(max_length=120)),
                ('full_name', models.CharField(max_length=256)),
                ('map_url', models.CharField(max_length=256, null=True)),
                ('contact_number', models.IntegerField()),
                ('email', models.EmailField(max_length=254)),
                ('status', models.CharField(choices=[('new', 'New'), ('cancelled', 'Cancelled'), ('processing', 'Processing'), ('completed', 'Completed')], default='new', max_length=20)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='customer.customer')),
                ('vendor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='vendor.vendor')),
            ],
        ),
        migrations.CreateModel(
            name='OrderItem',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('unit_price', models.FloatField()),
                ('quantity', models.IntegerField()),
                ('content', models.CharField(max_length=256)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('image', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='product.productimage')),
                ('order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='order.order')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='product.product')),
            ],
        ),
    ]
