RezinaLMS-BackEnd/db/migrations/000096_subscription_activated_email_template.up.sql
2026-07-02 05:49:25 -07:00

37 lines
2.8 KiB
SQL

INSERT INTO email_templates (slug, name, subject, body_text, body_html, variables, is_system, status)
VALUES (
'subscription_activated',
'Subscription Activated',
'Your Yimaru Academy subscription is active',
'Hi{{if .FirstName}} {{.FirstName}}{{end}},
Your "{{.PlanName}}" {{.PackageLabel}} subscription is now active{{if .ExpiresLabel}} until {{.ExpiresLabel}}{{else if .IsLifetime}} with lifetime access{{end}}.
Sign in to start learning: {{.LoginURL}}',
$subscription_html$<!DOCTYPE html>
<html lang="en">
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1.0"><title>Yimaru Academy</title></head>
<body style="margin:0;padding:0;background-color:#f4f6fb;font-family:Inter,Roboto,Helvetica,Arial,sans-serif;">
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" style="background-color:#f4f6fb;padding:32px 16px;">
<tr><td align="center">
<table role="presentation" width="600" cellspacing="0" cellpadding="0" style="max-width:600px;width:100%;background:#ffffff;border-radius:12px;overflow:hidden;box-shadow:0 4px 24px rgba(157,42,131,0.14);">
<tr><td style="background:linear-gradient(135deg,#7b1f6e 0%,#9d2a83 52%,#c43a9a 100%);padding:28px 32px;text-align:center;">
<p style="margin:0;color:#ffffff;font-size:22px;font-weight:700;">Yimaru Academy</p>
<p style="margin:8px 0 0;color:rgba(255,255,255,0.88);font-size:11px;font-weight:600;letter-spacing:0.1em;text-transform:uppercase;">Online Learning Platform</p>
</td></tr>
<tr><td style="padding:32px;">
<h1 style="margin:0 0 8px;color:#333333;font-size:24px;font-weight:700;">Subscription active</h1>
<p style="margin:0 0 20px;color:#666666;font-size:15px;line-height:1.6;">{{if .FirstName}}Hi <strong style="color:#333333;">{{.FirstName}}</strong>, {{end}}your <strong style="color:#9d2a83;">{{.PlanName}}</strong> {{.PackageLabel}} package is now active.{{if .IsLifetime}} You have lifetime access.{{else if .ExpiresLabel}} It is valid until <strong style="color:#333333;">{{.ExpiresLabel}}</strong>.{{end}}</p>
<p style="margin:0 0 24px;text-align:center;"><a href="{{.LoginURL}}" style="display:inline-block;background-color:#9d2a83;color:#ffffff !important;text-decoration:none;padding:14px 28px;border-radius:8px;font-weight:600;font-size:15px;">Start learning</a></p>
<p style="margin:24px 0 0;color:#666666;font-size:14px;line-height:1.6;">Thank you for subscribing to Yimaru Academy.</p>
</td></tr>
<tr><td style="padding:20px 32px;background-color:#fafafa;border-top:1px solid #eeeeee;text-align:center;">
<p style="margin:0;color:#999999;font-size:12px;">&copy; 2026 Yimaru Academy &middot; All rights reserved</p>
</td></tr>
</table></td></tr></table></body></html>$subscription_html$,
'["FirstName", "PlanName", "PackageLabel", "LoginURL", "ExpiresLabel", "IsLifetime"]'::jsonb,
TRUE,
'ACTIVE'
)
ON CONFLICT (slug) DO NOTHING;