text: # Generated by Django 3.2.12 on 2022-05-17 06:06
  
  import auctions.models
  import auctions.validators
  from django.conf import settings
  from django.db import migrations, models
  import django.db.models.deletion
  import django.utils.timezone
  
  
  class Migration(migrations.Migration):
  
      dependencies = [
          ('auctions', '0001_initial'),
      ]
  
      operations = [
          migrations.AddField(
              model_name='user',
              name='created',
              field=models.DateTimeField(auto_now_add=True, default=django.utils.timezone.now),
              preserve_default=False,
          ),
          migrations.AddField(
              model_name='user',
              name='updated',
              field=models.DateTimeField(auto_now=True),
          ),
          migrations.AlterField(
              model_name='user',
              name='cash',
              field=models.FloatField(default=1000.0),
          ),
          migrations.CreateModel(
              name='Listing',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('created', models.DateTimeField(auto_now_add=True)),
                  ('updated', models.DateTimeField(auto_now=True)),
                  ('slug', models.SlugField(null=True)),
                  ('title', models.CharField(max_length=150, null=True)),
                  ('description', models.TextField(max_length=500, null=True)),
                  ('image', models.ImageField(null=True, upload_to='images/')),
                  ('active', models.BooleanField(default=True)),
                  ('start_price', models.FloatField(default=0.99)),
                  ('auction_start', models.DateTimeField(auto_now_add=True, null=True)),
                  ('auction_end', models.DateTimeField(blank=True, default=auctions.models.get_auction_end, null=True)),
                  ('user', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL, verbose_name='Seller')),
              ],
              options={
                  'abstract': False,
              },
          ),
          migrations.CreateModel(
              name='Comment',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('created', models.DateTimeField(auto_now_add=True)),
                  ('updated', models.DateTimeField(auto_now=True)),
                  ('text', models.TextField(max_length=500, verbose_name='Comments')),
                  ('comment_date', models.DateTimeField(auto_now=True, null=True)),
                  ('listing', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='auctions.listing')),
                  ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL)),
              ],
              options={
                  'abstract': False,
              },
          ),
          migrations.CreateModel(
              name='Bid',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('created', models.DateTimeField(auto_now_add=True)),
                  ('updated', models.DateTimeField(auto_now=True)),
                  ('bid', models.FloatField(validators=[auctions.validators.validate_negative_bid], verbose_name='Place Bid')),
                  ('date', models.DateTimeField(auto_now=True)),
                  ('winning_bid', models.BooleanField(default=False)),
                  ('active', models.BooleanField(default=True)),
                  ('listing', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='auctions.listing')),
                  ('user', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL)),
              ],
              options={
                  'abstract': False,
              },
          ),
          migrations.CreateModel(
              name='Watchlist',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('created', models.DateTimeField(auto_now_add=True)),
                  ('updated', models.DateTimeField(auto_now=True)),
                  ('active', models.BooleanField(default=False, verbose_name='Watchlist')),
                  ('listing', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='auctions.listing')),
                  ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL)),
              ],
              options={
                  'unique_together': {('user', 'listing')},
              },
          ),
      ]
  