# Generated by Django 3.1 on 2020-08-27 11:14

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


class Migration(migrations.Migration):

    dependencies = [
        ("leaves", "0001_initial"),
    ]

    operations = [
        migrations.CreateModel(
            name="HolidayType",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "created",
                    django_extensions.db.fields.CreationDateTimeField(
                        auto_now_add=True, verbose_name="created"
                    ),
                ),
                (
                    "modified",
                    django_extensions.db.fields.ModificationDateTimeField(
                        auto_now=True, verbose_name="modified"
                    ),
                ),
                (
                    "name",
                    models.CharField(max_length=100, unique=True, verbose_name="Name"),
                ),
                (
                    "is_no_work_no_pay",
                    models.BooleanField(default=True, verbose_name="Is No Work No Pay"),
                ),
                ("pay_percentage", models.FloatField(verbose_name="Pay Percentage")),
            ],
            options={
                "verbose_name": "Holiday Type",
                "verbose_name_plural": "Holiday Types",
            },
        ),
        migrations.CreateModel(
            name="Holiday",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "created",
                    django_extensions.db.fields.CreationDateTimeField(
                        auto_now_add=True, verbose_name="created"
                    ),
                ),
                (
                    "modified",
                    django_extensions.db.fields.ModificationDateTimeField(
                        auto_now=True, verbose_name="modified"
                    ),
                ),
                ("name", models.CharField(max_length=100, verbose_name="Name")),
                ("date", models.DateField(verbose_name="Date")),
                (
                    "type",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.PROTECT,
                        related_name="holidays",
                        to="leaves.holidaytype",
                        verbose_name="Holiday Type",
                    ),
                ),
            ],
            options={"verbose_name": "Holiday", "verbose_name_plural": "Holidays",},
        ),
    ]
