# Generated by Django 5.0.1 on 2024-01-28 22:11

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


class Migration(migrations.Migration):
    initial = True

    dependencies = [
        ("artd_location", "0001_initial"),
        ("artd_partner", "0001_initial"),
    ]

    operations = [
        migrations.CreateModel(
            name="Customer",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "created_at",
                    models.DateTimeField(
                        auto_now_add=True,
                        help_text="Date time on which the object was created.",
                        verbose_name="Created at",
                    ),
                ),
                (
                    "updated_at",
                    models.DateTimeField(
                        auto_now=True,
                        help_text="Date time on which the object was last updated.",
                        verbose_name="Updated at",
                    ),
                ),
                (
                    "status",
                    models.BooleanField(
                        default=True,
                        help_text="Status of the object.",
                        verbose_name="Status",
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        blank=True,
                        help_text="Name of the customer.",
                        max_length=100,
                        verbose_name="Name",
                    ),
                ),
                (
                    "last_name",
                    models.CharField(
                        blank=True,
                        help_text="Last name of the customer.",
                        max_length=100,
                        null=True,
                        verbose_name="Last name",
                    ),
                ),
                (
                    "birth_date",
                    models.DateField(
                        blank=True,
                        help_text="Birth date of the customer.",
                        null=True,
                        verbose_name="Birth date",
                    ),
                ),
                (
                    "document",
                    models.CharField(
                        blank=True,
                        help_text="Customer document",
                        max_length=50,
                        null=True,
                        verbose_name="Customer document",
                    ),
                ),
                (
                    "email",
                    models.EmailField(
                        blank=True,
                        help_text="Email of the customer.",
                        max_length=100,
                        null=True,
                        verbose_name="Email",
                    ),
                ),
                (
                    "phone",
                    models.CharField(
                        blank=True,
                        help_text="Phone of the customer.",
                        max_length=100,
                        null=True,
                        verbose_name="Phone",
                    ),
                ),
                (
                    "other_data",
                    models.JSONField(
                        blank=True,
                        help_text="Other customer data",
                        null=True,
                        verbose_name="Other data",
                    ),
                ),
                (
                    "city",
                    models.ForeignKey(
                        blank=True,
                        help_text="City of the customer.",
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="artd_location.city",
                        verbose_name="City",
                    ),
                ),
            ],
            options={
                "verbose_name": "Customer",
                "verbose_name_plural": "Customers",
            },
        ),
        migrations.CreateModel(
            name="CustomerAdditionalFields",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "created_at",
                    models.DateTimeField(
                        auto_now_add=True,
                        help_text="Date time on which the object was created.",
                        verbose_name="Created at",
                    ),
                ),
                (
                    "updated_at",
                    models.DateTimeField(
                        auto_now=True,
                        help_text="Date time on which the object was last updated.",
                        verbose_name="Updated at",
                    ),
                ),
                (
                    "status",
                    models.BooleanField(
                        default=True,
                        help_text="Status of the object.",
                        verbose_name="Status",
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        help_text="Field name",
                        max_length=250,
                        verbose_name="Field name",
                    ),
                ),
                (
                    "field_type",
                    models.CharField(
                        choices=[
                            ("number", "Number"),
                            ("date", "Date"),
                            ("email", "Email"),
                            ("password", "Password"),
                            ("text", "Text"),
                        ],
                        help_text="Field type",
                        max_length=10,
                        verbose_name="Field type",
                    ),
                ),
                (
                    "label",
                    models.CharField(
                        help_text="Field label",
                        max_length=50,
                        verbose_name="Field label",
                    ),
                ),
                (
                    "required",
                    models.BooleanField(
                        default=False,
                        help_text="Is required?",
                        verbose_name="Is required?",
                    ),
                ),
                (
                    "partner",
                    models.ForeignKey(
                        help_text="Partner of the field.",
                        on_delete=django.db.models.deletion.CASCADE,
                        to="artd_partner.partner",
                        verbose_name="Partner",
                    ),
                ),
            ],
            options={
                "verbose_name": "Customer Additional Field",
                "verbose_name_plural": "Customer Additional Fields",
            },
        ),
        migrations.CreateModel(
            name="CustomerAddress",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "created_at",
                    models.DateTimeField(
                        auto_now_add=True,
                        help_text="Date time on which the object was created.",
                        verbose_name="Created at",
                    ),
                ),
                (
                    "updated_at",
                    models.DateTimeField(
                        auto_now=True,
                        help_text="Date time on which the object was last updated.",
                        verbose_name="Updated at",
                    ),
                ),
                (
                    "status",
                    models.BooleanField(
                        default=True,
                        help_text="Status of the object.",
                        verbose_name="Status",
                    ),
                ),
                (
                    "phone",
                    models.CharField(
                        blank=True,
                        help_text="Customer phone",
                        max_length=50,
                        null=True,
                        verbose_name="Phone",
                    ),
                ),
                (
                    "address",
                    models.TextField(
                        blank=True,
                        help_text="Customer address",
                        null=True,
                        verbose_name="Customer address",
                    ),
                ),
                (
                    "other_data",
                    models.JSONField(
                        blank=True,
                        help_text="Other customer address data",
                        null=True,
                        verbose_name="Other data",
                    ),
                ),
                (
                    "city",
                    models.ForeignKey(
                        help_text="City of the customer.",
                        on_delete=django.db.models.deletion.CASCADE,
                        to="artd_location.city",
                        verbose_name="City",
                    ),
                ),
                (
                    "customer",
                    models.ForeignKey(
                        help_text="Customer",
                        on_delete=django.db.models.deletion.CASCADE,
                        to="artd_customer.customer",
                        verbose_name="Customer",
                    ),
                ),
            ],
            options={
                "verbose_name": "Customer Address",
                "verbose_name_plural": "Customer Addresss",
            },
        ),
        migrations.CreateModel(
            name="Tag",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "created_at",
                    models.DateTimeField(
                        auto_now_add=True,
                        help_text="Date time on which the object was created.",
                        verbose_name="Created at",
                    ),
                ),
                (
                    "updated_at",
                    models.DateTimeField(
                        auto_now=True,
                        help_text="Date time on which the object was last updated.",
                        verbose_name="Updated at",
                    ),
                ),
                (
                    "status",
                    models.BooleanField(
                        default=True,
                        help_text="Status of the object.",
                        verbose_name="Status",
                    ),
                ),
                (
                    "description",
                    models.CharField(
                        help_text="Tag description",
                        max_length=250,
                        verbose_name="Tag description",
                    ),
                ),
                (
                    "partner",
                    models.ForeignKey(
                        help_text="Partner of the tag.",
                        on_delete=django.db.models.deletion.CASCADE,
                        to="artd_partner.partner",
                        verbose_name="Partner",
                    ),
                ),
            ],
            options={
                "verbose_name": "Tag",
                "verbose_name_plural": "Tags",
            },
        ),
        migrations.CreateModel(
            name="CustomerTag",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "created_at",
                    models.DateTimeField(
                        auto_now_add=True,
                        help_text="Date time on which the object was created.",
                        verbose_name="Created at",
                    ),
                ),
                (
                    "updated_at",
                    models.DateTimeField(
                        auto_now=True,
                        help_text="Date time on which the object was last updated.",
                        verbose_name="Updated at",
                    ),
                ),
                (
                    "status",
                    models.BooleanField(
                        default=True,
                        help_text="Status of the object.",
                        verbose_name="Status",
                    ),
                ),
                (
                    "customer",
                    models.ForeignKey(
                        help_text="Customer",
                        on_delete=django.db.models.deletion.CASCADE,
                        to="artd_customer.customer",
                        verbose_name="Customer",
                    ),
                ),
                (
                    "tag",
                    models.ForeignKey(
                        help_text="Tag.",
                        on_delete=django.db.models.deletion.CASCADE,
                        to="artd_customer.tag",
                        verbose_name="Customer tag",
                    ),
                ),
            ],
            options={
                "verbose_name": "Customer Tag",
                "verbose_name_plural": "Customer Tags",
            },
        ),
    ]
