# Generated by Django 3.0.8 on 2020-08-20 1:21

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


class Migration(migrations.Migration):

    dependencies = [
        ('auctions', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='TimeStamp',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('listing_date', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Listing',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=64)),
                ('category', models.CharField(choices=[('V', 'vehicles'), ('P', 'pets'), ('A', 'antiques'), ('M', 'media'), ('S', 'sports'), ('H', 'household'), ('C', 'clothing')], default='M', max_length=1)),
                ('start_bid', models.DecimalField(decimal_places=0, default=0, max_digits=7, validators=[django.core.validators.MinValueValidator(1, message='Starting Bid should be greater than $0')])),
                ('description', models.CharField(max_length=900)),
                ('image_url', models.URLField(blank=True, max_length=300)),
                ('status', models.CharField(choices=[('A', 'active'), ('C', 'closed')], default='A', max_length=1)),
                ('listing_date', models.DateTimeField(auto_now=True)),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='listing_owner', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='user',
            name='watchlist',
            field=models.ManyToManyField(blank=True, related_name='user_watch', to='auctions.Listing'),
        ),
    ]
