# Generated by Django 3.0.3 on 2020-02-28 20:56

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField(auto_now=True)),
                ('order_price', models.CharField(blank=True, max_length=40, null=True)),
                ('item_name', models.CharField(blank=True, max_length=100, null=True)),
                ('full_name', models.CharField(max_length=50, verbose_name='Full Name*')),
                ('phone_number', models.CharField(max_length=20, verbose_name='Phone Number*')),
                ('street_address1', models.CharField(max_length=40, verbose_name='Street Address 1*')),
                ('street_address2', models.CharField(blank=True, max_length=40, null=True, verbose_name='Street Address 2')),
                ('town_or_city', models.CharField(max_length=40, verbose_name='City*')),
                ('county', models.CharField(blank=True, max_length=40, null=True, verbose_name='County')),
                ('country', models.CharField(max_length=40, verbose_name='Country*')),
                ('postcode', models.CharField(blank=True, max_length=20, null=True, verbose_name='Postcode')),
                ('buyer', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='order_buyer', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Item',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(default='default.jpg', upload_to='item_pics')),
                ('name', models.CharField(max_length=100)),
                ('short', models.CharField(max_length=250, verbose_name='Short Description')),
                ('origin_country', models.CharField(max_length=50)),
                ('previous_owners', models.CharField(max_length=200, verbose_name='Previous Owners')),
                ('desc', models.TextField(max_length=900, verbose_name='History')),
                ('end_date', models.DateTimeField(blank=True, null=True)),
                ('link_read_more', models.CharField(blank=True, max_length=900, null=True, verbose_name='Read More Link Address')),
                ('price', models.IntegerField(verbose_name='Price (EURO)')),
                ('start_date', models.DateTimeField(auto_now_add=True)),
                ('in_auction', models.BooleanField(default=False)),
                ('start_auction_price', models.IntegerField(blank=True, null=True, verbose_name='Auction Price (EURO)')),
                ('sold', models.BooleanField(default=False)),
                ('sold_date', models.DateTimeField(blank=True, null=True)),
                ('sold_price', models.IntegerField(blank=True, null=True)),
                ('bought_at_auction', models.BooleanField(default=False)),
                ('seller_active', models.BooleanField(default=True)),
                ('buyer_active', models.BooleanField(default=False)),
                ('winner_active', models.BooleanField(default=False)),
                ('category', models.CharField(choices=[('Military', 'Military'), ('Private', 'Private'), ('Tools', 'Tools'), ('Treasure', 'Treasure'), ('Artistic', 'Artistic'), ('Other', 'Other')], default='Other', max_length=20)),
                ('condition', models.CharField(choices=[('Very Bad', 'Very Bad'), ('Bad', 'Bad'), ('OK', 'OK'), ('Good', 'Good'), ('Very Good', 'Very Good'), ('Perfect', 'Perfect')], max_length=20)),
                ('e_date', models.DateTimeField(blank=True, choices=[('24H', '24H'), ('4 Days', '4 Days'), ('12 Days', '12 days'), ('24 Days', '24 Days')], null=True, verbose_name='Auction Period')),
                ('buyer', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='buyer', to=settings.AUTH_USER_MODEL)),
                ('cart', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='users.Cart')),
                ('seller', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('winner', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='winner', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Bid',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('amount', models.IntegerField()),
                ('date', models.DateTimeField(default=django.utils.timezone.now)),
                ('bidder', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('item', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='auction_store.Item')),
            ],
        ),
    ]
