# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-02-20 10:53
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('eguard', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('datetime', models.DateTimeField(verbose_name='\u65f6\u95f4')),
            ],
        ),
        migrations.RemoveField(
            model_name='user',
            name='entrance',
        ),
        migrations.RemoveField(
            model_name='user',
            name='group',
        ),
        migrations.RemoveField(
            model_name='entrance',
            name='name',
        ),
        migrations.RemoveField(
            model_name='entrance',
            name='position',
        ),
        migrations.RemoveField(
            model_name='entrance',
            name='webId',
        ),
        migrations.AddField(
            model_name='entrance',
            name='code',
            field=models.CharField(choices=[(b'D500', '\u9760500M\u6838\u78c1\u5ba4\u95e8'), (b'D102', '\u503c\u73ed\u5ba4\u5927\u95e8'), (b'D103', '\u503c\u73ed\u5ba4\u91cc\u95e8'), (b'D600', '\u9760600M\u6838\u78c1\u5ba4\u95e8')], default=b'D102', max_length=4, verbose_name='\u95e8\u7981'),
        ),
        migrations.AddField(
            model_name='entrance',
            name='users',
            field=models.ManyToManyField(to=settings.AUTH_USER_MODEL, verbose_name='\u51fa\u5165\u8005'),
        ),
        migrations.DeleteModel(
            name='Team',
        ),
        migrations.DeleteModel(
            name='User',
        ),
        migrations.AddField(
            model_name='event',
            name='entrace',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='eguard.Entrance', verbose_name='\u95e8'),
        ),
        migrations.AddField(
            model_name='event',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='\u4eba'),
        ),
    ]
