# Generated by Django 2.1.1 on 2018-09-12 22:38

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Availability',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('start_hour', models.TimeField()),
                ('end_hour', models.TimeField()),
            ],
        ),
        migrations.CreateModel(
            name='CalendarDay',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('date', models.DateField()),
                ('is_active', models.BooleanField(default=True)),
                ('is_holiday', models.BooleanField(default=False)),
                ('is_weekend', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='Day',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=15)),
                ('abbreviation_name', models.CharField(max_length=1)),
            ],
        ),
        migrations.CreateModel(
            name='Employee',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('telephone', models.CharField(max_length=14)),
            ],
        ),
        migrations.CreateModel(
            name='Employer',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=200)),
                ('telephone', models.CharField(max_length=14)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='HourOfOperation',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('start_hour', models.TimeField()),
                ('end_hour', models.TimeField()),
            ],
        ),
        migrations.CreateModel(
            name='RequestedTimeOff',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('date', models.DateField()),
                ('reason', models.CharField(max_length=200)),
                ('is_approved', models.BooleanField(default=False)),
                ('employee', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shiftapp.Employee')),
            ],
        ),
        migrations.CreateModel(
            name='Shift',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('start_hour', models.TimeField()),
                ('end_hour', models.TimeField()),
                ('status', models.BooleanField(default=True)),
                ('calendarday', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shiftapp.CalendarDay')),
                ('employee', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shiftapp.Employee')),
            ],
        ),
        migrations.AddField(
            model_name='employee',
            name='employer',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shiftapp.Employer'),
        ),
        migrations.AddField(
            model_name='employee',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='calendarday',
            name='employer',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shiftapp.Employer'),
        ),
        migrations.AddField(
            model_name='calendarday',
            name='hour_of_operation',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shiftapp.HourOfOperation'),
        ),
        migrations.AddField(
            model_name='availability',
            name='day',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shiftapp.Day'),
        ),
        migrations.AddField(
            model_name='availability',
            name='employee',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shiftapp.Employee'),
        ),
    ]
