# Generated by Django 3.1.3 on 2021-01-14 22:05

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Item',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('url', models.URLField()),
                ('notify_when', models.CharField(choices=[('below', 'Below certain price'), ('down', 'Goes down'), ('change', 'Changes')], max_length=50)),
                ('desired_price', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
                ('init_price', models.DecimalField(decimal_places=2, max_digits=20, null=True)),
                ('date_registered', models.DateTimeField(default=django.utils.timezone.now)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Record',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timeStamp', models.DateTimeField(default=django.utils.timezone.now)),
                ('price', models.DecimalField(decimal_places=2, max_digits=20)),
                ('emailed', models.BooleanField()),
                ('item', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tracker_app.item')),
            ],
            options={
                'unique_together': {('item', 'timeStamp')},
            },
        ),
    ]
