# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-02-19 21:09
from __future__ import unicode_literals

import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import re
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='RawCSVEvent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ref', models.IntegerField(null=True)),
                ('title', models.TextField(blank=True)),
                ('weekday', models.CharField(max_length=20)),
                ('time_start', models.TimeField()),
                ('time_end', models.TimeField()),
                ('semester_weeks', models.CharField(max_length=100, validators=[django.core.validators.RegexValidator(re.compile('^\\d+(?:\\,\\d+)*\\Z', 32), code='invalid', message='Enter only digits separated by commas.')])),
                ('category', models.TextField(blank=True)),
                ('module_code', models.CharField(blank=True, max_length=10)),
                ('room', models.TextField(blank=True)),
                ('teacher', models.CharField(blank=True, max_length=40)),
                ('group', models.TextField(blank=True, max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name='ScheduleFile',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)),
                ('file', models.FileField(upload_to='uploads/')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('title', models.CharField(blank=True, max_length=50)),
            ],
            options={
                'ordering': ['created'],
            },
        ),
        migrations.CreateModel(
            name='SwitchedDay',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('replaces', models.DateField()),
                ('replaced_with', models.DateField()),
            ],
        ),
        migrations.CreateModel(
            name='Term',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.TextField()),
                ('term_begins', models.DateField()),
                ('term_ends', models.DateField()),
                ('holidays_begin', models.DateField()),
                ('holidays_end', models.DateField()),
            ],
        ),
        migrations.AddField(
            model_name='switchedday',
            name='term',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='switched_days', to='web_client.Term'),
        ),
    ]
