# Generated by Django 2.2.7 on 2020-02-29 10:23

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Classe',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nom_classe', models.CharField(max_length=50)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'Classe',
                'ordering': ['nom_classe'],
            },
        ),
        migrations.CreateModel(
            name='Cours',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nom_cours', models.CharField(max_length=50)),
                ('duree', models.CharField(max_length=50)),
                ('date', models.DateField()),
                ('id_classe', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.Classe')),
            ],
            options={
                'verbose_name_plural': 'Cours',
            },
        ),
        migrations.CreateModel(
            name='Eleve',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nom_eleve', models.CharField(max_length=50)),
                ('prenom_eleve', models.CharField(max_length=50)),
                ('email', models.EmailField(blank=True, max_length=254)),
                ('id_classe', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.Classe')),
            ],
            options={
                'verbose_name_plural': 'Eleve',
                'ordering': ['nom_eleve'],
            },
        ),
        migrations.CreateModel(
            name='Prof',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nom_prof', models.CharField(max_length=50)),
                ('prenom_prof', models.CharField(max_length=50)),
                ('mail_prof', models.CharField(max_length=50)),
                ('photo', models.ImageField(upload_to='Images/')),
                ('classe', models.ManyToManyField(to='myapp.Classe')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'Professeur',
            },
        ),
        migrations.CreateModel(
            name='Secretaire',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nom', models.CharField(max_length=50)),
                ('prenom', models.CharField(max_length=50)),
                ('mail', models.CharField(max_length=100)),
                ('telephone', models.CharField(max_length=20)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'Secretaire',
            },
        ),
        migrations.CreateModel(
            name='PresAbs',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nom_eleve', models.CharField(max_length=400)),
                ('date', models.DateField()),
                ('heure', models.CharField(max_length=10)),
                ('id_cours', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.Cours')),
            ],
            options={
                'verbose_name_plural': 'Absences',
                'ordering': ['date'],
            },
        ),
        migrations.CreateModel(
            name='Plaquette4',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ue', models.CharField(blank=True, max_length=40)),
                ('ec', models.CharField(max_length=30)),
                ('cm', models.IntegerField()),
                ('tpd', models.IntegerField()),
                ('ttal', models.IntegerField()),
                ('tpe', models.IntegerField()),
                ('ects', models.IntegerField()),
                ('total_Ects', models.CharField(blank=True, max_length=3)),
                ('coefs', models.CharField(blank=True, max_length=2)),
                ('coefs_details', models.IntegerField()),
                ('id_classe', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.Classe')),
            ],
            options={
                'verbose_name': 'Plaquette4',
            },
        ),
        migrations.CreateModel(
            name='Plaquette3',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ue', models.CharField(blank=True, max_length=40)),
                ('ec', models.CharField(max_length=30)),
                ('cm', models.IntegerField()),
                ('tpd', models.IntegerField()),
                ('ttal', models.IntegerField()),
                ('tpe', models.IntegerField()),
                ('ects', models.IntegerField()),
                ('total_Ects', models.CharField(blank=True, max_length=3)),
                ('coefs', models.CharField(blank=True, max_length=2)),
                ('coefs_details', models.IntegerField()),
                ('id_classe', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.Classe')),
            ],
            options={
                'verbose_name': 'Plaquette3',
            },
        ),
        migrations.CreateModel(
            name='Plaquette2',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ue', models.CharField(blank=True, max_length=40)),
                ('ec', models.CharField(max_length=30)),
                ('cm', models.IntegerField()),
                ('tpd', models.IntegerField()),
                ('ttal', models.IntegerField()),
                ('tpe', models.IntegerField()),
                ('ects', models.IntegerField()),
                ('total_Ects', models.CharField(blank=True, max_length=3)),
                ('coefs', models.CharField(blank=True, max_length=2)),
                ('coefs_details', models.IntegerField()),
                ('id_classe', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.Classe')),
            ],
            options={
                'verbose_name': 'Plaquette2',
            },
        ),
        migrations.CreateModel(
            name='Plaquette1',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ue', models.CharField(blank=True, max_length=40)),
                ('ec', models.CharField(max_length=30)),
                ('cm', models.CharField(max_length=3)),
                ('tpd', models.CharField(max_length=3)),
                ('ttal', models.CharField(max_length=3)),
                ('tpe', models.CharField(max_length=3)),
                ('ects', models.CharField(max_length=3)),
                ('total_Ects', models.CharField(blank=True, max_length=3)),
                ('coefs', models.CharField(blank=True, max_length=2)),
                ('coefs_details', models.IntegerField()),
                ('id_classe', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.Classe')),
            ],
            options={
                'verbose_name': 'Plaquette1',
            },
        ),
        migrations.CreateModel(
            name='Plaquette',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ue', models.CharField(blank=True, max_length=40)),
                ('ec', models.CharField(max_length=30)),
                ('cm', models.CharField(max_length=3)),
                ('tpd', models.CharField(max_length=3)),
                ('ttal', models.CharField(max_length=3)),
                ('tpe', models.CharField(max_length=3)),
                ('ects', models.CharField(max_length=3)),
                ('total_Ects', models.CharField(blank=True, max_length=3)),
                ('coefs', models.CharField(blank=True, max_length=2)),
                ('coefs_details', models.IntegerField()),
                ('id_classe', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.Classe')),
            ],
            options={
                'verbose_name': 'Plaquette',
            },
        ),
        migrations.CreateModel(
            name='Notification',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date d envoi')),
                ('contenu', models.TextField()),
                ('id_prof_emmet', models.IntegerField()),
                ('id_prof_recep', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.Prof')),
            ],
            options={
                'verbose_name_plural': 'Notifications',
            },
        ),
        migrations.CreateModel(
            name='Enseigner',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('id_classe', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.Classe')),
                ('id_prof', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.Prof')),
            ],
            options={
                'verbose_name_plural': 'Enseigner',
            },
        ),
        migrations.AddField(
            model_name='cours',
            name='id_prof',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.Prof'),
        ),
        migrations.CreateModel(
            name='Responsable_Prof',
            fields=[
                ('prof_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='myapp.Prof')),
                ('id_classe', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.Classe')),
            ],
            options={
                'verbose_name_plural': 'Responsable pédagogique',
            },
            bases=('myapp.prof',),
        ),
        migrations.CreateModel(
            name='Responsable_Eleve',
            fields=[
                ('eleve_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='myapp.Eleve')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'Responsable de classe',
                'ordering': ['prenom_eleve'],
            },
            bases=('myapp.eleve',),
        ),
        migrations.CreateModel(
            name='Planning',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('heure', models.CharField(max_length=7, null=True)),
                ('moduleLundi', models.CharField(blank=True, max_length=30)),
                ('moduleMardi', models.CharField(blank=True, max_length=30)),
                ('moduleMercredi', models.CharField(blank=True, max_length=30)),
                ('moduleJeudi', models.CharField(blank=True, max_length=30)),
                ('moduleVendredi', models.CharField(blank=True, max_length=30)),
                ('moduleSamedi', models.CharField(blank=True, max_length=30)),
                ('id_classe', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.Classe')),
                ('id_prof', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.Responsable_Prof')),
            ],
            options={
                'verbose_name_plural': 'Planning',
            },
        ),
        migrations.CreateModel(
            name='CahierTexte',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('heure_cours', models.CharField(max_length=50)),
                ('date', models.DateField()),
                ('contenu', models.TextField()),
                ('id_cours', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.Cours')),
                ('id_eleve', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.Responsable_Eleve')),
            ],
            options={
                'verbose_name_plural': 'Cahier de texte',
                'ordering': ['date'],
            },
        ),
    ]
