# Generated by Django 4.0.3 on 2022-03-29 20:26

import datetime

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("django_comments_ink", "0001_initial"),
    ]

    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=200, verbose_name="title"),
                ),
                (
                    "slug",
                    models.SlugField(
                        unique_for_date="publish", verbose_name="slug"
                    ),
                ),
                ("body", models.TextField(verbose_name="body")),
                (
                    "allow_comments",
                    models.BooleanField(
                        default=True, verbose_name="allow comments"
                    ),
                ),
                (
                    "publish",
                    models.DateTimeField(
                        default=datetime.datetime.now, verbose_name="publish"
                    ),
                ),
            ],
            options={
                "db_table": "demo_articles",
                "ordering": ("-publish",),
            },
        ),
        migrations.CreateModel(
            name="Diary",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("body", models.TextField(verbose_name="body")),
                (
                    "allow_comments",
                    models.BooleanField(
                        default=True, verbose_name="allow comments"
                    ),
                ),
                (
                    "publish",
                    models.DateTimeField(
                        default=datetime.datetime.now, verbose_name="publish"
                    ),
                ),
            ],
            options={
                "db_table": "demo_diary",
                "ordering": ("-publish",),
            },
        ),
        migrations.CreateModel(
            name="MyComment",
            fields=[
                (
                    "inkcomment_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="django_comments_ink.inkcomment",
                    ),
                ),
                ("title", models.CharField(max_length=256)),
            ],
            options={
                "verbose_name": "comment",
                "verbose_name_plural": "comments",
                "ordering": ("submit_date",),
                "permissions": [("can_moderate", "Can moderate comments")],
                "abstract": False,
            },
            bases=("django_comments_ink.inkcomment",),
        ),
    ]
