# Generated by Django 2.2.4 on 2019-08-07 07:57

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('category', '0001_initial'),
        ('accounts', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Article',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('pub_date', models.DateTimeField(auto_now_add=True)),
                ('content', models.TextField()),
                ('stars', models.FloatField(default=0)),
                ('category', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='category.Category')),
            ],
            options={
                'ordering': ['-stars'],
            },
        ),
        migrations.CreateModel(
            name='Summary',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.TextField()),
                ('pub_date', models.DateTimeField(auto_now_add=True)),
                ('obj_count', models.PositiveIntegerField(default=0)),
                ('sbj_count', models.PositiveIntegerField(default=0)),
                ('belongsto_article', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='article.Article')),
                ('belongsto_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='accounts.Profile')),
            ],
            options={
                'ordering': ['-obj_count'],
            },
        ),
    ]
