# Generated by Django 2.2.7 on 2019-11-11 23:20

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Alumno',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Semester', models.IntegerField()),
            ],
            options={
                'ordering': ('Persona',),
            },
        ),
        migrations.CreateModel(
            name='AsignaturaModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Name', models.CharField(blank=True, default='', max_length=100)),
                ('Code', models.CharField(blank=True, default='', max_length=100, unique=True)),
                ('MinSemester', models.IntegerField()),
            ],
            options={
                'ordering': ('Name',),
            },
        ),
        migrations.CreateModel(
            name='CartaDePago',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Precio', models.CharField(blank=True, default='', max_length=100)),
                ('Aprobacion', models.BooleanField(blank=True, default=False)),
            ],
            options={
                'ordering': ('Aprobacion',),
            },
        ),
        migrations.CreateModel(
            name='Persona',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Name', models.CharField(blank=True, default='', max_length=100)),
                ('LastName', models.CharField(blank=True, default='', max_length=100)),
                ('Phone', models.IntegerField()),
                ('Pin', models.CharField(max_length=4)),
                ('DNI', models.CharField(blank=True, default='', max_length=20)),
                ('Position', models.IntegerField(choices=[(1, 'Profesor'), (2, 'Alumno'), (3, 'Secretaria')], default=asignaturas.utils.CustomerTypes(1))),
            ],
            options={
                'ordering': ('Name',),
            },
        ),
        migrations.CreateModel(
            name='Secretaria',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('CartasDePago', models.ManyToManyField(to='asignaturas.CartaDePago')),
                ('Persona', models.OneToOneField(limit_choices_to={'Position': asignaturas.utils.CustomerTypes(3)}, on_delete=django.db.models.deletion.CASCADE, to='asignaturas.Persona')),
            ],
            options={
                'ordering': ('Persona',),
            },
        ),
        migrations.CreateModel(
            name='Profesor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ProfesorID', models.CharField(blank=True, default='', max_length=4)),
                ('Persona', models.OneToOneField(limit_choices_to={'Position': asignaturas.utils.CustomerTypes(1)}, on_delete=django.db.models.deletion.CASCADE, to='asignaturas.Persona')),
            ],
            options={
                'ordering': ('Persona',),
            },
        ),
        migrations.CreateModel(
            name='Notas',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Nota', models.IntegerField()),
                ('UniqueAlumn', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='asignaturas.Alumno')),
                ('UniqueAsignature', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='asignaturas.AsignaturaModel')),
            ],
            options={
                'ordering': ('Nota',),
            },
        ),
        migrations.AddField(
            model_name='asignaturamodel',
            name='Profesor',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='asignaturas.Profesor'),
        ),
        migrations.AddField(
            model_name='alumno',
            name='AsignaturasAlumno',
            field=models.ManyToManyField(to='asignaturas.AsignaturaModel'),
        ),
        migrations.AddField(
            model_name='alumno',
            name='CartaDePagoAlumno',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='asignaturas.CartaDePago'),
        ),
        migrations.AddField(
            model_name='alumno',
            name='Persona',
            field=models.OneToOneField(limit_choices_to={'Position': asignaturas.utils.CustomerTypes(2)}, on_delete=django.db.models.deletion.CASCADE, to='asignaturas.Persona'),
        ),
    ]
