# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import migrations, models
import realtime.models.stations
import ckeditor.fields


class Migration(migrations.Migration):

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Data',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('datetime', models.DateTimeField(verbose_name=b'data e ora')),
                ('weather', models.CharField(max_length=10, null=True, verbose_name=b'tempo', blank=True)),
                ('temperature', models.DecimalField(null=True, verbose_name=b'temperatura', max_digits=3, decimal_places=1, blank=True)),
                ('temperature_max', models.DecimalField(null=True, verbose_name=b'temperatura massima', max_digits=3, decimal_places=1, blank=True)),
                ('temperature_max_time', models.TimeField(null=True, verbose_name=b'ora temperatura massima', blank=True)),
                ('temperature_min', models.DecimalField(null=True, verbose_name=b'temperatura minima', max_digits=3, decimal_places=1, blank=True)),
                ('temperature_min_time', models.TimeField(null=True, verbose_name=b'ora temperatura minima', blank=True)),
                ('relative_humidity', models.DecimalField(null=True, verbose_name=b'umidit\xc3\xa0 relativa', max_digits=4, decimal_places=1, blank=True)),
                ('relative_humidity_max', models.DecimalField(null=True, verbose_name=b'umidit\xc3\xa0 relativa massima', max_digits=4, decimal_places=1, blank=True)),
                ('relative_humidity_max_time', models.TimeField(null=True, verbose_name=b'ora umidit\xc3\xa0 relativa massima', blank=True)),
                ('relative_humidity_min', models.DecimalField(null=True, verbose_name=b'umidit\xc3\xa0 relativa minima', max_digits=4, decimal_places=1, blank=True)),
                ('relative_humidity_min_time', models.TimeField(null=True, verbose_name=b'ora umidit\xc3\xa0 relativa minima', blank=True)),
                ('dewpoint', models.DecimalField(null=True, verbose_name=b'dewpoint', max_digits=3, decimal_places=1, blank=True)),
                ('dewpoint_max', models.DecimalField(null=True, verbose_name=b'dewpoint massima', max_digits=3, decimal_places=1, blank=True)),
                ('dewpoint_max_time', models.TimeField(null=True, verbose_name=b'ora dewpoint massima', blank=True)),
                ('dewpoint_min', models.DecimalField(null=True, verbose_name=b'dewpoint minima', max_digits=3, decimal_places=1, blank=True)),
                ('dewpoint_min_time', models.TimeField(null=True, verbose_name=b'ora dewpoint minima', blank=True)),
                ('pressure', models.DecimalField(null=True, verbose_name=b'pressione', max_digits=5, decimal_places=1, blank=True)),
                ('pressure_max', models.DecimalField(null=True, verbose_name=b'pressione massima', max_digits=5, decimal_places=1, blank=True)),
                ('pressure_max_time', models.TimeField(null=True, verbose_name=b'ora pressione massima', blank=True)),
                ('pressure_min', models.DecimalField(null=True, verbose_name=b'pressione minima', max_digits=5, decimal_places=1, blank=True)),
                ('pressure_min_time', models.TimeField(null=True, verbose_name=b'ora pressione minima', blank=True)),
                ('wind_strength', models.DecimalField(null=True, verbose_name=b'vento', max_digits=4, decimal_places=1, blank=True)),
                ('wind_dir', models.CharField(max_length=10, null=True, verbose_name=b'direzione vento', blank=True)),
                ('wind_strength_max', models.DecimalField(null=True, verbose_name=b'vento massimo', max_digits=4, decimal_places=1, blank=True)),
                ('wind_dir_max', models.CharField(max_length=10, null=True, verbose_name=b'direzione vento massimo', blank=True)),
                ('wind_max_time', models.TimeField(null=True, verbose_name=b'ora vento massimo', blank=True)),
                ('rain', models.DecimalField(null=True, verbose_name=b'accumulo precipitazioni', max_digits=8, decimal_places=1, blank=True)),
                ('rain_rate', models.DecimalField(null=True, verbose_name=b'rateo precipitazioni', max_digits=8, decimal_places=1, blank=True)),
                ('rain_rate_max', models.DecimalField(null=True, verbose_name=b'rateo massimo precipitazioni', max_digits=8, decimal_places=1, blank=True)),
                ('rain_rate_max_time', models.TimeField(null=True, verbose_name=b'ora rateo massimo precipitazioni', blank=True)),
                ('rain_month', models.DecimalField(null=True, verbose_name=b'accumulo mensile precipitazioni', max_digits=8, decimal_places=1, blank=True)),
                ('rain_year', models.DecimalField(null=True, verbose_name=b'accumulo annuale precipitazioni', max_digits=8, decimal_places=1, blank=True)),
            ],
            options={
                'verbose_name': 'Dati realtime',
                'verbose_name_plural': 'Dati realtime',
            },
        ),
        migrations.CreateModel(
            name='DataFormat',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('name', models.CharField(max_length=64, verbose_name=b'nome')),
                ('description', models.TextField(verbose_name=b'descrizione')),
            ],
            options={
                'verbose_name': 'Formato dati',
                'verbose_name_plural': 'Formati dati',
            },
        ),
        migrations.CreateModel(
            name='HistoricData',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('date', models.DateField(verbose_name=b'data')),
                ('temperature_max', models.DecimalField(null=True, verbose_name=b'temperatura massima', max_digits=3, decimal_places=1, blank=True)),
                ('temperature_min', models.DecimalField(null=True, verbose_name=b'temperatura minima', max_digits=3, decimal_places=1, blank=True)),
                ('temperature_mean', models.DecimalField(null=True, verbose_name=b'temperatura media', max_digits=3, decimal_places=1, blank=True)),
                ('relative_humidity_max', models.DecimalField(null=True, verbose_name=b'umidit\xc3\xa0 relativa massima', max_digits=4, decimal_places=1, blank=True)),
                ('relative_humidity_min', models.DecimalField(null=True, verbose_name=b'umidit\xc3\xa0 relativa minima', max_digits=4, decimal_places=1, blank=True)),
                ('relative_humidity_mean', models.DecimalField(null=True, verbose_name=b'umidit\xc3\xa0 relativa media', max_digits=4, decimal_places=1, blank=True)),
                ('pressure_max', models.DecimalField(null=True, verbose_name=b'pressione massima', max_digits=5, decimal_places=1, blank=True)),
                ('pressure_min', models.DecimalField(null=True, verbose_name=b'pressione minima', max_digits=5, decimal_places=1, blank=True)),
                ('pressure_mean', models.DecimalField(null=True, verbose_name=b'pressione media', max_digits=5, decimal_places=1, blank=True)),
                ('rain', models.DecimalField(null=True, verbose_name=b'accumulo precipitazioni', max_digits=8, decimal_places=1, blank=True)),
            ],
            options={
                'verbose_name': 'Dati storici',
                'verbose_name_plural': 'Dati storici',
            },
        ),
        migrations.CreateModel(
            name='Nation',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('name', models.CharField(max_length=64, verbose_name=b'nome')),
                ('alpha2_code', models.CharField(max_length=2, verbose_name=b'alpha2 code')),
                ('alpha3_code', models.CharField(max_length=3, verbose_name=b'alpha3 code')),
                ('numeric_code', models.CharField(max_length=4, verbose_name=b'codice numerico')),
                ('rank', models.IntegerField(verbose_name=b'importanza')),
            ],
            options={
                'ordering': ('rank', 'name'),
                'verbose_name': 'nazione',
                'verbose_name_plural': 'nazioni',
            },
        ),
        migrations.CreateModel(
            name='NetRequest',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('date', models.DateTimeField(auto_now_add=True, verbose_name=b'data')),
                ('firstname', models.CharField(max_length=128, verbose_name=b'nome')),
                ('lastname', models.CharField(max_length=128, verbose_name=b'cognome')),
                ('email', models.EmailField(max_length=255, verbose_name=b'e-mail')),
                ('phone', models.CharField(max_length=64, null=True, verbose_name=b'telefono', blank=True)),
                ('station_description', models.TextField(verbose_name=b'descrizione stazione')),
                ('climate', models.TextField(verbose_name=b'microclima')),
                ('web_site_url', models.URLField(max_length=255, null=True, verbose_name=b'URL sito web', blank=True)),
                ('webcam_url', models.URLField(max_length=255, null=True, verbose_name=b'Webcam URL', blank=True)),
                ('address', models.CharField(max_length=255, verbose_name=b'indirizzo')),
                ('city', models.CharField(max_length=128, verbose_name=b'citt\xc3\xa0')),
                ('province', models.CharField(max_length=2, verbose_name=b'provincia')),
                ('nation', models.CharField(max_length=128, verbose_name=b'nazione')),
                ('lat', models.CharField(max_length=128, verbose_name=b'latitudine')),
                ('lng', models.CharField(max_length=128, verbose_name=b'longitudine')),
                ('elevation', models.IntegerField(verbose_name=b'altitudine')),
                ('mean_year_rain', models.IntegerField(verbose_name=b'precipitazione media annua (mm)')),
                ('station_model', models.CharField(max_length=255, verbose_name=b'modello stazione')),
                ('software_model', models.CharField(max_length=255, verbose_name=b'modello software')),
                ('installation_type', models.CharField(max_length=255, verbose_name=b'tipo di installazione')),
                ('installation_position', models.CharField(max_length=255, verbose_name=b'ubicazione')),
                ('elevation_ground', models.DecimalField(verbose_name=b'altezza dal suolo (m)', max_digits=5, decimal_places=2)),
                ('data_url', models.URLField(null=True, verbose_name=b'URL dati realtime', blank=True)),
                ('image', models.ImageField(upload_to=realtime.models.stations.set_net_request_image_folder)),
            ],
            options={
                'verbose_name': 'Richiesta ingresso nella rete',
                'verbose_name_plural': 'Richieste ingresso nella rete',
            },
        ),
        migrations.CreateModel(
            name='Province',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('name', models.CharField(max_length=64, verbose_name=b'nome')),
                ('rank', models.IntegerField(verbose_name=b'importanza')),
            ],
            options={
                'verbose_name': 'provincia',
                'verbose_name_plural': 'province',
            },
        ),
        migrations.CreateModel(
            name='Region',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('name', models.CharField(max_length=64, verbose_name=b'nome')),
                ('rank', models.IntegerField(verbose_name=b'importanza')),
                ('nation', models.ForeignKey(verbose_name=b'nazione', to='realtime.Nation', on_delete=models.CASCADE)),
            ],
            options={
                'ordering': ('nation__rank', 'rank', 'name'),
                'verbose_name': 'regione',
                'verbose_name_plural': 'regioni',
            },
        ),
        migrations.CreateModel(
            name='Station',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('name', models.CharField(max_length=128, verbose_name=b'nome')),
                ('slug', models.SlugField(max_length=128, verbose_name=b'slug')),
                ('short_name', models.CharField(max_length=64, null=True, verbose_name=b'nome abbreviato', blank=True)),
                ('description', ckeditor.fields.RichTextField(verbose_name=b'descrizione')),
                ('climate', ckeditor.fields.RichTextField(null=True, verbose_name=b'clima', blank=True)),
                ('web', models.URLField(max_length=255, null=True, verbose_name=b'sito web', blank=True)),
                ('webcam', models.URLField(max_length=255, null=True, verbose_name=b'webcam url', blank=True)),
                ('image', models.ImageField(null=True, upload_to=realtime.models.stations.set_station_image_folder, blank=True)),
                ('address', models.CharField(max_length=255, null=True, verbose_name=b'indirizzo', blank=True)),
                ('city', models.CharField(max_length=255, null=True, verbose_name=b'citt\xc3\xa0/comune', blank=True)),
                ('cap', models.CharField(max_length=10, null=True, verbose_name=b'cap', blank=True)),
                ('lat', models.CharField(max_length=255, verbose_name=b'latitudine')),
                ('lng', models.CharField(max_length=255, verbose_name=b'longitudine')),
                ('elevation', models.IntegerField(verbose_name=b'altitudine')),
                ('mean_year_rain', models.DecimalField(verbose_name=b'pioggia media annua', max_digits=8, decimal_places=1)),
                ('station_model', models.CharField(max_length=255, verbose_name=b'modello stazione')),
                ('software_model', models.CharField(max_length=255, verbose_name=b'software')),
                ('installation_type', models.CharField(max_length=255, verbose_name=b'tipo intallazione')),
                ('installation_position', models.CharField(max_length=255, verbose_name=b'posizionamento')),
                ('elevation_ground', models.IntegerField(verbose_name=b'elevazione dal suolo')),
                ('data_url', models.URLField(max_length=255, verbose_name=b'url dati')),
                ('data_date_regexp', models.CharField(max_length=128, null=True, verbose_name=b'espressione regolare data', blank=True)),
                ('data_time_regexp', models.CharField(max_length=128, null=True, verbose_name=b'espressione regolare ora', blank=True)),
                ('forecast_url', models.URLField(max_length=255, null=True, verbose_name=b'url sito previsionale', blank=True)),
                ('active', models.BooleanField(default=True, verbose_name=b'attiva')),
                ('data_type', models.ForeignKey(verbose_name=b'tipologia dati', to='realtime.DataFormat', on_delete=models.CASCADE)),
                ('nation', models.ForeignKey(verbose_name=b'nazione', blank=True, to='realtime.Nation', null=True, on_delete=models.SET_NULL)),
                ('province', models.ForeignKey(verbose_name=b'provincia', blank=True, to='realtime.Province', null=True, on_delete=models.SET_NULL)),
                ('region', models.ForeignKey(verbose_name=b'regione', blank=True, to='realtime.Region', null=True, on_delete=models.SET_NULL)),
            ],
            options={
                'verbose_name': 'stazione',
                'verbose_name_plural': 'stazioni',
            },
        ),
        migrations.AddField(
            model_name='province',
            name='region',
            field=models.ForeignKey(verbose_name=b'regione', to='realtime.Region', on_delete=models.CASCADE),
        ),
        migrations.AddField(
            model_name='historicdata',
            name='station',
            field=models.ForeignKey(verbose_name=b'stazione', to='realtime.Station', on_delete=models.CASCADE),
        ),
        migrations.AddField(
            model_name='data',
            name='station',
            field=models.ForeignKey(verbose_name=b'stazione', to='realtime.Station', on_delete=models.CASCADE),
        ),
    ]
