# Generated by Django 2.0.4 on 2018-04-22 01:32

import ckeditor.fields
import django.core.validators
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Blog',
            fields=[
                ('blog_number', models.AutoField(primary_key=True, serialize=False, verbose_name='博文编号')),
                ('title', models.CharField(max_length=100, verbose_name='标题')),
                ('blog_content', ckeditor.fields.RichTextField(verbose_name='博客内容')),
                ('create_data', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('blog_excerpt', models.CharField(blank=True, max_length=200)),
                ('views', models.PositiveIntegerField(default=0)),
            ],
            options={
                'verbose_name': '博文',
                'verbose_name_plural': '博文',
            },
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tag_name', models.CharField(max_length=50, verbose_name='标签')),
            ],
            options={
                'verbose_name': '标签',
                'verbose_name_plural': '标签',
            },
        ),
        migrations.CreateModel(
            name='User_info',
            fields=[
                ('user_number', models.AutoField(primary_key=True, serialize=False, verbose_name='用户编号')),
                ('name', models.CharField(max_length=10, verbose_name='用户')),
                ('pwd', models.CharField(max_length=20, verbose_name='密码')),
                ('headImg', models.ImageField(default='headImg/uiface2.png', null=True, upload_to='headImg/')),
                ('email', models.EmailField(max_length=254, verbose_name='邮箱')),
                ('phone', models.CharField(error_messages={'one': '不能为空', 'two': '格式错误'}, max_length=11, validators=[django.core.validators.RegexValidator(code='one', message='不能为空', regex=''), django.core.validators.RegexValidator(code='two', message='格式错误', regex='^((1[3,5,8][0-9])|(14[5,7])|(17[0,6,7,8])|(19[7]))\\d{8}$')], verbose_name='手机号')),
                ('common', models.CharField(blank=True, max_length=100, null=True, verbose_name='个人说明')),
            ],
            options={
                'verbose_name': '用户',
                'verbose_name_plural': '用户',
            },
        ),
        migrations.AddField(
            model_name='blog',
            name='author',
            field=models.ManyToManyField(to='blog.User_info', verbose_name='作者'),
        ),
        migrations.AddField(
            model_name='blog',
            name='blog_tag',
            field=models.ForeignKey(on_delete=None, to='blog.Tag', verbose_name='标签'),
        ),
    ]
