# Generated by Django 3.1.2 on 2020-10-20 19:16

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Child',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=255, verbose_name='nombre')),
                ('first_surname', models.CharField(max_length=255, verbose_name='primer apellido')),
                ('second_surname', models.CharField(blank=True, max_length=255, verbose_name='segundo apellido')),
                ('birthdate', models.DateField(blank=True, null=True, verbose_name='fecha de nacimiento')),
                ('telephone', models.CharField(blank=True, max_length=13, null=True, verbose_name='teléfono')),
                ('telephone2', models.CharField(blank=True, max_length=13, null=True, verbose_name='teléfono 2')),
                ('address', models.CharField(blank=True, max_length=255, null=True, verbose_name='dirección')),
                ('town', models.CharField(blank=True, max_length=255, null=True, verbose_name='localidad')),
                ('postal', models.CharField(blank=True, max_length=5, null=True, verbose_name='código postal')),
                ('school', models.CharField(blank=True, max_length=255, null=True, verbose_name='colegio')),
                ('email', models.EmailField(blank=True, max_length=254)),
                ('notes', models.CharField(blank=True, max_length=500, null=True, verbose_name='notas')),
                ('dni', models.CharField(blank=True, max_length=9, null=True, verbose_name='DNI')),
            ],
            options={
                'verbose_name': 'niño',
                'ordering': ['first_surname', 'second_surname', 'name'],
            },
        ),
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='nombre')),
                ('location', models.CharField(max_length=255, verbose_name='lugar')),
            ],
            options={
                'verbose_name': 'curso',
            },
        ),
        migrations.CreateModel(
            name='Days',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=25, verbose_name='día')),
                ('dow', models.IntegerField(verbose_name='día de la semana')),
            ],
            options={
                'verbose_name': 'día',
            },
        ),
        migrations.CreateModel(
            name='Monitor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='nombre')),
                ('first_surname', models.CharField(blank=True, max_length=255, null=True, verbose_name='primer apellido')),
                ('second_surname', models.CharField(blank=True, max_length=255, null=True, verbose_name='segundo apellido')),
                ('nick', models.CharField(blank=True, max_length=255, null=True, verbose_name='apodo')),
                ('address', models.CharField(blank=True, max_length=255, null=True, verbose_name='dirección')),
            ],
            options={
                'verbose_name': 'monitor',
                'verbose_name_plural': 'monitores',
            },
        ),
        migrations.CreateModel(
            name='Parent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='nombre')),
                ('first_surname', models.CharField(max_length=255, verbose_name='primer apellido')),
                ('second_surname', models.CharField(blank=True, max_length=255, null=True, verbose_name='segundo apellido')),
                ('address', models.CharField(blank=True, max_length=255, null=True, verbose_name='dirección')),
            ],
            options={
                'verbose_name': 'padre',
            },
        ),
        migrations.CreateModel(
            name='PaymentMethods',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='método de pago')),
            ],
            options={
                'verbose_name': 'método de pago',
                'verbose_name_plural': 'métodos de pago',
            },
        ),
        migrations.CreateModel(
            name='RegisteredChild',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('price_month', models.DecimalField(decimal_places=2, default=0, max_digits=8, verbose_name='precio/mes')),
                ('competition', models.BooleanField(default=False, verbose_name='competición')),
                ('child', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='children.child', verbose_name='alumno')),
                ('days', models.ManyToManyField(blank=True, null=True, to='children.Days', verbose_name='días de clase')),
                ('monitor', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='children.monitor', verbose_name='monitor')),
                ('payment_method', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='children.paymentmethods', verbose_name='método de pago')),
            ],
            options={
                'verbose_name': 'registro',
            },
        ),
        migrations.CreateModel(
            name='Season',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='nombre')),
                ('start_date', models.DateField(verbose_name='fecha de comienzo')),
                ('end_date', models.DateField(verbose_name='fecha de finalización')),
                ('active', models.BooleanField(verbose_name='temporada actual')),
                ('children', models.ManyToManyField(blank=True, null=True, through='children.RegisteredChild', to='children.Child', verbose_name='alumnos')),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='children.course', verbose_name='curso')),
                ('monitors', models.ManyToManyField(blank=True, to='children.Monitor', verbose_name='monitores')),
            ],
            options={
                'verbose_name': 'temporada',
            },
        ),
        migrations.AddField(
            model_name='registeredchild',
            name='season',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='children.season', verbose_name='temporada'),
        ),
        migrations.CreateModel(
            name='PricesPerDay',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('days', models.IntegerField(verbose_name='número de días')),
                ('price', models.DecimalField(decimal_places=2, default=0, max_digits=8, verbose_name='precio')),
                ('season', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='children.season', verbose_name='temporada')),
            ],
            options={
                'verbose_name': 'Precios por dias',
            },
        ),
        migrations.CreateModel(
            name='Payments',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField(blank=True, null=True, verbose_name='fecha')),
                ('amount', models.DecimalField(decimal_places=2, default=0, max_digits=8, verbose_name='cantidad')),
                ('register', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='children.registeredchild', verbose_name='alumno')),
            ],
            options={
                'verbose_name': 'pago',
            },
        ),
        migrations.AddField(
            model_name='child',
            name='parents',
            field=models.ManyToManyField(blank=True, null=True, to='children.Parent', verbose_name='padres'),
        ),
    ]
