# Generated by Django 2.2.26 on 2022-02-04 22:52

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


class Migration(migrations.Migration):

    dependencies = [
        ("rates", "0002_version_1_15_0"),
    ]

    operations = [
        migrations.CreateModel(
            name="RateTime",
            fields=[
                ("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("name", models.CharField(max_length=255, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name="DailySchedule",
            fields=[
                ("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                (
                    "weekday",
                    models.IntegerField(
                        verbose_name="start day",
                        choices=[
                            (0, "Monday"),
                            (1, "Tuesday"),
                            (2, "Wednesday"),
                            (3, "Thursday"),
                            (4, "Friday"),
                            (5, "Saturday"),
                            (6, "Sunday"),
                        ],
                    ),
                ),
                ("start_time", models.TimeField(blank=True, null=True, help_text="The start time")),
                ("end_time", models.TimeField(blank=True, null=True, help_text="The end time")),
                ("rate_time", models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="rates.RateTime")),
            ],
            options={"ordering": ("weekday", "start_time")},
        ),
        migrations.AddField(
            model_name="rate",
            name="time",
            field=models.ForeignKey(
                blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to="rates.RateTime"
            ),
        ),
        migrations.AddField(
            model_name="rate",
            name="deleted",
            field=models.BooleanField(default=False, help_text="Indicates that this rate was deleted"),
        ),
        migrations.AlterField(
            model_name="ratecategory",
            name="name",
            field=models.CharField(help_text="The name of this rate category", max_length=200, unique=True),
        ),
    ]
