# Generated by Django 2.1.3 on 2019-01-25 13:54

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('school', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Posts',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('post_title', models.CharField(max_length=255, verbose_name='文章标题')),
                ('post_image', models.FileField(null=True, upload_to='media', verbose_name='文章封面图片')),
                ('source', models.CharField(default='舟炬教育', max_length=255, null=True, verbose_name='文章来源')),
                ('source_link', models.URLField(default='http://www.zhoujuedu.com', max_length=255, null=True, verbose_name='来源链接')),
                ('post_content', models.TextField(null=True, verbose_name='文章内容')),
                ('edit_time', models.DateTimeField(auto_now=True, verbose_name='编辑时间')),
                ('views', models.IntegerField(default=0, verbose_name='阅读人数')),
                ('is_status', models.BooleanField(default=True, verbose_name='状态')),
                ('school', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='school.Schools')),
            ],
            options={
                'verbose_name': '文章',
                'verbose_name_plural': '文章',
                'db_table': 'zhouju_posts',
            },
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, verbose_name='标签名')),
                ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('last_mod_time', models.DateTimeField(auto_now=True, verbose_name='修改时间')),
            ],
            options={
                'verbose_name': '标签名称',
                'verbose_name_plural': '标签列表',
                'db_table': 'zhouju_tag',
                'ordering': ['name'],
            },
        ),
        migrations.AddField(
            model_name='posts',
            name='tags',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='posts.Tag', verbose_name='标签'),
        ),
    ]
