# Generated by Django 3.1.1 on 2021-04-06 18:03

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Administrator',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('firstname', models.CharField(max_length=255)),
                ('lastname', models.CharField(max_length=255)),
                ('address', models.TextField()),
                ('tel', models.CharField(max_length=255)),
                ('email', models.EmailField(max_length=254, unique=True)),
                ('password', models.CharField(blank=True, default='slndxfwq', max_length=50)),
                ('role', models.CharField(choices=[('admin', 'admin'), ('technicien', 'technicien'), ('meteorologue', 'meteorologue')], default='technicien', max_length=50)),
                ('theme', models.CharField(blank=True, default='secondary', max_length=50, null=True)),
                ('profile', models.ImageField(blank=True, null=True, upload_to='images/')),
                ('last_connection', models.DateTimeField(blank=True, null=True)),
                ('is_online', models.BooleanField(blank=True, default=False, null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Department',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('created_at', models.DateField(auto_now_add=True)),
                ('update_at', models.DateField(auto_now=True)),
                ('trash', models.BooleanField(default=False)),
                ('trash_at', models.DateField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Meteorologist',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('firstname', models.CharField(max_length=255)),
                ('lastname', models.CharField(max_length=255)),
                ('address', models.TextField()),
                ('tel', models.CharField(max_length=255)),
                ('email', models.EmailField(max_length=254, unique=True)),
                ('password', models.CharField(blank=True, default='slndxfwq', max_length=50)),
                ('role', models.CharField(choices=[('admin', 'admin'), ('technicien', 'technicien'), ('meteorologue', 'meteorologue')], default='technicien', max_length=50)),
                ('theme', models.CharField(blank=True, default='secondary', max_length=50, null=True)),
                ('profile', models.ImageField(blank=True, null=True, upload_to='images/')),
                ('last_connection', models.DateTimeField(blank=True, null=True)),
                ('is_online', models.BooleanField(blank=True, default=False, null=True)),
                ('statut', models.BooleanField(default=True)),
                ('trash', models.BooleanField(default=False)),
                ('trash_at', models.DateField(blank=True, null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Station',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('latitude', models.FloatField()),
                ('longitude', models.FloatField()),
                ('created_at', models.DateField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('trash_at', models.DateField(blank=True, null=True)),
                ('activate_at', models.DateTimeField(blank=True, null=True)),
                ('trash', models.BooleanField(default=False)),
                ('statut', models.BooleanField(default=True)),
                ('map', models.TextField(blank=True, null=True)),
                ('is_valid', models.BooleanField(default=True)),
                ('department', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='connection.department')),
                ('meteorologist', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='connection.meteorologist')),
            ],
        ),
        migrations.CreateModel(
            name='Technician',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('firstname', models.CharField(max_length=255)),
                ('lastname', models.CharField(max_length=255)),
                ('address', models.TextField()),
                ('tel', models.CharField(max_length=255)),
                ('email', models.EmailField(max_length=254, unique=True)),
                ('password', models.CharField(blank=True, default='slndxfwq', max_length=50)),
                ('role', models.CharField(choices=[('admin', 'admin'), ('technicien', 'technicien'), ('meteorologue', 'meteorologue')], default='technicien', max_length=50)),
                ('theme', models.CharField(blank=True, default='secondary', max_length=50, null=True)),
                ('profile', models.ImageField(blank=True, null=True, upload_to='images/')),
                ('last_connection', models.DateTimeField(blank=True, null=True)),
                ('is_online', models.BooleanField(blank=True, default=False, null=True)),
                ('statut', models.BooleanField(default=True)),
                ('trash', models.BooleanField(default=False)),
                ('trash_at', models.DateField(blank=True, null=True)),
                ('is_valid', models.BooleanField(default=True)),
                ('meteorologist', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='connection.meteorologist')),
                ('station', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='connection.station')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Region',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, unique=True)),
                ('created_at', models.DateField(auto_now_add=True)),
                ('update_at', models.DateField(auto_now=True)),
                ('trash', models.BooleanField(default=False)),
                ('trash_at', models.DateField(blank=True, null=True)),
                ('admin', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='connection.administrator')),
            ],
        ),
        migrations.CreateModel(
            name='RainData',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('value', models.DecimalField(decimal_places=2, max_digits=10, null=True)),
                ('created_at', models.DateField(default=datetime.datetime(2021, 4, 6, 18, 3, 2, 914820))),
                ('update_at', models.DateField(auto_now=True)),
                ('trash', models.BooleanField(default=False)),
                ('trash_at', models.DateField(blank=True, null=True)),
                ('station', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='connection.station')),
                ('technician', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='connection.technician')),
            ],
        ),
        migrations.AddField(
            model_name='department',
            name='region',
            field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='connection.region'),
        ),
        migrations.CreateModel(
            name='Comments',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_note', models.DateField(auto_now_add=True)),
                ('content', models.TextField()),
                ('trash', models.BooleanField(default=False)),
                ('trash_at', models.DateField(blank=True, null=True)),
                ('station', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='connection.station')),
                ('technician', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='connection.technician')),
            ],
        ),
    ]
