# Generated by Django 2.0.3 on 2018-03-22 08:43

import autoslug.fields
from django.conf import settings
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='Room',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('slug', autoslug.fields.AutoSlugField(editable=False, populate_from='name', unique=True)),
                ('sort', models.PositiveIntegerField()),
            ],
            options={
                'ordering': ['sort'],
            },
        ),
        migrations.CreateModel(
            name='RoomTime',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('frames', models.DecimalField(decimal_places=2, max_digits=6)),
                ('lag', models.DecimalField(decimal_places=2, max_digits=6)),
                ('idle', models.DecimalField(decimal_places=2, max_digits=6)),
                ('menues', models.PositiveIntegerField()),
                ('player', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('room', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rooms.Room')),
            ],
            options={
                'ordering': ['room', 'frames'],
            },
        ),
        migrations.CreateModel(
            name='Segment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('slug', autoslug.fields.AutoSlugField(editable=False, populate_from='name', unique=True)),
                ('sort', models.PositiveIntegerField(unique=True)),
            ],
            options={
                'ordering': ['sort'],
            },
        ),
        migrations.AddField(
            model_name='room',
            name='segment',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rooms.Segment'),
        ),
        migrations.AlterUniqueTogether(
            name='room',
            unique_together={('segment', 'sort')},
        ),
    ]
