# Generated by Django 3.1.2 on 2020-10-14 22:59

from django.db import migrations, models
import django.db.models.deletion
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Developer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Game',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('description', models.TextField(help_text='Enter a brief description of the game', max_length=1000)),
                ('price', models.IntegerField(max_length=8)),
                ('players', models.IntegerField(max_length=2)),
                ('developer', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='catalog.developer')),
            ],
        ),
        migrations.CreateModel(
            name='Genre',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Plataform',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='GameInstance',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, help_text='Unique ID for this particular game across the whole catalog', primary_key=True, serialize=False)),
                ('stock', models.CharField(blank=True, choices=[('o', 'Out of stock'), ('a', 'Available'), ('p', 'Pre-order'), ('c', 'Coming soon')], default='o', help_text='Game availability', max_length=1)),
                ('game', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='catalog.game')),
            ],
        ),
        migrations.AddField(
            model_name='game',
            name='genre',
            field=models.ManyToManyField(to='catalog.Genre'),
        ),
        migrations.AddField(
            model_name='game',
            name='plataform',
            field=models.ManyToManyField(to='catalog.Plataform'),
        ),
    ]
