# Generated by Django 4.2.2 on 2023-06-20 21:51

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


class Migration(migrations.Migration):
    initial = True

    dependencies = [
        ("contatti_app", "0001_initial"),
        ("fattura_elettronica_app", "0001_initial"),
    ]

    operations = [
        migrations.CreateModel(
            name="AgenteOfferta",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("codice", models.IntegerField(blank=True, null=True)),
            ],
            options={
                "verbose_name": "agenteofferta",
                "verbose_name_plural": "agenteofferta",
            },
        ),
        migrations.CreateModel(
            name="AtomoFatturabile",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
            ],
            options={
                "verbose_name": "AtomoFatturabile",
                "verbose_name_plural": "AtomoFatturabile",
            },
        ),
        migrations.CreateModel(
            name="DestinatarioOfferta",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "destinazione",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="DestinatarioOfferta_da_Sede_destinazione",
                        to="contatti_app.sede",
                    ),
                ),
                (
                    "intestatario",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="DestinatarioOfferta_da_contatti_appContattoAziendale_intestatario",
                        to="contatti_app.contattoaziendale",
                    ),
                ),
            ],
            options={
                "verbose_name": "destinatarioofferta",
                "verbose_name_plural": "destinatarioofferta",
            },
        ),
        migrations.CreateModel(
            name="GruppoOfferte",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("anno_1a_rev", models.IntegerField(blank=True, null=True)),
                ("numero", models.IntegerField(blank=True, null=True)),
                ("descrizione", models.CharField(max_length=4096, null=True)),
                (
                    "agente",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="GruppoOfferte_da_AgenteOfferta_agente",
                        to="offerte_app.agenteofferta",
                    ),
                ),
                (
                    "destinatario",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="GruppoOfferte_da_DestinatarioOfferta_destinatario",
                        to="offerte_app.destinatarioofferta",
                    ),
                ),
            ],
            options={
                "verbose_name": "gruppoofferte",
                "verbose_name_plural": "gruppoofferte",
            },
        ),
        migrations.CreateModel(
            name="Offerta",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("data", models.DateField(blank=True, null=True)),
                ("revisione", models.IntegerField(blank=True, null=True)),
                ("documento", models.CharField(max_length=128, null=True)),
                ("codice_offerta", models.IntegerField(blank=True, null=True)),
                ("accettazione", models.DateField(blank=True, null=True)),
                (
                    "gruppo",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="Offerta_da_GruppoOfferte_gruppo",
                        to="offerte_app.gruppoofferte",
                    ),
                ),
            ],
            options={
                "verbose_name": "offerta",
                "verbose_name_plural": "offerta",
            },
        ),
        migrations.CreateModel(
            name="TipologiaOfferta",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("descrizione", models.CharField(max_length=1024, null=True)),
            ],
            options={
                "verbose_name": "tipologiaofferta",
                "verbose_name_plural": "tipologiaofferta",
            },
        ),
        migrations.CreateModel(
            name="ParteEconomicaOfferta",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "dettaglio_economico_offerto",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="ParteEconomicaOfferta_da_DettaglioFatturabile_dettaglio_economico_offerto",
                        to="offerte_app.atomofatturabile",
                    ),
                ),
                (
                    "revisione",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="ParteEconomicaOfferta_da_Offerta_revisione",
                        to="offerte_app.offerta",
                    ),
                ),
            ],
            options={
                "verbose_name": "parteeconomicaofferta",
                "verbose_name_plural": "parteeconomicaofferta",
            },
        ),
        migrations.CreateModel(
            name="ModalitaLavoro",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("descrizione", models.IntegerField(blank=True, null=True)),
                (
                    "unita_misura_std",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="ModalitaLavoro_da_UnitaMisura_unita_misura_std",
                        to="fattura_elettronica_app.unitamisura",
                    ),
                ),
            ],
            options={
                "verbose_name": "modalitalavoro",
                "verbose_name_plural": "modalitalavoro",
            },
        ),
        migrations.AddField(
            model_name="gruppoofferte",
            name="tipo",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="GruppoOfferte_da_TipologiaOfferta_tipo",
                to="offerte_app.tipologiaofferta",
            ),
        ),
        migrations.AddField(
            model_name="atomofatturabile",
            name="modalita_lavoro",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="DettaglioFatturabile_da_ModalitaLavoro_modalita_lavoro",
                to="offerte_app.modalitalavoro",
            ),
        ),
        migrations.AddField(
            model_name="atomofatturabile",
            name="offerta_riferimento",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="DettaglioFatturabile_da_Offerta_offerta_riferimento",
                to="offerte_app.offerta",
            ),
        ),
        migrations.AddField(
            model_name="atomofatturabile",
            name="riferimento_oggetto_fattura",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="DettaglioFatturabile_da_DatiEstesiDettaglioFatturabile_riferimento_oggetto_fattura",
                to="fattura_elettronica_app.oggettodafatturare",
            ),
        ),
    ]
