# Generated by Django 3.1.4 on 2021-01-12 22:18

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Artist',
            fields=[
                ('id', models.IntegerField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('default_zip', models.IntegerField()),
                ('phone', models.CharField(max_length=10)),
            ],
        ),
        migrations.CreateModel(
            name='Labels',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Master',
            fields=[
                ('id', models.IntegerField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='MasterVersion',
            fields=[
                ('id', models.IntegerField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=50)),
                ('year', models.CharField(max_length=50)),
                ('country', models.CharField(max_length=50)),
                ('formats', models.JSONField()),
                ('labels', models.CharField(blank=True, max_length=50)),
                ('notes', models.CharField(max_length=200)),
                ('thumb', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('profile_type', models.IntegerField(validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(3)])),
                ('user', models.OneToOneField(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')),
                ('discogs_id', models.IntegerField()),
                ('name', models.CharField(max_length=100)),
                ('artist', models.CharField(max_length=100)),
                ('label', models.CharField(max_length=100)),
                ('catalogue_number', models.CharField(max_length=15)),
                ('country', models.CharField(max_length=2)),
                ('year', models.IntegerField(validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(9999)])),
                ('media_condition', models.CharField(max_length=3)),
                ('sleeve_condition', models.CharField(max_length=3)),
                ('price', models.FloatField(validators=[django.core.validators.MinValueValidator(0.0), django.core.validators.MaxValueValidator(27500.0)])),
                ('image_url', models.ImageField(null=True, upload_to='album_art')),
                ('notes', models.CharField(max_length=200)),
                ('date_added', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='ReleaseInfo',
            fields=[
                ('id', models.IntegerField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=50)),
                ('year', models.CharField(max_length=50)),
                ('country', models.CharField(max_length=50)),
                ('formats', models.CharField(blank=True, max_length=50)),
                ('notes', models.CharField(max_length=200)),
                ('thumb', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Stack',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('customer_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tagging', to='fullstackapi.customer')),
                ('record', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tagging', to='fullstackapi.record')),
            ],
        ),
        migrations.CreateModel(
            name='Shop',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('verified', models.BooleanField()),
                ('address', models.CharField(max_length=55)),
                ('city', models.CharField(max_length=55)),
                ('state', models.CharField(max_length=2)),
                ('zip_code', models.IntegerField()),
                ('contact_phone', models.CharField(max_length=10)),
                ('contact_email', models.CharField(max_length=30)),
                ('profile', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='shop_profile', to='fullstackapi.profile')),
            ],
        ),
        migrations.AddField(
            model_name='record',
            name='shop_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='inventory', to='fullstackapi.shop'),
        ),
        migrations.AddField(
            model_name='customer',
            name='profile',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='customer_profile', to='fullstackapi.profile'),
        ),
    ]
