# Generated by Django 2.2.12 on 2020-06-06 13:24

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Cluster',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='Point',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('lat', models.FloatField(verbose_name='Point Latitude')),
                ('lon', models.FloatField(verbose_name='Point Longitude')),
                ('is_node', models.BooleanField(default=False, verbose_name='Is Node')),
                ('question', models.TextField(null=True, verbose_name='Question')),
                ('answer', models.TextField(null=True, verbose_name='Answer')),
                ('tip', models.TextField(null=True, verbose_name='Tip')),
            ],
        ),
        migrations.CreateModel(
            name='ResultPoint',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('time_completed', models.DateTimeField(verbose_name='Time Completed')),
                ('user_answer', models.TextField(null=True, verbose_name='User Answer')),
                ('is_answered_correctly', models.BooleanField(default=False, verbose_name='Is Answered Correctly')),
                ('is_tip_used', models.BooleanField(default=False, verbose_name='Is Tip Used')),
                ('is_help_used', models.BooleanField(default=False, verbose_name='Is Help Used')),
                ('is_checked_correctly', models.BooleanField(default=False, verbose_name='Is Checked Correctly')),
                ('point', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='games.Point')),
            ],
        ),
        migrations.CreateModel(
            name='ResultCluster',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('time_start', models.DateTimeField(verbose_name='Time Start')),
                ('time_completed', models.DateTimeField(verbose_name='Time Completed')),
                ('scores', models.IntegerField(verbose_name='Scores')),
                ('cluster', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='games.Point')),
            ],
        ),
        migrations.CreateModel(
            name='Game',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField(verbose_name='Name')),
                ('clusters', models.ManyToManyField(to='games.Cluster')),
            ],
            options={
                'verbose_name': 'Game',
                'verbose_name_plural': 'Games',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='CurrentGame',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('time_start', models.DateTimeField(verbose_name='Time Start')),
                ('time_completed', models.DateTimeField(verbose_name='Time Completed')),
                ('scores', models.IntegerField(verbose_name='Scores')),
                ('results', models.ManyToManyField(to='games.ResultCluster')),
                ('source_game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='games.Game')),
            ],
        ),
        migrations.AddField(
            model_name='cluster',
            name='finish',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='cluster_point_finish', to='games.Point'),
        ),
        migrations.AddField(
            model_name='cluster',
            name='points',
            field=models.ManyToManyField(to='games.Point'),
        ),
        migrations.AddField(
            model_name='cluster',
            name='start',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='cluster_point_start', to='games.Point'),
        ),
    ]
