# Generated by Django 3.1 on 2021-03-11 11:49

from django.db import migrations, models
import django.db.models.deletion
import payments.utils
import uuid


class Migration(migrations.Migration):

    dependencies = [
        ("applications", "0027_remove_no_suitable_berth_notified_status"),
        ("leases", "0013_add_terminate_status"),
        ("resources", "0026_berth_is_invoiceable"),
        ("customers", "0014_increase_org_postal_code"),
        ("payments", "0021_auto_20210216_0808"),
    ]

    operations = [
        migrations.CreateModel(
            name="BerthSwitchOffer",
            fields=[
                (
                    "id",
                    models.UUIDField(
                        default=uuid.uuid4,
                        editable=False,
                        primary_key=True,
                        serialize=False,
                    ),
                ),
                (
                    "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=[
                            ("pending", "Pending"),
                            ("accepted", "Accepted"),
                            ("rejected", "Rejected"),
                            ("expired", "Expired"),
                            ("cancelled", "Cancelled"),
                        ],
                        default="pending",
                        max_length=9,
                    ),
                ),
                (
                    "due_date",
                    models.DateField(verbose_name="due date"),
                ),
                ("customer_first_name", models.TextField(blank=True, null=True)),
                ("customer_last_name", models.TextField(blank=True, null=True)),
                ("customer_email", models.TextField(blank=True, null=True)),
                ("customer_phone", models.TextField(blank=True, null=True)),
                (
                    "application",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="switch_offers",
                        to="applications.berthapplication",
                    ),
                ),
                (
                    "berth",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="switch_offers",
                        to="resources.berth",
                    ),
                ),
                (
                    "customer",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="offers",
                        to="customers.customerprofile",
                    ),
                ),
                (
                    "lease",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="switch_offers",
                        to="leases.berthlease",
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
        ),
    ]
