|
|
|
|
@@ -0,0 +1,109 @@
|
|
|
|
|
# Generated by Django 5.2.8 on 2025-12-08 16:17
|
|
|
|
|
|
|
|
|
|
import django.db.models.deletion
|
|
|
|
|
from django.db import migrations, models
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
|
|
initial = True
|
|
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
|
migrations.CreateModel(
|
|
|
|
|
name='BusinessSite',
|
|
|
|
|
fields=[
|
|
|
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
|
|
('site_name', models.CharField(help_text='Site title (defaults to business name)', max_length=200)),
|
|
|
|
|
('tagline', models.CharField(blank=True, max_length=300)),
|
|
|
|
|
('custom_css', models.TextField(blank=True, help_text='Custom CSS (Professional tier and above)')),
|
|
|
|
|
('logo_url', models.URLField(blank=True)),
|
|
|
|
|
('favicon_url', models.URLField(blank=True)),
|
|
|
|
|
('primary_color', models.CharField(blank=True, help_text='Hex color (e.g., #3B82F6)', max_length=7)),
|
|
|
|
|
('secondary_color', models.CharField(blank=True, help_text='Hex color', max_length=7)),
|
|
|
|
|
('seo_title', models.CharField(blank=True, help_text='Page title for search engines (max 60 chars)', max_length=60)),
|
|
|
|
|
('seo_description', models.CharField(blank=True, help_text='Meta description for search engines (max 160 chars)', max_length=160)),
|
|
|
|
|
('og_image_url', models.URLField(blank=True, help_text='Open Graph image for social sharing')),
|
|
|
|
|
('custom_domain', models.CharField(blank=True, help_text='Custom domain (Enterprise tier only)', max_length=253)),
|
|
|
|
|
('custom_domain_verified', models.BooleanField(default=False)),
|
|
|
|
|
('is_published', models.BooleanField(default=False)),
|
|
|
|
|
('published_at', models.DateTimeField(blank=True, null=True)),
|
|
|
|
|
('google_analytics_id', models.CharField(blank=True, help_text='Google Analytics measurement ID (e.g., G-XXXXXXXXXX)', max_length=50)),
|
|
|
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
|
|
|
('updated_at', models.DateTimeField(auto_now=True)),
|
|
|
|
|
],
|
|
|
|
|
options={
|
|
|
|
|
'verbose_name': 'Business Site',
|
|
|
|
|
'verbose_name_plural': 'Business Sites',
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
migrations.CreateModel(
|
|
|
|
|
name='Theme',
|
|
|
|
|
fields=[
|
|
|
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
|
|
('name', models.CharField(max_length=100)),
|
|
|
|
|
('slug', models.SlugField(unique=True)),
|
|
|
|
|
('description', models.TextField(blank=True)),
|
|
|
|
|
('preview_image', models.URLField(blank=True)),
|
|
|
|
|
('css_variables', models.JSONField(default=dict, help_text='CSS custom properties for theming')),
|
|
|
|
|
('component_styles', models.JSONField(default=dict, help_text='Component-specific style overrides')),
|
|
|
|
|
('tier_required', models.CharField(choices=[('FREE', 'Free'), ('STARTER', 'Starter'), ('PROFESSIONAL', 'Professional'), ('ENTERPRISE', 'Enterprise')], default='FREE', max_length=20)),
|
|
|
|
|
('is_default', models.BooleanField(default=False)),
|
|
|
|
|
('is_active', models.BooleanField(default=True)),
|
|
|
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
|
|
|
('updated_at', models.DateTimeField(auto_now=True)),
|
|
|
|
|
],
|
|
|
|
|
options={
|
|
|
|
|
'ordering': ['name'],
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
migrations.CreateModel(
|
|
|
|
|
name='SitePage',
|
|
|
|
|
fields=[
|
|
|
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
|
|
('title', models.CharField(max_length=200)),
|
|
|
|
|
('slug', models.SlugField(help_text="URL path (e.g., 'about' for /about)", max_length=100)),
|
|
|
|
|
('page_type', models.CharField(choices=[('HOME', 'Home Page'), ('SERVICES', 'Services'), ('ABOUT', 'About Us'), ('CONTACT', 'Contact'), ('BOOKING', 'Booking'), ('CUSTOM', 'Custom Page')], default='CUSTOM', max_length=20)),
|
|
|
|
|
('seo_title', models.CharField(blank=True, help_text='Override site SEO title for this page', max_length=60)),
|
|
|
|
|
('seo_description', models.CharField(blank=True, help_text='Override site SEO description for this page', max_length=160)),
|
|
|
|
|
('show_in_nav', models.BooleanField(default=True, help_text='Show this page in the navigation menu')),
|
|
|
|
|
('nav_title', models.CharField(blank=True, help_text='Navigation menu title (defaults to page title)', max_length=50)),
|
|
|
|
|
('display_order', models.PositiveIntegerField(default=0)),
|
|
|
|
|
('is_published', models.BooleanField(default=True)),
|
|
|
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
|
|
|
('updated_at', models.DateTimeField(auto_now=True)),
|
|
|
|
|
('site', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pages', to='site_builder.businesssite')),
|
|
|
|
|
],
|
|
|
|
|
options={
|
|
|
|
|
'ordering': ['display_order', 'title'],
|
|
|
|
|
'unique_together': {('site', 'slug')},
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
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 Banner'), ('TEXT', 'Text Block'), ('IMAGE', 'Image'), ('GALLERY', 'Image Gallery'), ('SERVICES_LIST', 'Services List'), ('BOOKING_WIDGET', 'Booking Widget'), ('CONTACT_FORM', 'Contact Form'), ('MAP', 'Map'), ('TESTIMONIALS', 'Testimonials'), ('FAQ', 'FAQ'), ('CUSTOM_HTML', 'Custom HTML'), ('SPACER', 'Spacer'), ('DIVIDER', 'Divider')], max_length=30)),
|
|
|
|
|
('content', models.JSONField(default=dict, help_text='Section content (structure depends on section_type)')),
|
|
|
|
|
('display_order', models.PositiveIntegerField(default=0)),
|
|
|
|
|
('is_visible', models.BooleanField(default=True)),
|
|
|
|
|
('custom_css', models.TextField(blank=True, help_text='Section-specific CSS (Professional tier and above)')),
|
|
|
|
|
('css_classes', models.CharField(blank=True, help_text='Additional CSS classes to apply', max_length=200)),
|
|
|
|
|
('hide_on_mobile', models.BooleanField(default=False)),
|
|
|
|
|
('hide_on_desktop', models.BooleanField(default=False)),
|
|
|
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
|
|
|
('updated_at', models.DateTimeField(auto_now=True)),
|
|
|
|
|
('page', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sections', to='site_builder.sitepage')),
|
|
|
|
|
],
|
|
|
|
|
options={
|
|
|
|
|
'ordering': ['display_order'],
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
migrations.AddField(
|
|
|
|
|
model_name='businesssite',
|
|
|
|
|
name='theme',
|
|
|
|
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='sites', to='site_builder.theme'),
|
|
|
|
|
),
|
|
|
|
|
]
|