# Generated by Django 2.2 on 2019-04-23 06:45

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 = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='WechatUser',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('unionid', models.CharField(blank=True, max_length=64, null=True, verbose_name='微信开放id')),
                ('openid', models.CharField(blank=True, max_length=64, null=True, verbose_name='微信开放id')),
                ('data', jsonfield.fields.JSONField(blank=True, null=True, verbose_name='用户数据')),
                ('created_time', models.DateTimeField(auto_now_add=True)),
                ('user', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': '微信用户',
                'verbose_name_plural': '微信用户',
            },
        ),
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('avatar', models.ImageField(blank=True, null=True, upload_to='users/avatar/%Y/', verbose_name='头像')),
                ('nickname', models.CharField(blank=True, max_length=32, null=True, verbose_name='昵称')),
                ('gender', models.CharField(choices=[('male', '男'), ('female', '女')], default='male', max_length=16, verbose_name='性别')),
                ('phone', models.CharField(blank=True, db_index=True, max_length=32, null=True, unique=True, verbose_name='手机')),
                ('intro', models.TextField(blank=True, null=True, verbose_name='简介')),
                ('settings', jsonfield.fields.JSONField(blank=True, null=True, verbose_name='配置信息')),
                ('created_time', models.DateTimeField(auto_now_add=True)),
                ('user', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': '用户',
                'verbose_name_plural': '用户',
            },
        ),
    ]
