# Generated by Django 2.0.13 on 2019-10-29 05:28

from django.db import migrations, models
import django.db.models.deletion
from ...oneid_meta.models import config
import uuid


class Migration(migrations.Migration):

    dependencies = [
        ('sites', '0002_alter_domain_unique'),
        ('oneid_meta', '0060_auto_20191025_1458'),
    ]

    operations = [
        migrations.CreateModel(
            name='WechatConfig',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('uuid', models.UUIDField(default=uuid.uuid4, unique=True)),
                ('is_del', models.BooleanField(default=False, verbose_name='是否删除')),
                ('is_active', models.BooleanField(default=True, verbose_name='是否可用')),
                ('updated', models.DateTimeField(auto_now=True, null=True, verbose_name='更新时间')),
                ('created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='创建时间')),
                ('appid', models.CharField(blank=True, default='', max_length=255, verbose_name='APP ID')),
                ('secret', models.CharField(blank=True, default='', max_length=255, verbose_name='APP SECRET')),
                ('qr_app_valid', models.BooleanField(default=False, verbose_name='扫码登录APP配置是否正确')),
                ('site', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='wechat_config', to='sites.Site')),
            ],
            options={
                'abstract': False,
            },
            bases=(models.Model, config.SingletonConfigMixin),
        ),
        migrations.CreateModel(
            name='WechatUser',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('uuid', models.UUIDField(default=uuid.uuid4, unique=True)),
                ('is_del', models.BooleanField(default=False, verbose_name='是否删除')),
                ('is_active', models.BooleanField(default=True, verbose_name='是否可用')),
                ('updated', models.DateTimeField(auto_now=True, null=True, verbose_name='更新时间')),
                ('created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='创建时间')),
                ('unionid', models.TextField(blank=True, max_length=255, verbose_name='用户OPENID')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, related_name='wechat_user', to='oneid_meta.User', verbose_name='用户')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='accountconfig',
            name='allow_wechat_qr',
            field=models.BooleanField(default=False, verbose_name='是否开放微信扫码登录'),
        ),
    ]
