text: # Generated by Django 3.1.1 on 2020-10-04 12:45
  
  from django.conf import settings
  from django.db import migrations, models
  import django.db.models.deletion
  
  
  class Migration(migrations.Migration):
  
      dependencies = [
          migrations.swappable_dependency(settings.AUTH_USER_MODEL),
          ('donatori', '0002_sezione'),
      ]
  
      operations = [
          migrations.CreateModel(
              name='Sesso',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('codice', models.CharField(max_length=1, unique=True)),
                  ('descrizione', models.CharField(max_length=255)),
                  ('gg_da_sangue_a_sangue', models.IntegerField()),
                  ('gg_da_sangue_a_plasma', models.IntegerField()),
                  ('gg_da_sangue_a_piastrine', models.IntegerField()),
                  ('gg_da_plasma_a_sangue', models.IntegerField()),
                  ('gg_da_plasma_a_plasma', models.IntegerField()),
                  ('gg_da_plasma_a_piastrine', models.IntegerField()),
                  ('gg_da_piastrine_a_sangue', models.IntegerField()),
                  ('gg_da_piastrine_a_plasma', models.IntegerField()),
                  ('gg_da_piastrine_a_piastrine', models.IntegerField()),
              ],
              options={
                  'verbose_name': 'Sesso',
                  'verbose_name_plural': 'Sessi',
              },
          ),
          migrations.CreateModel(
              name='StatoDonatore',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('codice', models.CharField(max_length=255)),
                  ('descrizione', models.CharField(blank=True, max_length=255)),
                  ('is_attivo', models.BooleanField(default=True)),
                  ('utente', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
              ],
              options={
                  'verbose_name': 'Stato donatore',
                  'verbose_name_plural': 'Stati donatore',
                  'unique_together': {('utente', 'codice')},
              },
          ),
          migrations.CreateModel(
              name='Donatore',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('num_tessera', models.CharField(max_length=255)),
                  ('cognome', models.CharField(max_length=255)),
                  ('nome', models.CharField(max_length=255)),
                  ('num_tessera_cartacea', models.CharField(blank=True, max_length=255)),
                  ('data_rilascio_tessera', models.DateField(blank=True, null=True)),
                  ('codice_fiscale', models.CharField(blank=True, max_length=255)),
                  ('data_nascita', models.DateField(blank=True, null=True)),
                  ('data_iscrizione', models.DateField(blank=True, null=True)),
                  ('gruppo_sanguigno', models.CharField(blank=True, max_length=10)),
                  ('rh', models.CharField(blank=True, max_length=10)),
                  ('fenotipo', models.CharField(blank=True, max_length=10)),
                  ('kell', models.CharField(blank=True, max_length=10)),
                  ('indirizzo', models.CharField(blank=True, max_length=255)),
                  ('frazione', models.CharField(blank=True, max_length=255)),
                  ('cap', models.CharField(blank=True, max_length=10)),
                  ('citta', models.CharField(blank=True, max_length=255)),
                  ('provincia', models.CharField(blank=True, max_length=100)),
                  ('tel', models.CharField(blank=True, max_length=255)),
                  ('tel_lavoro', models.CharField(blank=True, max_length=255)),
                  ('cell', models.CharField(blank=True, max_length=255)),
                  ('fax', models.CharField(blank=True, max_length=255)),
                  ('email', models.CharField(blank=True, max_length=255)),
                  ('fermo_per_malattia', models.BooleanField(default=False)),
                  ('donazioni_pregresse', models.IntegerField(default=0)),
                  ('num_benemerenze', models.IntegerField(default=0)),
                  ('sesso', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='donatori.sesso')),
                  ('sezione', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='donatori.sezione')),
                  ('stato_donatore', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='donatori.statodonatore')),
              ],
              options={
                  'verbose_name': 'Donatore',
                  'verbose_name_plural': 'Donatori',
                  'unique_together': {('sezione', 'num_tessera')},
              },
          ),
      ]
  