# Generated by Django 2.2.3 on 2019-08-25 12:41

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('assurance', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='ChefEtablissement',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('prenom', models.CharField(max_length=100)),
                ('nom', models.CharField(max_length=100)),
                ('addresse', models.CharField(max_length=100)),
                ('numero_telephone', models.CharField(max_length=100)),
                ('email', models.CharField(max_length=100)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Eleve',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('prenom', models.CharField(max_length=100)),
                ('nom', models.CharField(max_length=100)),
                ('addresse', models.CharField(max_length=100)),
                ('numero_telephone', models.CharField(max_length=100)),
                ('email', models.CharField(max_length=100)),
                ('classe', models.CharField(max_length=100)),
                ('date_de_naissance', models.DateField()),
                ('date_ajout', models.DateField(blank=True, null=True)),
                ('assure', models.BooleanField()),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Souscription',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.CharField(choices=[('0', 'Expression de Besoin'), ('1', 'Offre'), ('2', 'Paiement'), ('3', 'Souscrit')], max_length=1)),
                ('date_expiration', models.DateField(blank=True, null=True)),
                ('date_creation', models.DateTimeField(blank=True, null=True)),
                ('chef_etablissement', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ecole.ChefEtablissement')),
                ('courtier', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='souscription_courtier_eleve', to='assurance.Courtier')),
                ('eleve', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='ecole.Eleve')),
                ('produit_assurance', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='souscription_produitassurance_eleve', to='assurance.ProduitAssurance')),
            ],
        ),
        migrations.CreateModel(
            name='Etablissement',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nom', models.CharField(max_length=100)),
                ('adresse', models.CharField(max_length=200)),
                ('numero_telephone', models.CharField(max_length=100)),
                ('nombre_eleve', models.IntegerField()),
                ('chef_etablissement', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='ecole.ChefEtablissement')),
                ('courtier', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='assurance.Courtier')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'etablissement',
                'verbose_name_plural': 'etablissement',
            },
        ),
        migrations.CreateModel(
            name='DemandeSouscription',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('eleves_count', models.IntegerField(blank=True, null=True)),
                ('payement_valider', models.BooleanField(blank=True, null=True)),
                ('chef_etablissement', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ecole.ChefEtablissement')),
                ('courtier', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='assurance.Courtier')),
                ('eleves', models.ManyToManyField(blank=True, to='ecole.Eleve')),
            ],
        ),
        migrations.CreateModel(
            name='Declaration',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('titre', models.CharField(max_length=100)),
                ('date', models.DateField(blank=True, null=True)),
                ('date_incident', models.DateField()),
                ('lieu_incident', models.TextField()),
                ('circonstence_incident', models.TextField()),
                ('nature_blessure', models.CharField(choices=[('0', 'Leger'), ('1', 'Grave'), ('2', 'Deces')], max_length=5)),
                ('information_supplementaire', models.TextField(blank=True, max_length=500, null=True)),
                ('accepter', models.BooleanField(blank=True, null=True)),
                ('status', models.CharField(choices=[('0', 'Envoyer'), ('1', 'Reçu'), ('2', 'En cours de traitement'), ('3', 'Résolue')], max_length=1)),
                ('courtier', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='assurance.Courtier')),
                ('eleve', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ecole.Eleve')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Assistant',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nom_utilisateur', models.CharField(max_length=150)),
                ('mot_de_passe', models.CharField(max_length=150)),
                ('email', models.CharField(max_length=150)),
                ('numero_telephone', models.CharField(max_length=150)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
