# Generated by Django 3.1.3 on 2020-12-14 16:45

from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='NewsList',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, validators=[django.core.validators.MinLengthValidator(1, message='This field cannot be blank')])),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('creator', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='newslist', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='NewsArticle',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=255, validators=[django.core.validators.MinLengthValidator(1, message='This field cannot be blank')])),
                ('author', models.CharField(max_length=255, validators=[django.core.validators.MinLengthValidator(1, message='This field cannot be blank')])),
                ('description', models.CharField(max_length=255, validators=[django.core.validators.MinLengthValidator(1, message='This field cannot be blank')])),
                ('url', models.CharField(max_length=255, validators=[django.core.validators.MinLengthValidator(1, message='This field cannot be blank')])),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('newslist', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='newsarticle', to='api_app.newslist')),
            ],
        ),
    ]
