# Generated by Django 2.2.18 on 2021-03-14 18:07

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Location',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('latitude', models.PositiveIntegerField()),
                ('longitude', models.PositiveIntegerField()),
                ('place_name', models.CharField(max_length=200)),
                ('country_name', models.CharField(max_length=200)),
                ('zone_name', models.CharField(max_length=200)),
                ('postal_code', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Player',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('username', models.CharField(max_length=200, unique=True)),
                ('first_name', models.CharField(max_length=200)),
                ('last_name', models.CharField(max_length=200)),
                ('dateob', models.DateField()),
                ('home_place', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Player', to='sportiasts.Location', verbose_name='Home Place')),
            ],
            options={
                'ordering': ['-first_name'],
            },
        ),
        migrations.CreateModel(
            name='Events',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('date', models.DateTimeField()),
                ('location', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='place', to='sportiasts.Location', verbose_name='Event place')),
                ('organizer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='organizer', to='sportiasts.Player')),
                ('player', models.ManyToManyField(to='sportiasts.Player')),
            ],
        ),
    ]
