Add comprehensive email template management for both admin and vendors:
Admin Features:
- Email templates management page at /admin/email-templates
- Edit platform templates with language support (en, fr, de, lb)
- Preview templates with sample variables
- Send test emails
- View email logs per template
Vendor Features:
- Email templates customization page at /vendor/{code}/email-templates
- Override platform templates with vendor-specific versions
- Preview and test customized templates
- Revert to platform defaults
Technical Changes:
- Migration for vendor_email_templates table
- VendorEmailTemplate model with override management
- Enhanced EmailService with language resolution chain
(customer preferred -> vendor preferred -> platform default)
- Branding resolution (Wizamart default, removed for whitelabel)
- Platform-only template protection (billing templates)
- Admin and vendor API endpoints with full CRUD
- Updated seed script with billing and team templates
Files: 22 changed, ~3,900 lines added
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
35 lines
593 B
Python
35 lines
593 B
Python
# models/schema/__init__.py
|
|
"""API models package - Pydantic models for request/response validation."""
|
|
|
|
# Import API model modules
|
|
from . import (
|
|
auth,
|
|
base,
|
|
email,
|
|
inventory,
|
|
invoice,
|
|
marketplace_import_job,
|
|
marketplace_product,
|
|
message,
|
|
onboarding,
|
|
stats,
|
|
vendor,
|
|
)
|
|
|
|
# Common imports for convenience
|
|
from .base import * # Base Pydantic models
|
|
|
|
__all__ = [
|
|
"base",
|
|
"auth",
|
|
"email",
|
|
"invoice",
|
|
"marketplace_product",
|
|
"message",
|
|
"inventory",
|
|
"onboarding",
|
|
"vendor",
|
|
"marketplace_import_job",
|
|
"stats",
|
|
]
|