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

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0007_alter_validators_add_error_messages'),
    ]

    operations = [
        migrations.CreateModel(
            name='CustomUser',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('username', models.CharField(help_text='\u7eaf\u6570\u5b57\u548c\u5b57\u6bcd', max_length=30, unique=True, validators=[django.core.validators.RegexValidator(b'^[0-9a-zA-Z]*$', message=b'Only alphanumeric characters are allowed.')], verbose_name='\u7528\u6237\u540d')),
                ('surname', models.CharField(help_text='\u7528\u6237\u7684\u771f\u5b9e\u59d3\u540d', max_length=30, verbose_name='\u59d3\u540d')),
                ('identify', models.CharField(help_text='\u53a6\u5927\u5b66\u751f\u53f7\u6216\u8005\u6559\u5de5\u53f7\uff0c\u975e\u53a6\u5927\u5b66\u751f\u6216\u8005\u6559\u5e08\u4e0d\u7528\u586b', max_length=30, unique=True, verbose_name='\u5b66\u53f7/\u6559\u5de5\u53f7')),
                ('phone_number', models.CharField(help_text='\u683c\u5f0f\u4e3a05922186874\u6216\u8005\u624b\u673a\u53f7\u7801', max_length=18, verbose_name='\u7535\u8bdd\u53f7\u7801')),
                ('position', models.CharField(choices=[(b'student', '\u53a6\u5927\u5b66\u751f'), (b'staff', '\u53a6\u5927\u6559\u5e08'), (b'visit', '\u5176\u4ed6')], default=b'student', max_length=7, verbose_name='\u8eab\u4efd')),
                ('create_time', models.DateTimeField(auto_now_add=True)),
                ('expired_time', models.DateTimeField(default=datetime.datetime(2116, 1, 27, 12, 31, 23, 299724), verbose_name='\u5931\u6548\u65e5\u671f')),
                ('email', models.EmailField(help_text='\u6709\u6548\u90ae\u7bb1\uff0c\u7528\u4e8e\u8ba4\u8bc1\u901a\u77e5', max_length=255, verbose_name='\u90ae\u7bb1')),
                ('is_active', models.BooleanField(default=True, verbose_name='\u6d3b\u8dc3')),
                ('is_staff', models.BooleanField(default=False)),
                ('is_admin', models.BooleanField(default=False, verbose_name='\u7ba1\u7406\u8005')),
                ('profile_image', models.ImageField(default=b'/static/images/defaultuserimage.png', upload_to=b'uploads')),
                ('user_bio', models.CharField(blank=True, max_length=600, verbose_name='\u81ea\u6211\u4ecb\u7ecd')),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Orgnization',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250, verbose_name='\u5355\u4f4d\u540d\u79f0')),
                ('department', models.CharField(max_length=100, verbose_name='\u90e8\u95e8')),
                ('address', models.CharField(max_length=250, verbose_name='\u5730\u5740')),
            ],
        ),
        migrations.CreateModel(
            name='PersonInCharge',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('surname', models.CharField(help_text='\u7528\u6237\u7684\u771f\u5b9e\u59d3\u540d', max_length=30, verbose_name='\u59d3\u540d')),
                ('phone_number', models.CharField(help_text='\u683c\u5f0f\u4e3a05922186874\u6216\u8005\u624b\u673a\u53f7\u7801', max_length=18, verbose_name='\u7535\u8bdd\u53f7\u7801')),
                ('email', models.EmailField(help_text='\u6709\u6548\u90ae\u7bb1\uff0c\u7528\u4e8e\u8ba4\u8bc1\u901a\u77e5', max_length=255, verbose_name='\u90ae\u7bb1')),
                ('titles', models.CharField(choices=[(b'PI', '\u8bfe\u9898\u7ec4\u8d1f\u8d23\u4eba'), (b'FL', '\u7ecf\u8d39\u8d1f\u8d23\u4eba'), (b'OL', '\u516c\u53f8\u9886\u5bfc')], max_length=3, verbose_name='\u804c\u52a1')),
                ('orgnization', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='accounts.Orgnization', verbose_name='\u5355\u4f4d')),
            ],
        ),
        migrations.AddField(
            model_name='customuser',
            name='person_in_charge',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='accounts.PersonInCharge', verbose_name='\u8d1f\u8d23\u4eba'),
        ),
        migrations.AddField(
            model_name='customuser',
            name='user_permissions',
            field=models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions'),
        ),
    ]

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

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0007_alter_validators_add_error_messages'),
    ]

    operations = [
        migrations.CreateModel(
            name='CustomUser',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('username', models.CharField(help_text='\u7eaf\u6570\u5b57\u548c\u5b57\u6bcd', max_length=30, unique=True, validators=[django.core.validators.RegexValidator(b'^[0-9a-zA-Z]*$', message=b'Only alphanumeric characters are allowed.')], verbose_name='\u7528\u6237\u540d')),
                ('surname', models.CharField(help_text='\u7528\u6237\u7684\u771f\u5b9e\u59d3\u540d', max_length=30, verbose_name='\u59d3\u540d')),
                ('identify', models.CharField(help_text='\u53a6\u5927\u5b66\u751f\u53f7\u6216\u8005\u6559\u5de5\u53f7\uff0c\u975e\u53a6\u5927\u5b66\u751f\u6216\u8005\u6559\u5e08\u4e0d\u7528\u586b', max_length=30, unique=True, verbose_name='\u5b66\u53f7/\u6559\u5de5\u53f7')),
                ('phone_number', models.CharField(help_text='\u683c\u5f0f\u4e3a05922186874\u6216\u8005\u624b\u673a\u53f7\u7801', max_length=18, verbose_name='\u7535\u8bdd\u53f7\u7801')),
                ('position', models.CharField(choices=[(b'student', '\u53a6\u5927\u5b66\u751f'), (b'staff', '\u53a6\u5927\u6559\u5e08'), (b'visit', '\u5176\u4ed6')], default=b'student', max_length=7, verbose_name='\u8eab\u4efd')),
                ('create_time', models.DateTimeField(auto_now_add=True)),
                ('expired_time', models.DateTimeField(default=datetime.datetime(2116, 1, 27, 12, 31, 23, 299724), verbose_name='\u5931\u6548\u65e5\u671f')),
                ('email', models.EmailField(help_text='\u6709\u6548\u90ae\u7bb1\uff0c\u7528\u4e8e\u8ba4\u8bc1\u901a\u77e5', max_length=255, verbose_name='\u90ae\u7bb1')),
                ('is_active', models.BooleanField(default=True, verbose_name='\u6d3b\u8dc3')),
                ('is_staff', models.BooleanField(default=False)),
                ('is_admin', models.BooleanField(default=False, verbose_name='\u7ba1\u7406\u8005')),
                ('profile_image', models.ImageField(default=b'/static/images/defaultuserimage.png', upload_to=b'uploads')),
                ('user_bio', models.CharField(blank=True, max_length=600, verbose_name='\u81ea\u6211\u4ecb\u7ecd')),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Orgnization',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250, verbose_name='\u5355\u4f4d\u540d\u79f0')),
                ('department', models.CharField(max_length=100, verbose_name='\u90e8\u95e8')),
                ('address', models.CharField(max_length=250, verbose_name='\u5730\u5740')),
            ],
        ),
        migrations.CreateModel(
            name='PersonInCharge',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('surname', models.CharField(help_text='\u7528\u6237\u7684\u771f\u5b9e\u59d3\u540d', max_length=30, verbose_name='\u59d3\u540d')),
                ('phone_number', models.CharField(help_text='\u683c\u5f0f\u4e3a05922186874\u6216\u8005\u624b\u673a\u53f7\u7801', max_length=18, verbose_name='\u7535\u8bdd\u53f7\u7801')),
                ('email', models.EmailField(help_text='\u6709\u6548\u90ae\u7bb1\uff0c\u7528\u4e8e\u8ba4\u8bc1\u901a\u77e5', max_length=255, verbose_name='\u90ae\u7bb1')),
                ('titles', models.CharField(choices=[(b'PI', '\u8bfe\u9898\u7ec4\u8d1f\u8d23\u4eba'), (b'FL', '\u7ecf\u8d39\u8d1f\u8d23\u4eba'), (b'OL', '\u516c\u53f8\u9886\u5bfc')], max_length=3, verbose_name='\u804c\u52a1')),
                ('orgnization', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='accounts.Orgnization', verbose_name='\u5355\u4f4d')),
            ],
        ),
        migrations.AddField(
            model_name='customuser',
            name='person_in_charge',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='accounts.PersonInCharge', verbose_name='\u8d1f\u8d23\u4eba'),
        ),
        migrations.AddField(
            model_name='customuser',
            name='user_permissions',
            field=models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions'),
        ),
    ]

# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-02-20 04:31