# Generated by Django 3.1.5 on 2021-02-04 16:54

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


class Migration(migrations.Migration):

    dependencies = [
        ('news', '0002_auto_20210130_0515'),
    ]

    operations = [
        migrations.CreateModel(
            name='Articles',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField()),
                ('time', models.TimeField()),
                ('name', models.TextField()),
                ('image', models.ImageField(upload_to='images/')),
                ('story', models.TextField()),
                ('summary', models.CharField(blank=True, max_length=100, null=True)),
                ('rating', models.DecimalField(decimal_places=2, max_digits=3)),
                ('num_ratings', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=60)),
                ('num_articles', models.IntegerField(blank=True)),
                ('rating', models.DecimalField(blank=True, decimal_places=2, max_digits=3)),
                ('num_ratings', models.IntegerField()),
                ('about', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='Editor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=60)),
                ('about', models.TextField()),
                ('picture', models.ImageField(upload_to='images/')),
            ],
        ),
        migrations.CreateModel(
            name='Writer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=60)),
                ('about', models.TextField()),
                ('picture', models.ImageField(upload_to='images/')),
                ('rating', models.DecimalField(decimal_places=2, max_digits=3)),
                ('num_articles', models.IntegerField()),
            ],
        ),
        migrations.DeleteModel(
            name='Article',
        ),
        migrations.AddField(
            model_name='articles',
            name='category',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='news.category'),
        ),
        migrations.AddField(
            model_name='articles',
            name='editor',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='news.editor'),
        ),
        migrations.AddField(
            model_name='articles',
            name='writer',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='news.writer'),
        ),
    ]
