# Generated by Django 3.0.4 on 2020-03-28 16:51

import datetime

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ("logbook", "0016_auto_20191210_1537"),
    ]

    operations = [
        migrations.CreateModel(
            name="Break",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "day",
                    models.DateField(default=datetime.date.today, verbose_name="day"),
                ),
                ("starts_at", models.TimeField(verbose_name="starts at")),
                ("ends_at", models.TimeField(verbose_name="ends at")),
                (
                    "description",
                    models.TextField(blank=True, verbose_name="description"),
                ),
                (
                    "user",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="breaks",
                        to=settings.AUTH_USER_MODEL,
                        verbose_name="user",
                    ),
                ),
            ],
            options={
                "verbose_name": "break",
                "verbose_name_plural": "breaks",
                "ordering": ["-day", "-starts_at"],
            },
        ),
        migrations.RunSQL("SELECT audit_audit_table('logbook_break')"),
    ]
