# Generated by Django 5.2.1 on 2026-01-14 10:34

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


class Migration(migrations.Migration):

    dependencies = [
        ('cms', '0009_outreachcampaign_outreachcontact_linkacquisition_and_more'),
    ]

    operations = [
        migrations.CreateModel(
            name='GoogleBusinessProfile',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('business_name', models.CharField(help_text='Official business name', max_length=255)),
                ('business_type', models.CharField(choices=[('local_business', 'Local Business'), ('service_area_business', 'Service Area Business'), ('online_business', 'Online Business')], default='service_area_business', help_text='Type of business', max_length=50)),
                ('description', models.TextField(help_text='Business description (up to 750 characters)')),
                ('phone', models.CharField(help_text='Primary business phone number', max_length=20)),
                ('email', models.EmailField(help_text='Business email address', max_length=254)),
                ('website', models.URLField(help_text='Business website URL')),
                ('street_address', models.CharField(help_text='Street address', max_length=255)),
                ('city', models.CharField(help_text='City', max_length=100)),
                ('state_province', models.CharField(help_text='State or province', max_length=100)),
                ('postal_code', models.CharField(help_text='Postal code', max_length=20)),
                ('country', models.CharField(help_text='Country', max_length=100)),
                ('service_areas', models.JSONField(blank=True, default=list, help_text='List of service areas (cities/regions)')),
                ('business_hours', models.JSONField(blank=True, default=dict, help_text='Business hours by day of week')),
                ('service_categories', models.JSONField(default=list, help_text='Primary and secondary service categories')),
                ('attributes', models.JSONField(blank=True, default=dict, help_text='Business attributes (e.g., wheelchair accessible, accepts online orders)')),
                ('is_verified', models.BooleanField(default=False, help_text='Is the profile verified?')),
                ('verification_date', models.DateTimeField(blank=True, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('last_synced', models.DateTimeField(blank=True, help_text='Last sync with Google', null=True)),
            ],
            options={
                'verbose_name': 'Google Business Profile',
                'verbose_name_plural': 'Google Business Profiles',
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='GBPReview',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('reviewer_name', models.CharField(help_text='Name of the reviewer', max_length=255)),
                ('rating', models.IntegerField(choices=[(1, '1 Star'), (2, '2 Stars'), (3, '3 Stars'), (4, '4 Stars'), (5, '5 Stars')], help_text='Review rating (1-5 stars)')),
                ('review_text', models.TextField(help_text='Review content')),
                ('review_date', models.DateTimeField(help_text='Date the review was posted')),
                ('review_url', models.URLField(blank=True, help_text='URL to the review on Google')),
                ('response_status', models.CharField(choices=[('not_responded', 'Not Responded'), ('responded', 'Responded'), ('archived', 'Archived')], default='not_responded', help_text='Response status', max_length=50)),
                ('response_text', models.TextField(blank=True, help_text='Response to the review')),
                ('response_date', models.DateTimeField(blank=True, help_text='Date response was posted', null=True)),
                ('helpful_count', models.PositiveIntegerField(default=0, help_text="Number of 'helpful' votes")),
                ('synced_at', models.DateTimeField(auto_now_add=True, help_text='When review was synced')),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('profile', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reviews', to='cms.googlebusinessprofile')),
            ],
            options={
                'verbose_name': 'GBP Review',
                'verbose_name_plural': 'GBP Reviews',
                'ordering': ['-review_date'],
            },
        ),
        migrations.CreateModel(
            name='GBPPost',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(help_text='Post title', max_length=255)),
                ('content', models.TextField(help_text='Post content (up to 1500 characters)')),
                ('post_type', models.CharField(choices=[('update', 'Update'), ('offer', 'Offer/Promotion'), ('event', 'Event'), ('product', 'Product'), ('service', 'Service')], default='update', help_text='Type of post', max_length=50)),
                ('call_to_action', models.CharField(blank=True, choices=[('learn_more', 'Learn More'), ('book_now', 'Book Now'), ('order_now', 'Order Now'), ('call_now', 'Call Now'), ('sign_up', 'Sign Up'), ('get_offer', 'Get Offer')], help_text='Call-to-action button', max_length=100)),
                ('cta_url', models.URLField(blank=True, help_text='URL for CTA button')),
                ('offer_code', models.CharField(blank=True, help_text='Promo/offer code', max_length=50)),
                ('start_date', models.DateTimeField(blank=True, help_text='Start date for offer/event', null=True)),
                ('end_date', models.DateTimeField(blank=True, help_text='End date for offer/event', null=True)),
                ('image', models.ImageField(blank=True, help_text='Post image (optional)', null=True, upload_to='gbp_posts/')),
                ('is_published', models.BooleanField(default=True, help_text='Is post published?')),
                ('view_count', models.PositiveIntegerField(default=0, help_text='Number of views')),
                ('click_count', models.PositiveIntegerField(default=0, help_text='Number of CTA clicks')),
                ('phone_call_count', models.PositiveIntegerField(default=0, help_text='Number of phone calls')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('published_at', models.DateTimeField(blank=True, null=True)),
                ('profile', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='posts', to='cms.googlebusinessprofile')),
            ],
            options={
                'verbose_name': 'GBP Post',
                'verbose_name_plural': 'GBP Posts',
                'ordering': ['-published_at', '-created_at'],
            },
        ),
        migrations.CreateModel(
            name='GBPPhoto',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(help_text='Photo title/caption', max_length=255)),
                ('description', models.TextField(blank=True, help_text='Photo description')),
                ('photo_type', models.CharField(choices=[('profile', 'Profile Photo'), ('cover', 'Cover Photo'), ('business', 'Business Photo'), ('team', 'Team Photo'), ('product', 'Product Photo'), ('service', 'Service Photo')], default='business', help_text='Type of photo', max_length=50)),
                ('image', models.ImageField(help_text='Photo image (recommended: 1200x900px or larger)', upload_to='gbp_photos/')),
                ('is_published', models.BooleanField(default=True, help_text='Is photo published on GBP?')),
                ('order', models.PositiveIntegerField(default=0, help_text='Display order')),
                ('view_count', models.PositiveIntegerField(default=0, help_text='Number of views')),
                ('uploaded_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('profile', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='photos', to='cms.googlebusinessprofile')),
            ],
            options={
                'verbose_name': 'GBP Photo',
                'verbose_name_plural': 'GBP Photos',
                'ordering': ['order', '-uploaded_at'],
            },
        ),
    ]
