# Generated by Django 5.0.6 on 2024-06-07 23:44

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name="Article",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("title", models.CharField(max_length=255)),
                ("slug", models.SlugField(unique=True)),
                ("content", models.TextField()),
                ("headline", models.TextField()),
                ("category", models.CharField(max_length=255)),
                ("pages", models.IntegerField()),
                ("auto_minutes_to_read", models.IntegerField()),
                (
                    "image",
                    models.ImageField(blank=True, null=True, upload_to=""),
                ),
                (
                    "pub_date",
                    models.DateField(default=django.utils.timezone.now),
                ),
                ("safe_for_work", models.BooleanField(default=False)),
                ("minutes_to_read", models.IntegerField(default=5)),
                ("tags", models.JSONField(default=list)),
                (
                    "author",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
        ),
    ]
