# Generated by Django 5.1.1 on 2024-09-17 20:53

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


class Migration(migrations.Migration):
    dependencies = [
        ("bloomerp", "0014_alter_file_file"),
        ("test_app", "0007_alter_order_customer"),
    ]

    operations = [
        migrations.CreateModel(
            name="Accommodation",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                ("name", models.CharField(max_length=255)),
                ("description", models.TextField(blank=True, null=True)),
                ("price", models.DecimalField(decimal_places=2, max_digits=10)),
                (
                    "image",
                    bloomerp.models.fields.BloomerpFileField(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="bloomerp.file",
                    ),
                ),
            ],
            options={
                "permissions": (
                    (
                        "bulk_delete%(class)s",
                        "Can delete multiple objects from %(class)s at once",
                    ),
                    (
                        "bulk_change%(class)s",
                        "Can update multiple objects from %(class)s at once",
                    ),
                ),
                "abstract": False,
            },
        ),
        migrations.CreateModel(
            name="Employee",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                ("first_name", models.CharField(max_length=255)),
                ("last_name", models.CharField(max_length=255)),
                ("email", models.EmailField(max_length=254)),
                (
                    "identification_document",
                    bloomerp.models.BloomerpFileField(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="bloomerp.file",
                    ),
                ),
            ],
            options={
                "permissions": (
                    (
                        "bulk_delete%(class)s",
                        "Can delete multiple objects from %(class)s at once",
                    ),
                    (
                        "bulk_change%(class)s",
                        "Can update multiple objects from %(class)s at once",
                    ),
                ),
                "abstract": False,
            },
        ),
        migrations.CreateModel(
            name="EmployeeOnAccommodation",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                ("check_in", models.DateField()),
                ("check_out", models.DateField()),
                (
                    "accommodation",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="test_app.accommodation",
                    ),
                ),
                (
                    "employee",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="test_app.employee",
                    ),
                ),
            ],
            options={
                "permissions": (
                    (
                        "bulk_delete%(class)s",
                        "Can delete multiple objects from %(class)s at once",
                    ),
                    (
                        "bulk_change%(class)s",
                        "Can update multiple objects from %(class)s at once",
                    ),
                ),
                "abstract": False,
            },
        ),
    ]
