# Generated by Django 5.2.7 on 2026-02-12 07:23

import wagtail.fields
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('base', '0004_remove_headersettings_logo_headersettings_logo_dark_and_more'),
    ]

    operations = [
        migrations.CreateModel(
            name='NewsletterSystemSettings',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('member_center_base_url', models.URLField(blank=True)),
                ('member_center_subscribe_path', models.CharField(blank=True, default='/newsletter/subscribe', max_length=255)),
                ('member_center_confirm_path', models.CharField(blank=True, default='/newsletter/confirm', max_length=255)),
                ('member_center_unsubscribe_token_path', models.CharField(blank=True, default='/newsletter/unsubscribe-token', max_length=255)),
                ('member_center_unsubscribe_path', models.CharField(blank=True, default='/newsletter/unsubscribe', max_length=255)),
                ('member_center_tenant_id', models.CharField(blank=True, max_length=128)),
                ('member_center_list_id', models.CharField(blank=True, max_length=128)),
                ('member_center_timeout_seconds', models.PositiveIntegerField(default=10)),
                ('send_engine_base_url', models.URLField(blank=True)),
                ('send_engine_oauth_scope', models.CharField(blank=True, max_length=255)),
                ('send_engine_timeout_seconds', models.PositiveIntegerField(default=10)),
                ('smtp_relay_host', models.CharField(blank=True, max_length=255)),
                ('smtp_relay_port', models.PositiveIntegerField(default=587)),
                ('smtp_use_tls', models.BooleanField(default=True)),
                ('smtp_use_ssl', models.BooleanField(default=False, help_text='465 常用 SSL（Implicit TLS）；587 常用 STARTTLS（TLS）。')),
                ('smtp_timeout_seconds', models.PositiveIntegerField(default=15)),
                ('smtp_username', models.CharField(blank=True, max_length=255)),
                ('smtp_password', models.TextField(blank=True)),
                ('sender_name', models.CharField(blank=True, max_length=255)),
                ('sender_email', models.EmailField(blank=True, max_length=254)),
                ('reply_to_email', models.EmailField(blank=True, max_length=254)),
                ('default_charset', models.CharField(default='utf-8', max_length=50)),
            ],
            options={
                'verbose_name': 'Newsletter System Settings',
            },
        ),
        migrations.CreateModel(
            name='NewsletterTemplateSettings',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('subscribe_subject_template', models.CharField(default='請確認您的電子報訂閱', max_length=255)),
                ('subscribe_html_template', models.TextField(default="<p>您好，請點擊以下連結完成訂閱：</p><p><a href='{{confirm_url}}'>{{confirm_url}}</a></p>")),
                ('subscribe_text_template', models.TextField(default='您好，請點擊以下連結完成訂閱：{{confirm_url}}')),
                ('confirm_success_template', wagtail.fields.RichTextField(blank=True, default='<p>歡迎加入debute AI 新聞</p><p>與我們一起探索發掘未來科技更多可能性</p>')),
                ('confirm_failure_template', wagtail.fields.RichTextField(blank=True, default='<p>訂閱確認失敗，請稍後再試。</p>')),
                ('unsubscribe_intro_template', wagtail.fields.RichTextField(blank=True, default='<p>感謝您這陣子與我們並肩同行，</p><p>請在下方輸入您的電子郵件，即可完成退訂</p>')),
                ('unsubscribe_success_template', wagtail.fields.RichTextField(blank=True, default='<p>已完成退訂。</p>')),
                ('unsubscribe_failure_template', wagtail.fields.RichTextField(blank=True, default='<p>退訂失敗，請稍後再試。</p>')),
            ],
            options={
                'verbose_name': 'Newsletter Template Settings',
            },
        ),
    ]
