# Generated by Django 3.0.5 on 2020-05-07 02:00

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Circonscription',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Commune',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Espece',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Incendie',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('forets', models.CharField(max_length=200)),
                ('lieudit', models.CharField(max_length=200)),
                ('supEstime', models.IntegerField(null=True)),
                ('supPlani', models.IntegerField(null=True)),
                ('Lat', models.DecimalField(decimal_places=6, default=0, max_digits=8, null=True)),
                ('Long', models.DecimalField(decimal_places=6, default=0, max_digits=8, null=True)),
                ('heureDepart', models.DateTimeField(blank=True, default=datetime.datetime.now)),
                ('dateExt', models.DateTimeField(blank=True, default=datetime.datetime.now)),
                ('heureIntervention', models.DateTimeField(blank=True, default=datetime.datetime.now)),
                ('Commentaires', models.TextField()),
                ('circonscription', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='incendies.Circonscription')),
                ('commune', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='incendies.Commune')),
            ],
        ),
        migrations.CreateModel(
            name='Moyensmobilise',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, null=True)),
                ('nombre', models.IntegerField(null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Typeformation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Wilaya',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('daira', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='TypeFormationincendie',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('incendie', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='incendies.Incendie')),
                ('typeformation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='incendies.Typeformation')),
            ],
        ),
        migrations.CreateModel(
            name='Intervention',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('incendie', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='incendies.Incendie')),
                ('moyensMobilise', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='incendies.Moyensmobilise')),
            ],
        ),
        migrations.AddField(
            model_name='incendie',
            name='wilaya',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='incendies.Wilaya'),
        ),
        migrations.CreateModel(
            name='Especesincendie',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('espece', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='incendies.Espece')),
                ('incendie', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='incendies.Incendie')),
            ],
        ),
        migrations.AddField(
            model_name='commune',
            name='wilaya',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='incendies.Wilaya'),
        ),
        migrations.AddField(
            model_name='circonscription',
            name='commune',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='incendies.Commune'),
        ),
    ]
