# Generated by Django 4.1.8 on 2023-04-12 12:56

import django.contrib.postgres.fields.ranges
import wbcore.models.fields
from django.db import migrations, models


class Migration(migrations.Migration):
    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="CalendarItem",
            fields=[
                (
                    "id",
                    models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID"),
                ),
                ("is_active", models.BooleanField(default=True)),
                ("deletion_datetime", models.DateTimeField(blank=True, null=True)),
                ("color", wbcore.contrib.color.fields.ColorField(blank=True, null=True)),
                ("entity_list", models.JSONField(blank=True, null=True)),
                ("icon", models.CharField(blank=True, max_length=64, null=True)),
                (
                    "visibility",
                    models.CharField(
                        choices=[
                            ("PUBLIC", "Public"),
                            ("PRIVATE", "Private"),
                            ("CONFIDENTIAL", "Confidential"),
                        ],
                        default="PUBLIC",
                        max_length=255,
                        verbose_name="Visibility",
                    ),
                ),
                (
                    "item_type",
                    models.CharField(
                        choices=[
                            ("ABSENCE_REQUEST", "Absence Request"),
                            ("HOLIDAY", "Holiday"),
                            ("ACTIVITY", "Activity"),
                            ("TASK", "Task"),
                        ],
                        default="ACTIVITY",
                        max_length=255,
                        verbose_name="Type",
                    ),
                ),
                (
                    "period",
                    django.contrib.postgres.fields.ranges.DateTimeRangeField(
                        blank=True, null=True, verbose_name="Period"
                    ),
                ),
                ("title", models.CharField(max_length=255, verbose_name="Title")),
                (
                    "conference_room",
                    models.BooleanField(
                        default=False,
                        help_text="Check this if it takes place in the conference room",
                        verbose_name="Conference Room",
                    ),
                ),
                (
                    "all_day",
                    models.BooleanField(
                        default=False,
                        help_text="Check this if the activity spans throughout the day",
                        verbose_name="All Day",
                    ),
                ),
                ("is_cancelled", models.BooleanField(default=False, verbose_name="Is Cancelled")),
            ],
            options={
                "verbose_name": "Calendar Item",
                "verbose_name_plural": "Calendar Items",
                "permissions": [("administrate_confidential_items", "Can see confidential calendar items")],
            },
        )
    ]
