# -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-09-25 05:30
from __future__ import unicode_literals

import account.models
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import jsonfield.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            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')),
                ('username', models.CharField(max_length=30, unique=True)),
                ('real_name', models.CharField(blank=True, max_length=30, null=True)),
                ('email', models.EmailField(blank=True, max_length=254, null=True)),
                ('create_time', models.DateTimeField(auto_now_add=True, null=True)),
                ('admin_type', models.IntegerField(default=0)),
                ('admin_extra_permission', jsonfield.fields.JSONField(default=[])),
                ('problems_status', jsonfield.fields.JSONField(default={})),
                ('reset_password_token', models.CharField(blank=True, max_length=40, null=True)),
                ('reset_password_token_create_time', models.DateTimeField(blank=True, null=True)),
                ('auth_token', models.CharField(blank=True, max_length=40, null=True)),
                ('two_factor_auth', models.BooleanField(default=False)),
                ('tfa_token', models.CharField(blank=True, max_length=40, null=True)),
                ('open_api', models.BooleanField(default=False)),
                ('open_api_appkey', models.CharField(blank=True, max_length=35, null=True)),
                ('is_disabled', models.BooleanField(default=False)),
            ],
            options={
                'db_table': 'user',
            },
            managers=[
                ('objects', account.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('avatar', models.CharField(default=account.models._random_avatar, max_length=50)),
                ('blog', models.URLField(blank=True, null=True)),
                ('mood', models.CharField(blank=True, max_length=200, null=True)),
                ('hduoj_username', models.CharField(blank=True, max_length=30, null=True)),
                ('bestcoder_username', models.CharField(blank=True, max_length=30, null=True)),
                ('codeforces_username', models.CharField(blank=True, max_length=30, null=True)),
                ('accepted_problem_number', models.IntegerField(default=0)),
                ('submission_number', models.IntegerField(default=0)),
                ('phone_number', models.CharField(blank=True, max_length=15, null=True)),
                ('school', models.CharField(blank=True, max_length=200, null=True)),
                ('student_id', models.CharField(blank=True, max_length=15, null=True)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'user_profile',
            },
        ),
    ]
