# Generated by Django 5.2.7 on 2026-05-13

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


class Migration(migrations.Migration):

    dependencies = [
        ("base", "0009_newsletter_templates_bundle"),
        ("home", "0004_articlepage_not_news"),
    ]

    operations = [
        migrations.AddField(
            model_name="newslettercampaign",
            name="campaign_type",
            field=models.CharField(
                choices=[("general", "General Newsletter"), ("weekly_news", "Weekly News Newsletter")],
                default="general",
                max_length=32,
                verbose_name="Campaign Type",
            ),
        ),
        migrations.AddField(
            model_name="newslettercampaign",
            name="content_config",
            field=models.JSONField(blank=True, default=dict, verbose_name="Content Config"),
        ),
        migrations.AddField(
            model_name="newslettercampaign",
            name="item_template_html",
            field=models.TextField(
                blank=True,
                default='<table width="100%" cellpadding="0" cellspacing="0" role="presentation" style="margin:0 0 16px;"><tr><td style="padding:0;"><a href="{{article_url}}" target="_blank" style="text-decoration:none;color:inherit;"><img src="{{article_cover_url}}" alt="{{article_title}}" style="display:block;width:100%;max-width:640px;height:auto;border:0;"></a><h3 style="margin:12px 0 8px;font-size:20px;line-height:1.4;"><a href="{{article_url}}" target="_blank" style="text-decoration:none;color:#111;">{{article_title}}</a></h3><p style="margin:0 0 8px;color:#555;font-size:14px;">{{article_date}}</p><p style="margin:0;color:#222;font-size:16px;line-height:1.6;">{{article_intro}}</p></td></tr></table>',
                verbose_name="Weekly Item HTML Template",
            ),
        ),
        migrations.AddField(
            model_name="newslettercampaign",
            name="weekly_articles",
            field=models.ManyToManyField(blank=True, related_name="newsletter_campaigns", to="home.articlepage", verbose_name="Weekly Articles"),
        ),
    ]
