# Generated by Django 3.0.4 on 2020-03-07 16:30

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


# 参考链接 https://www.django.cn/course/show-32.html

class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Banner',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_date', models.DateField(auto_now_add=True, verbose_name='创建日期')),
                ('update_date', models.DateField(auto_now=True, verbose_name='更新日期')),
                ('text_info', models.CharField(default='', max_length=128, verbose_name='标题')),
                ('img', models.ImageField(upload_to='banner/', verbose_name='轮播图')),
                ('link_url', models.URLField(max_length=128, verbose_name='图片链接')),
                ('is_active', models.BooleanField(default=False, verbose_name='是否是Article')),
            ],
            options={
                'verbose_name': '轮播图',
                'verbose_name_plural': '轮播图',
                'db_table': 'tbl_banner',
            },
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_date', models.DateField(auto_now_add=True, verbose_name='创建日期')),
                ('update_date', models.DateField(auto_now=True, verbose_name='更新日期')),
                ('name', models.CharField(max_length=128, verbose_name='博客文章分类')),
                ('index', models.IntegerField(default=0, verbose_name='分类排序')),
            ],
            options={
                'verbose_name': '博客分类',
                'verbose_name_plural': '博客分类',
                'db_table': 'tbl_category',
            },
        ),
        migrations.CreateModel(
            name='Link',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_date', models.DateField(auto_now_add=True, verbose_name='创建日期')),
                ('update_date', models.DateField(auto_now=True, verbose_name='更新日期')),
                ('name', models.CharField(max_length=20, verbose_name='链接名称')),
                ('linkurl', models.URLField(max_length=128, verbose_name='网址')),
            ],
            options={
                'verbose_name': '友情链接',
                'verbose_name_plural': '友情链接',
                'db_table': 'tbl_link',
            },
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_date', models.DateField(auto_now_add=True, verbose_name='创建日期')),
                ('update_date', models.DateField(auto_now=True, verbose_name='更新日期')),
                ('name', models.CharField(max_length=128, verbose_name='文章标签')),
            ],
            options={
                'verbose_name': '文章标签',
                'verbose_name_plural': '文章标签',
                'db_table': 'tbl_tag',
            },
        ),
        migrations.CreateModel(
            name='Tui',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_date', models.DateField(auto_now_add=True, verbose_name='创建日期')),
                ('update_date', models.DateField(auto_now=True, verbose_name='更新日期')),
                ('name', models.CharField(max_length=128, verbose_name='推荐位')),
            ],
            options={
                'verbose_name': '推荐位',
                'verbose_name_plural': '推荐位',
                'db_table': 'tbl_tui',
            },
        ),
        migrations.CreateModel(
            name='Article',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_date', models.DateField(auto_now_add=True, verbose_name='创建日期')),
                ('update_date', models.DateField(auto_now=True, verbose_name='更新日期')),
                ('title', models.CharField(max_length=128, verbose_name='文章标题')),
                ('excerpt', models.TextField(blank=True, max_length=200, verbose_name='摘要')),
                ('img', models.ImageField(blank=True, null=True, upload_to='%Y/%m/%d/', verbose_name='图片')),
                ('body', models.TextField(verbose_name='文章主体')),
                ('views', models.PositiveIntegerField(default=0, verbose_name='阅读量')),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='blog.Category', verbose_name='博客分类')),
                ('tags', models.ManyToManyField(blank=True, to='blog.Tag', verbose_name='标签')),
                ('tui', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='blog.Tui', verbose_name='推荐位')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL, verbose_name='作者')),
            ],
            options={
                'verbose_name': '文章',
                'verbose_name_plural': '文章',
                'db_table': 'tbl_article',
            },
        ),
    ]

# Generated by Django 3.0.4 on 2020-03-07 16:30

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


# 参考链接 https://www.django.cn/course/show-32.html

class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Banner',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_date', models.DateField(auto_now_add=True, verbose_name='创建日期')),
                ('update_date', models.DateField(auto_now=True, verbose_name='更新日期')),
                ('text_info', models.CharField(default='', max_length=128, verbose_name='标题')),
                ('img', models.ImageField(upload_to='banner/', verbose_name='轮播图')),
                ('link_url', models.URLField(max_length=128, verbose_name='图片链接')),
                ('is_active', models.BooleanField(default=False, verbose_name='是否是Article')),
            ],
            options={
                'verbose_name': '轮播图',
                'verbose_name_plural': '轮播图',
                'db_table': 'tbl_banner',
            },
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_date', models.DateField(auto_now_add=True, verbose_name='创建日期')),
                ('update_date', models.DateField(auto_now=True, verbose_name='更新日期')),
                ('name', models.CharField(max_length=128, verbose_name='博客文章分类')),
                ('index', models.IntegerField(default=0, verbose_name='分类排序')),
            ],
            options={
                'verbose_name': '博客分类',
                'verbose_name_plural': '博客分类',
                'db_table': 'tbl_category',
            },
        ),
        migrations.CreateModel(
            name='Link',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_date', models.DateField(auto_now_add=True, verbose_name='创建日期')),
                ('update_date', models.DateField(auto_now=True, verbose_name='更新日期')),
                ('name', models.CharField(max_length=20, verbose_name='链接名称')),
                ('linkurl', models.URLField(max_length=128, verbose_name='网址')),
            ],
            options={
                'verbose_name': '友情链接',
                'verbose_name_plural': '友情链接',
                'db_table': 'tbl_link',
            },
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_date', models.DateField(auto_now_add=True, verbose_name='创建日期')),
                ('update_date', models.DateField(auto_now=True, verbose_name='更新日期')),
                ('name', models.CharField(max_length=128, verbose_name='文章标签')),
            ],
            options={
                'verbose_name': '文章标签',
                'verbose_name_plural': '文章标签',
                'db_table': 'tbl_tag',
            },
        ),
        migrations.CreateModel(
            name='Tui',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_date', models.DateField(auto_now_add=True, verbose_name='创建日期')),
                ('update_date', models.DateField(auto_now=True, verbose_name='更新日期')),
                ('name', models.CharField(max_length=128, verbose_name='推荐位')),
            ],
            options={
                'verbose_name': '推荐位',
                'verbose_name_plural': '推荐位',
                'db_table': 'tbl_tui',
            },
        ),
        migrations.CreateModel(
            name='Article',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_date', models.DateField(auto_now_add=True, verbose_name='创建日期')),
                ('update_date', models.DateField(auto_now=True, verbose_name='更新日期')),
                ('title', models.CharField(max_length=128, verbose_name='文章标题')),
                ('excerpt', models.TextField(blank=True, max_length=200, verbose_name='摘要')),
                ('img', models.ImageField(blank=True, null=True, upload_to='%Y/%m/%d/', verbose_name='图片')),
                ('body', models.TextField(verbose_name='文章主体')),
                ('views', models.PositiveIntegerField(default=0, verbose_name='阅读量')),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='blog.Category', verbose_name='博客分类')),
                ('tags', models.ManyToManyField(blank=True, to='blog.Tag', verbose_name='标签')),
                ('tui', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='blog.Tui', verbose_name='推荐位')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL, verbose_name='作者')),
            ],
            options={
                'verbose_name': '文章',
                'verbose_name_plural': '文章',
                'db_table': 'tbl_article',
            },
        ),
    ]

# Generated by Django 3.0.4 on 2020-03-07 16:30 # 参考链接 https://www.django.cn/course/show-32.html