# Generated by Django 2.1.7 on 2019-02-12 09:19

from django.db import migrations, models
import django.db.models.deletion
import meapp.core.fields.ImageSetField
import meapp.core.model.Images


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='ImageModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('filename', models.CharField(max_length=100, verbose_name='文件名')),
                ('image', models.ImageField(storage=meapp.core.model.Images.ImageStorage(), upload_to='img/%Y/%m/%d')),
            ],
            options={
                'ordering': ['id'],
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Log',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.CharField(blank=True, max_length=255, verbose_name='日志内容')),
                ('time', models.DateTimeField(auto_now_add=True, verbose_name='时间')),
                ('mark', models.CharField(blank=True, max_length=255, verbose_name='操作者')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='OptionsModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, verbose_name='名称')),
                ('value', models.CharField(max_length=20, verbose_name='值')),
            ],
        ),
        migrations.CreateModel(
            name='TestModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('email', models.EmailField(blank=True, max_length=70, verbose_name='邮箱')),
                ('name', models.CharField(max_length=20, verbose_name='名称')),
                ('covers', meapp.core.fields.ImageSetField.ImageSetField(blank=True, verbose_name='封面')),
                ('sex', models.CharField(choices=[('boy', '男'), ('girl', '女'), ('unknown', '未知')], default='unknown', max_length=10, verbose_name='性别')),
                ('hobbies', models.CharField(blank=True, max_length=50, verbose_name='爱好')),
                ('time', models.TimeField(verbose_name='时间')),
                ('birthday', models.DateField(verbose_name='生日')),
                ('over_time', models.DateTimeField(blank=True, verbose_name='过期时间')),
            ],
        ),
        migrations.CreateModel(
            name='WXAuthLog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('openid', models.CharField(max_length=256, verbose_name='微信openid')),
                ('access_token', models.CharField(max_length=256, verbose_name='access_token')),
                ('refresh_token', models.CharField(max_length=256, verbose_name='refresh_token')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('VALID', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='WXUserAuth',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('openid', models.CharField(max_length=256, verbose_name='微信openid')),
                ('code', models.CharField(blank=True, max_length=256, verbose_name='code')),
                ('access_token', models.CharField(blank=True, max_length=256, verbose_name='access_token')),
                ('refresh_token', models.CharField(blank=True, max_length=256, verbose_name='refresh_token')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('VALID', models.BooleanField(default=True)),
            ],
        ),
        migrations.AddField(
            model_name='wxauthlog',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.WXUserAuth', verbose_name='用户'),
        ),
    ]
