# Generated by Django 2.2.23 on 2022-06-20 13:42

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


class Migration(migrations.Migration):
    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='EventType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True,
                                        serialize=False, verbose_name='ID')),
                ('event_type',
                 models.CharField(blank=True, max_length=256, null=True)),
            ],
            options={
                'verbose_name': 'Game event type',
                'verbose_name_plural': 'Game event types',
                'ordering': ['event_type'],
            },
        ),
        migrations.CreateModel(
            name='Farmer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True,
                                        serialize=False, verbose_name='ID')),
                ('farmerID',
                 models.CharField(blank=True, max_length=128, null=True)),
                ('name',
                 models.CharField(blank=True, max_length=128, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='FieldGame',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True,
                                        serialize=False, verbose_name='ID')),
                ('playerID',
                 models.CharField(blank=True, max_length=128, null=True)),
                ('gameID', models.BigIntegerField(default=0)),
                ('final_score', models.IntegerField(default=0)),
                ('seedPhrase',
                 models.CharField(blank=True, max_length=128, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('log', models.TextField(blank=True, null=True)),
            ],
            options={
                'verbose_name': 'Field game record',
                'verbose_name_plural': 'Field game records',
                'ordering': ['created_at'],
            },
        ),
        migrations.CreateModel(
            name='GameEvent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True,
                                        serialize=False, verbose_name='ID')),
                ('playerID',
                 models.CharField(blank=True, max_length=128, null=True)),
                ('gameID', models.BigIntegerField(default=0)),
                ('turn', models.IntegerField(default=0)),
                ('orderno', models.IntegerField(default=0)),
                ('description',
                 models.CharField(blank=True, max_length=128, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('event_type', models.ForeignKey(
                    null=True,
                    on_delete=django.db.models.deletion.SET_NULL,
                    to='field_game.EventType')
                 ),
                ('farmerA', models.ForeignKey(
                    null=True,
                    on_delete=django.db.models.deletion.SET_NULL,
                    related_name='farmer_A',
                    to='field_game.Farmer')
                 ),
                ('farmerB', models.ForeignKey(
                    null=True,
                    on_delete=django.db.models.deletion.SET_NULL,
                    related_name='farmer_B',
                    to='field_game.Farmer')
                 ),
            ],
            options={
                'verbose_name': 'Field game record',
                'verbose_name_plural': 'Field game records',
                'ordering': ['created_at'],
            },
        ),
    ]
