# Generated by Django 2.1.4 on 2019-01-22 12:38

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('coreapp', '0068_auto_20190120_1419'),
    ]

    operations = [
        migrations.CreateModel(
            name='CompletedBuyOrder',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_ordered', models.DateTimeField(auto_now_add=True)),
                ('total_price', models.IntegerField(null=True)),
                ('book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='coreapp.Book')),
                ('seller', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='completed_seller', to=settings.AUTH_USER_MODEL)),
                ('selleraddress', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='completed_selleraddress', to='coreapp.ShippingAddress')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='completed_user', to=settings.AUTH_USER_MODEL)),
                ('useraddress', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='completed_address', to='coreapp.ShippingAddress')),
            ],
        ),
        migrations.CreateModel(
            name='CompletedTransaction',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('offerrer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='completed_offerrer', to=settings.AUTH_USER_MODEL)),
                ('offerrer_address', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='completed_seller_address', to='coreapp.ShippingAddress')),
                ('offerrer_book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='completed_offerrer_book_from_user', to='coreapp.Book')),
                ('requester', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='completed_requester', to=settings.AUTH_USER_MODEL)),
                ('requester_address', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='completed_user_address', to='coreapp.ShippingAddress')),
                ('requester_book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='completed_requested_book_from_user', to='coreapp.Book')),
            ],
        ),
    ]
