# Generated by Django 2.1.4 on 2019-03-05 07:01

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


class Migration(migrations.Migration):

    dependencies = [
        ('repository', '0003_troubletemplates'),
    ]

    operations = [
        migrations.CreateModel(
            name='Blog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100, verbose_name='标题')),
                ('summary', models.CharField(max_length=256, verbose_name='简介')),
                ('suffix', models.CharField(max_length=32, verbose_name='个人博客后缀')),
                ('theme', models.CharField(max_length=32, verbose_name='博客主题')),
            ],
            options={
                'verbose_name_plural': '个人博客信息',
            },
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.CharField(max_length=128, verbose_name='评论内容')),
            ],
            options={
                'verbose_name_plural': '文章评论表',
            },
        ),
        migrations.AddField(
            model_name='userinfo',
            name='fans',
            field=models.ManyToManyField(related_name='star', to='repository.UserInfo', verbose_name='粉丝'),
        ),
        migrations.AlterField(
            model_name='article',
            name='classification',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='repository.Classification', verbose_name='文章分类'),
        ),
        migrations.AddField(
            model_name='comment',
            name='article',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='repository.Article', verbose_name='文章'),
        ),
        migrations.AddField(
            model_name='comment',
            name='parent_comment',
            field=models.ManyToManyField(related_name='last', to='repository.Comment', verbose_name='上一级评论'),
        ),
        migrations.AddField(
            model_name='comment',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='repository.UserInfo', verbose_name='评论者'),
        ),
        migrations.AddField(
            model_name='blog',
            name='user',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='repository.UserInfo', verbose_name='用户'),
        ),
    ]
