# Generated by Django 3.2.8 on 2021-11-22 15:00

from django.db import migrations, models
import uuid


class Migration(migrations.Migration):

    dependencies = [
        ("payments", "0030_add_berth_pricing_category"),
    ]

    operations = [
        migrations.CreateModel(
            name="TalpaProductAccounting",
            fields=[
                (
                    "id",
                    models.UUIDField(
                        default=uuid.uuid4,
                        editable=False,
                        primary_key=True,
                        serialize=False,
                    ),
                ),
                (
                    "region",
                    models.CharField(
                        choices=[("east", "East"), ("west", "West")],
                        max_length=32,
                        verbose_name="area region",
                    ),
                ),
                (
                    "talpa_ecom_product_id",
                    models.UUIDField(verbose_name="talpa eCom product ID"),
                ),
                (
                    "talpa_ecom_accounting_id",
                    models.UUIDField(verbose_name="talpa eCom accounting mapping ID"),
                ),
                (
                    "product_type",
                    models.CharField(
                        choices=[
                            ("berth", "Berth"),
                            ("winter", "Winter storage or storage on ice"),
                        ],
                        max_length=32,
                        verbose_name="talpa eCom product type",
                    ),
                ),
            ],
        ),
        migrations.AddField(
            model_name="order",
            name="talpa_ecom_id",
            field=models.UUIDField(
                blank=True, null=True, verbose_name="talpa eCom order id"
            ),
        ),
        migrations.AddField(
            model_name="order",
            name="talpa_order_id",
            field=models.UUIDField(
                blank=True, null=True, verbose_name="Talpa order id"
            ),
        ),
        migrations.AddConstraint(
            model_name="talpaproductaccounting",
            constraint=models.UniqueConstraint(
                fields=("region", "product_type"),
                name="unique_accounting_region_and_product_type",
            ),
        ),
    ]
