# -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2017-03-25 18:38
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='AuthCode',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('kind', models.CharField(max_length=2)),
                ('code', models.CharField(max_length=256)),
                ('issued', models.BooleanField(default=False)),
                ('timestamp', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='AuthToken',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('student_id', models.CharField(max_length=10)),
                ('station_id', models.IntegerField()),
                ('kind', models.CharField(max_length=2)),
                ('code', models.CharField(max_length=256, unique=True)),
                ('confirm_code', models.CharField(max_length=256, unique=True)),
                ('issued', models.BooleanField(default=False)),
                ('timestamp', models.DateTimeField()),
            ],
        ),
        migrations.CreateModel(
            name='Entry',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('dpt_code', models.CharField(max_length=4, unique=True)),
                ('kind', models.CharField(max_length=5, null=True)),
                ('name', models.CharField(max_length=256, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='OverrideEntry',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('student_id', models.CharField(max_length=10, unique=True, validators=[django.core.validators.RegexValidator(regex='[A-Z]\\d{2}[0-9A-Z]\\d{5}')])),
                ('kind', models.CharField(max_length=2, null=True))
            ],
        ),
        migrations.CreateModel(
            name='Record',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('student_id', models.CharField(max_length=10, unique=True)),
                ('revision', models.IntegerField(default=0)),
                ('state', models.CharField(choices=[('U', 'Unavailable'), ('A', 'Available'), ('L', 'Locked'), ('V', 'Voting'), ('U', 'Used'), ('F', 'Flagged'), ('R', 'Resetting')], default='A', max_length=1)),
                ('timestamp', models.DateTimeField(auto_now=True)),
            ],
        ),
    ]
