# Generated by Django - Initial migration for django_blog_plus

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='ArticleCoverStyle',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('article_id', models.IntegerField(help_text='The ID of the Lotus Article this style applies to', unique=True)),
                ('background_color', models.CharField(default='#f8f9fa', help_text='Background color for the article cover image container', max_length=7)),
                ('custom_color', models.CharField(blank=True, help_text='Custom hex color (e.g., #FF5733). Overrides background_color if set.', max_length=7, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name': 'Article Cover Style',
                'verbose_name_plural': 'Article Cover Styles',
            },
        ),
        migrations.CreateModel(
            name='ArticleViewCount',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('article_id', models.IntegerField(help_text='The ID of the Lotus Article', unique=True)),
                ('view_count', models.PositiveIntegerField(default=0, help_text='Total number of views')),
                ('last_viewed', models.DateTimeField(auto_now=True, help_text='Last time this article was viewed')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'verbose_name': 'Article View Count',
                'verbose_name_plural': 'Article View Counts',
                'ordering': ['-view_count'],
            },
        ),
        migrations.CreateModel(
            name='BlogCallToAction',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(help_text='CTA section title (e.g., "How Our Product Fits In")', max_length=200)),
                ('image', models.ImageField(blank=True, help_text='Optional image to display in the CTA', null=True, upload_to='blog/cta/')),
                ('text', models.TextField(help_text='CTA body text (HTML supported)')),
                ('button_text', models.CharField(blank=True, default='', help_text='Button label (e.g., "Get Started", "Learn More")', max_length=50)),
                ('button_url', models.URLField(blank=True, default='', help_text='Button link URL')),
                ('is_active', models.BooleanField(default=True, help_text='Inactive CTAs will not be displayed even if assigned to articles')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name': 'Blog Call to Action',
                'verbose_name_plural': 'Blog Calls to Action',
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='ArticleCallToAction',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('article_id', models.IntegerField(help_text='The ID of the Lotus Article this CTA is assigned to', unique=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('cta', models.ForeignKey(help_text='The CTA to display at the end of the article', on_delete=django.db.models.deletion.CASCADE, related_name='article_assignments', to='django_blog_plus.blogcalltoaction')),
            ],
            options={
                'verbose_name': 'Article CTA Assignment',
                'verbose_name_plural': 'Article CTA Assignments',
            },
        ),
    ]
