# Generated by Django 3.1 on 2020-12-04 14:01

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("leases", "0012_add_renew_failed_status"),
    ]

    operations = [
        migrations.CreateModel(
            name="VismaContract",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "created_at",
                    models.DateTimeField(
                        auto_now_add=True, verbose_name="time created"
                    ),
                ),
                (
                    "modified_at",
                    models.DateTimeField(auto_now=True, verbose_name="time modified"),
                ),
                (
                    "status",
                    models.CharField(
                        choices=[
                            ("new", "New"),
                            ("pending", "Pending"),
                            ("signed", "Signed"),
                            ("deleted", "Deleted"),
                            ("cancelled", "Cancelled"),
                        ],
                        default="new",
                        max_length=16,
                        verbose_name="contract status",
                    ),
                ),
                ("document_id", models.UUIDField()),
                ("invitation_id", models.UUIDField()),
                ("passphrase", models.CharField(max_length=32)),
            ],
            options={
                "abstract": False,
            },
        ),
        migrations.CreateModel(
            name="VismaWinterStorageContract",
            fields=[
                (
                    "vismacontract_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="contracts.vismacontract",
                    ),
                ),
                (
                    "lease",
                    models.OneToOneField(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="contract",
                        to="leases.winterstoragelease",
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
            bases=("contracts.vismacontract", models.Model),
        ),
        migrations.CreateModel(
            name="VismaBerthContract",
            fields=[
                (
                    "vismacontract_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="contracts.vismacontract",
                    ),
                ),
                (
                    "lease",
                    models.OneToOneField(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="contract",
                        to="leases.berthlease",
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
            bases=("contracts.vismacontract", models.Model),
        ),
    ]
