# Generated by Django 3.1.1 on 2020-11-27 16:28

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Auction',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=255)),
                ('description', models.TextField()),
                ('minimum_price', models.DecimalField(decimal_places=2, default=1, max_digits=7)),
                ('price', models.DecimalField(decimal_places=2, max_digits=7)),
                ('display_price', models.DecimalField(decimal_places=2, default=0, max_digits=7)),
                ('deadline', models.DateTimeField(default=yauctions.models.get_deadline)),
                ('created_date', models.DateTimeField(auto_now_add=True)),
                ('latest_bid_date_time', models.DateTimeField(auto_now=True)),
                ('seller_total_bids', models.IntegerField(default=0)),
                ('currency', models.CharField(choices=[('eur', 'EUR '), ('usd', 'USD'), ('gbp', 'GBP'), ('ngn', 'NGN')], default='USD', max_length=3)),
                ('status', models.CharField(choices=[('active', 'Active'), ('banned', 'Banned'), ('due', 'Due'), ('resolved', 'Resolved')], default='active', max_length=8)),
                ('bidder', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='latest_bidder', to=settings.AUTH_USER_MODEL)),
                ('bidders', models.ManyToManyField(to=settings.AUTH_USER_MODEL)),
                ('seller', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='seller', to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
