diff --git a/smoothschedule/schedule/management/commands/seed_platform_plugins.py b/smoothschedule/schedule/management/commands/seed_platform_plugins.py index d447669..1bddaa2 100644 --- a/smoothschedule/schedule/management/commands/seed_platform_plugins.py +++ b/smoothschedule/schedule/management/commands/seed_platform_plugins.py @@ -13,6 +13,16 @@ class Command(BaseCommand): 'slug': 'daily-appointment-summary', 'category': PluginTemplate.Category.EMAIL, 'short_description': 'Send daily email summary of appointments', + 'description': '''Stay on top of your schedule with automated daily appointment summaries. + +This plugin sends a comprehensive email digest every morning with: +- List of all appointments for the day +- Customer names and contact information +- Service details and duration +- Staff/resource assignments +- Any special notes or requirements + +Perfect for managers and staff who want to start their day informed and prepared.''', 'plugin_code': 'Get today\'s appointments, format list, send email to {{PROMPT:staff_email|Staff email}}', }, { @@ -20,6 +30,15 @@ class Command(BaseCommand): 'slug': 'no-show-tracker', 'category': PluginTemplate.Category.REPORTS, 'short_description': 'Track customers who miss appointments', + 'description': '''Identify patterns of missed appointments and reduce no-shows. + +This plugin automatically tracks and reports on: +- Customers who didn\'t show up for scheduled appointments +- Frequency of no-shows per customer +- Total revenue lost due to missed appointments +- Trends over time + +Helps you identify customers who may need reminder calls or deposits, improving your booking efficiency and revenue.''', 'plugin_code': 'Get no-shows from last week, group by customer, send report to {{PROMPT:manager_email|Manager email}}', }, { @@ -27,6 +46,15 @@ class Command(BaseCommand): 'slug': 'birthday-greetings', 'category': PluginTemplate.Category.CUSTOMER, 'short_description': 'Send birthday emails with offers', + 'description': '''Delight your customers with personalized birthday greetings and special offers. + +This plugin automatically: +- Identifies customers with birthdays today +- Sends personalized birthday emails +- Includes custom discount codes or special offers +- Helps drive repeat bookings and customer loyalty + +A simple way to show customers you care while encouraging them to book their next appointment.''', 'plugin_code': 'Check for birthdays today, send personalized emails with {{PROMPT:discount_code|Discount code}}', }, { @@ -34,6 +62,17 @@ class Command(BaseCommand): 'slug': 'monthly-revenue-report', 'category': PluginTemplate.Category.REPORTS, 'short_description': 'Monthly business statistics', + 'description': '''Get comprehensive monthly insights into your business performance. + +This plugin generates detailed reports including: +- Total revenue and number of appointments +- Revenue breakdown by service type +- Busiest days and times +- Most popular services +- Customer retention metrics +- Year-over-year comparisons + +Perfect for owners and managers who want to track business growth and identify opportunities.''', 'plugin_code': 'Get last month\'s appointments, calculate stats, email to {{PROMPT:owner_email|Owner email}}', }, { @@ -41,6 +80,16 @@ class Command(BaseCommand): 'slug': 'appointment-reminder-24hr', 'category': PluginTemplate.Category.BOOKING, 'short_description': 'Remind customers 24hrs before appointments', + 'description': '''Reduce no-shows with automated appointment reminders. + +This plugin sends friendly reminder emails to customers 24 hours before their scheduled appointments, including: +- Appointment date and time +- Service details +- Location/directions +- Custom message or instructions +- Cancellation policy reminder + +Studies show that appointment reminders can reduce no-shows by up to 90%.''', 'plugin_code': 'Get appointments 24hrs from now, send reminder emails with {{PROMPT:custom_message|Custom message}}', }, { @@ -48,6 +97,15 @@ class Command(BaseCommand): 'slug': 'inactive-customer-reengagement', 'category': PluginTemplate.Category.CUSTOMER, 'short_description': 'Email inactive customers with offers', + 'description': '''Win back customers who haven\'t booked in a while. + +This plugin automatically identifies customers who haven\'t made an appointment recently and sends them: +- Personalized "we miss you" messages +- Special comeback offers or discounts +- Reminders of services they previously enjoyed +- Easy booking links + +Configurable inactivity period (default: 60 days). A proven strategy for increasing customer lifetime value and reducing churn.''', 'plugin_code': 'Find customers inactive for {{PROMPT:inactive_days|Days inactive|60}} days, send comeback offer with {{PROMPT:discount_code|Discount code}}', }, ] @@ -70,12 +128,12 @@ class Command(BaseCommand): slug=plugin_data['slug'], category=plugin_data['category'], short_description=plugin_data['short_description'], - description=plugin_data['short_description'], + description=plugin_data['description'], plugin_code=plugin_data['plugin_code'], visibility=PluginTemplate.Visibility.PLATFORM, is_approved=True, approved_at=timezone.now(), - author_name='SmoothSchedule Platform', + author_name='Smooth Schedule', license_type='PLATFORM', ) diff --git a/smoothschedule/schedule/migrations/0016_plugintemplate_version.py b/smoothschedule/schedule/migrations/0016_plugintemplate_version.py new file mode 100644 index 0000000..18a1a5a --- /dev/null +++ b/smoothschedule/schedule/migrations/0016_plugintemplate_version.py @@ -0,0 +1,18 @@ +# Generated by Django 5.2.8 on 2025-11-29 02:56 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('schedule', '0015_scheduledtask_plugin_code_plugintemplate_and_more'), + ] + + operations = [ + migrations.AddField( + model_name='plugintemplate', + name='version', + field=models.CharField(default='1.0.0', help_text='Plugin version (semantic versioning)', max_length=20), + ), + ] diff --git a/smoothschedule/schedule/models.py b/smoothschedule/schedule/models.py index 081843f..1e91a2e 100644 --- a/smoothschedule/schedule/models.py +++ b/smoothschedule/schedule/models.py @@ -715,6 +715,12 @@ class PluginTemplate(models.Model): help_text="Display name for attribution" ) + version = models.CharField( + max_length=20, + default='1.0.0', + help_text="Plugin version (semantic versioning)" + ) + license_type = models.CharField( max_length=10, default='SCPL', diff --git a/smoothschedule/schedule/serializers.py b/smoothschedule/schedule/serializers.py index 81d73a5..2cea31a 100644 --- a/smoothschedule/schedule/serializers.py +++ b/smoothschedule/schedule/serializers.py @@ -565,7 +565,7 @@ class PluginTemplateSerializer(serializers.ModelSerializer): 'id', 'name', 'slug', 'description', 'short_description', 'plugin_code', 'plugin_code_hash', 'template_variables', 'default_config', 'visibility', 'category', 'tags', - 'author', 'author_name', 'license_type', + 'author', 'author_name', 'version', 'license_type', 'is_approved', 'approved_by', 'approved_by_name', 'approved_at', 'rejection_reason', 'install_count', 'rating_average', 'rating_count', 'created_at', 'updated_at', 'published_at', @@ -628,7 +628,7 @@ class PluginTemplateListSerializer(serializers.ModelSerializer): fields = [ 'id', 'name', 'slug', 'short_description', 'visibility', 'category', 'tags', - 'author_name', 'license_type', 'is_approved', + 'author_name', 'version', 'license_type', 'is_approved', 'install_count', 'rating_average', 'rating_count', 'created_at', 'updated_at', 'published_at', ]