feat(portal): lead module, WHMCS sync report/contacts/mapping, service lifecycle email templates
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
3c7710f1de
commit
a443ec3bf6
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders\EmailTemplates;
|
||||
|
||||
final class SubjectFormat
|
||||
{
|
||||
private const MAP = [
|
||||
'verify_account_welcome' => ['mã xác thực tài khoản', null, 'full_name'],
|
||||
'customer_password_reset_link' => ['yêu cầu đặt lại mật khẩu', null, 'full_name'],
|
||||
'customer_two_factor_code' => ['mã xác thực {{otp_purpose}}', null, 'full_name'],
|
||||
'password_reset_admin' => ['cập nhật mật khẩu tài khoản', null, 'full_name'],
|
||||
'customer_welcome' => ['chào mừng Quý khách', null, 'full_name'],
|
||||
'ticket_created' => ['tiếp nhận yêu cầu hỗ trợ #{{ticket_num}}', null, 'full_name'],
|
||||
'vm_credentials' => ['bàn giao Cloud VPS', 'product_name', 'full_name'],
|
||||
'hosting_information' => ['thông tin truy cập Hosting', 'product_name', 'client_name'],
|
||||
'hosting_account_created' => ['gửi thông tin truy cập Hosting', 'server_name', 'recipient_label'],
|
||||
'vm_suspended' => ['tạm ngưng Cloud VPS', 'vm_name', 'customer_name'],
|
||||
'service_expiry' => ['dịch vụ sắp hết hạn', 'product_name', null],
|
||||
'service_renewal_reminder' => ['nhắc gia hạn dịch vụ', 'product_name', 'client_name'],
|
||||
'service_renewed' => ['gia hạn dịch vụ thành công', 'product_name', 'client_name'],
|
||||
'auto_renew_failed' => ['chưa thể tự động gia hạn dịch vụ', 'product_name', 'client_name'],
|
||||
'vm_creation_failed' => ['không thể khởi tạo máy chủ ảo (đơn hàng #{{order_num}})', 'product_name', 'full_name'],
|
||||
'vm_rebuild_failed' => ['cài lại hệ điều hành thất bại', 'vm_name', 'full_name'],
|
||||
'vm_password_changed' => ['thay đổi mật khẩu VPS', 'vm_name', 'full_name'],
|
||||
'snapshot_action' => ['{{action_title}}', 'vm_name', 'full_name'],
|
||||
'invoice_notification' => ['{{title}} #{{invoice_number}}', null, 'customer_name'],
|
||||
'invoice_payment_reminder' => ['nhắc thanh toán hoá đơn {{invoice_number}}', null, 'client_name'],
|
||||
'customer_deposit_success' => ['nạp tiền thành công {{amount_formatted}} VNĐ', null, 'customer_name'],
|
||||
'manual_deposit_status' => ['trạng thái nạp tiền', null, 'customer_name'],
|
||||
'order_created' => ['xác nhận đơn hàng #{{order_num}}', null, 'client_name'],
|
||||
'domain_order_received' => ['ghi nhận đơn đăng ký tên miền', 'domain_name', 'customer_name'],
|
||||
'domain_order_approved' => ['bàn giao tên miền', 'domain_name', 'client_name'],
|
||||
'domain_order_rejected' => ['từ chối đăng ký tên miền', 'domain_name', 'client_name'],
|
||||
'ip_allocated' => ['cấp phát {{ip_count}} địa chỉ IP', null, 'client_name'],
|
||||
'ip_revoked' => ['thu hồi {{ip_count}} địa chỉ IP', null, 'client_name'],
|
||||
'admin_order_notification' => ['[ADMIN] đơn hàng mới #{{order_num}}', null, 'customer_name'],
|
||||
'admin_domain_order_new' => ['[ADMIN] đơn đăng ký tên miền mới', 'domain_name', 'customer_name'],
|
||||
'admin_hosting_account_created' => ['[ADMIN] hosting account mới', 'domain_name', 'customer_name'],
|
||||
'admin_trial_registration_request' => ['[ADMIN] yêu cầu dùng thử Cloud VPS', null, 'customer_name'],
|
||||
'admin_manual_deposit_pending' => ['[ADMIN] yêu cầu nạp tiền chờ duyệt {{transaction_code}}', null, 'customer_name'],
|
||||
'admin_ticket_notification' => ['[ADMIN] ticket mới #{{ticket_num}}', null, 'customer_name'],
|
||||
'admin_payment_received' => ['[ADMIN] khách hàng thanh toán {{payment_type}} #{{reference}}', null, 'customer_name'],
|
||||
'admin_service_renewed' => ['[ADMIN] {{admin_name}} gia hạn dịch vụ', 'product_name', 'customer_name'],
|
||||
'customer_signup_verify' => ['[ADMIN] đơn hàng mới #{{order_num}}', null, 'customer_name'],
|
||||
'customer_password_reset' => ['[ADMIN] yêu cầu nạp tiền chờ duyệt {{transaction_code}}', null, 'customer_name'],
|
||||
'vm_password_reset_success' => ['đặt lại mật khẩu VPS', 'vm_name', null],
|
||||
'Khuyến mãi tháng 10' => ['ưu đãi 30% Cloud VPS tháng 10', null, 'client_name'],
|
||||
'Thông báo bảo trì hệ thống' => ['thông báo bảo trì hệ thống ngày {{maintenance_date}}', null, 'client_name'],
|
||||
'Ra mắt Premium Hosting' => ['ra mắt Premium Hosting thế hệ mới', null, 'client_name'],
|
||||
'Thông báo bổ sung hồ sơ bản khai tên miền' => ['thông báo bổ sung hồ sơ bản khai tên miền', 'domain_name', 'customer_name'],
|
||||
];
|
||||
|
||||
/**
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function all(): array
|
||||
{
|
||||
return array_map(fn (array $parts) => self::build(...$parts), self::MAP);
|
||||
}
|
||||
|
||||
public static function for(string $keyOrName): ?string
|
||||
{
|
||||
return isset(self::MAP[$keyOrName]) ? self::build(...self::MAP[$keyOrName]) : null;
|
||||
}
|
||||
|
||||
public static function build(string $topic, ?string $target, ?string $customer): string
|
||||
{
|
||||
return 'V/v: Thế Giới Số ' . $topic
|
||||
. ($target ? " - {{{$target}}}" : '')
|
||||
. ($customer ? " | {{{$customer}}}" : '');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user