# Generated by Django 5.2.2 on 2025-06-07 15:13

import django.utils.timezone
from django.db import migrations, models


class Migration(migrations.Migration):
    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="Article",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "total_views",
                    models.PositiveIntegerField(
                        default=0,
                        help_text="Total number of page views",
                        verbose_name="Total Views",
                    ),
                ),
                (
                    "unique_views",
                    models.PositiveIntegerField(
                        default=0,
                        help_text="Number of unique visitors",
                        verbose_name="Unique Views",
                    ),
                ),
                (
                    "last_viewed_at",
                    models.DateTimeField(
                        blank=True,
                        help_text="When the page was last viewed",
                        null=True,
                        verbose_name="Last Viewed At",
                    ),
                ),
                (
                    "first_viewed_at",
                    models.DateTimeField(
                        blank=True,
                        help_text="When the page was first viewed",
                        null=True,
                        verbose_name="First Viewed At",
                    ),
                ),
                ("title", models.CharField(max_length=200)),
                ("slug", models.SlugField(unique=True)),
                ("content", models.TextField()),
                ("author", models.CharField(default="Admin", max_length=100)),
                (
                    "published_at",
                    models.DateTimeField(default=django.utils.timezone.now),
                ),
                ("updated_at", models.DateTimeField(auto_now=True)),
            ],
            options={
                "ordering": ["-published_at"],
            },
        ),
        migrations.CreateModel(
            name="Course",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "total_views",
                    models.PositiveIntegerField(
                        default=0,
                        help_text="Total number of page views",
                        verbose_name="Total Views",
                    ),
                ),
                (
                    "unique_views",
                    models.PositiveIntegerField(
                        default=0,
                        help_text="Number of unique visitors",
                        verbose_name="Unique Views",
                    ),
                ),
                (
                    "last_viewed_at",
                    models.DateTimeField(
                        blank=True,
                        help_text="When the page was last viewed",
                        null=True,
                        verbose_name="Last Viewed At",
                    ),
                ),
                (
                    "first_viewed_at",
                    models.DateTimeField(
                        blank=True,
                        help_text="When the page was first viewed",
                        null=True,
                        verbose_name="First Viewed At",
                    ),
                ),
                ("title", models.CharField(max_length=200)),
                ("slug", models.SlugField(unique=True)),
                ("description", models.TextField()),
                ("instructor", models.CharField(max_length=100)),
                (
                    "difficulty",
                    models.CharField(
                        choices=[
                            ("beginner", "Beginner"),
                            ("intermediate", "Intermediate"),
                            ("advanced", "Advanced"),
                        ],
                        default="beginner",
                        max_length=20,
                    ),
                ),
                ("created_at", models.DateTimeField(default=django.utils.timezone.now)),
            ],
            options={
                "ordering": ["-created_at"],
            },
        ),
        migrations.CreateModel(
            name="Product",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "total_views",
                    models.PositiveIntegerField(
                        default=0,
                        help_text="Total number of page views",
                        verbose_name="Total Views",
                    ),
                ),
                (
                    "unique_views",
                    models.PositiveIntegerField(
                        default=0,
                        help_text="Number of unique visitors",
                        verbose_name="Unique Views",
                    ),
                ),
                (
                    "last_viewed_at",
                    models.DateTimeField(
                        blank=True,
                        help_text="When the page was last viewed",
                        null=True,
                        verbose_name="Last Viewed At",
                    ),
                ),
                (
                    "first_viewed_at",
                    models.DateTimeField(
                        blank=True,
                        help_text="When the page was first viewed",
                        null=True,
                        verbose_name="First Viewed At",
                    ),
                ),
                ("name", models.CharField(max_length=100)),
                ("slug", models.SlugField(unique=True)),
                ("price", models.DecimalField(decimal_places=2, max_digits=10)),
                ("description", models.TextField()),
                ("category", models.CharField(default="General", max_length=50)),
                ("created_at", models.DateTimeField(default=django.utils.timezone.now)),
            ],
            options={
                "ordering": ["-created_at"],
            },
        ),
    ]
