# Generated by Django 5.1.2 on 2025-10-02 19:02

import base.validators
import django.db.models.deletion
import django_ckeditor_5.fields
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('base', '0002_ownerinfo_facebook_ownerinfo_instagram_and_more'),
    ]

    operations = [
        migrations.CreateModel(
            name='Page',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, unique=True)),
                ('slug', models.SlugField(max_length=255, unique=True)),
                ('page_type', models.CharField(choices=[('home', 'Home'), ('about', 'About'), ('services', 'Services'), ('contact', 'Contact'), ('custom', 'Custom')], default='custom', max_length=50)),
                ('title', models.CharField(blank=True, max_length=255, null=True)),
                ('description', django_ckeditor_5.fields.CKEditor5Field(blank=True, null=True)),
                ('meta_description', models.TextField(blank=True, null=True)),
                ('is_active', models.BooleanField(default=True)),
                ('order', models.PositiveIntegerField(default=0)),
            ],
            options={
                'ordering': ['order', 'name'],
            },
        ),
        migrations.CreateModel(
            name='SectionTemplate',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, unique=True)),
                ('section_type', models.CharField(choices=[('hero', 'Hero'), ('features', 'Features'), ('content', 'Content'), ('testimonials', 'Testimonials'), ('cta', 'Call to Action'), ('gallery', 'Gallery'), ('team', 'Team'), ('faq', 'FAQ'), ('custom', 'Custom')], max_length=50)),
                ('template_config', models.JSONField(default=dict, help_text='JSON configuration for the template')),
                ('is_default', models.BooleanField(default=False)),
            ],
        ),
        migrations.RemoveField(
            model_name='genericpagesectionitem',
            name='generic_page_section',
        ),
        migrations.CreateModel(
            name='PageSection',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('section_type', models.CharField(choices=[('hero', 'Hero'), ('features', 'Features'), ('content', 'Content'), ('testimonials', 'Testimonials'), ('cta', 'Call to Action'), ('gallery', 'Gallery'), ('team', 'Team'), ('faq', 'FAQ'), ('custom', 'Custom')], default='custom', max_length=50)),
                ('name', models.CharField(help_text='Internal name for reference', max_length=255)),
                ('title', models.CharField(blank=True, max_length=255, null=True)),
                ('subtitle', models.CharField(blank=True, max_length=255, null=True)),
                ('description', django_ckeditor_5.fields.CKEditor5Field(blank=True, null=True)),
                ('icon', models.TextField(blank=True, null=True)),
                ('image', models.ImageField(blank=True, null=True, upload_to='page-sections/images/', validators=[base.validators.validate_image_size])),
                ('background_image', models.ImageField(blank=True, null=True, upload_to='page-sections/backgrounds/', validators=[base.validators.validate_image_size])),
                ('content_alignment', models.CharField(choices=[('left', 'Left'), ('center', 'Center'), ('right', 'Right')], default='left', max_length=10)),
                ('background_color', models.CharField(blank=True, help_text='Hex color code', max_length=7, null=True)),
                ('text_color', models.CharField(blank=True, help_text='Hex color code', max_length=7, null=True)),
                ('is_visible', models.BooleanField(default=True)),
                ('order', models.PositiveIntegerField(default=0)),
                ('key_points', models.JSONField(blank=True, default=list)),
                ('metadata', models.JSONField(blank=True, default=dict, help_text='Additional configuration data')),
                ('page', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='sections', to='base.page')),
            ],
            options={
                'ordering': ['page', 'order', 'name'],
                'unique_together': {('page', 'name')},
            },
        ),
        migrations.CreateModel(
            name='PageSectionItem',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('item_type', models.CharField(choices=[('feature', 'Feature'), ('testimonial', 'Testimonial'), ('team_member', 'Team Member'), ('faq_item', 'FAQ Item'), ('gallery_item', 'Gallery Item'), ('content_block', 'Content Block'), ('custom', 'Custom')], default='custom', max_length=50)),
                ('title', models.CharField(blank=True, max_length=255, null=True)),
                ('subtitle', models.CharField(blank=True, max_length=255, null=True)),
                ('description', django_ckeditor_5.fields.CKEditor5Field(blank=True, null=True)),
                ('icon', models.TextField(blank=True, null=True)),
                ('image', models.ImageField(blank=True, null=True, upload_to='page-section-items/images/', validators=[base.validators.validate_image_size])),
                ('key_points', models.JSONField(blank=True, default=list)),
                ('metadata', models.JSONField(blank=True, default=dict, help_text='Additional item data')),
                ('order', models.PositiveIntegerField(default=0)),
                ('is_active', models.BooleanField(default=True)),
                ('button_text', models.CharField(blank=True, max_length=100, null=True)),
                ('button_url', models.CharField(blank=True, max_length=500, null=True)),
                ('section', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='items', to='base.pagesection')),
            ],
            options={
                'ordering': ['section', 'order', 'title'],
            },
        ),
        migrations.DeleteModel(
            name='GenericPageSection',
        ),
        migrations.DeleteModel(
            name='GenericPageSectionItem',
        ),
    ]
