Files
kulakpos_web/Modules/MarketingAddon/Database/Seeders/TemplateSeeder.php
eko54r 05fd3230b8
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 5m14s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 17s
Build, Push and Deploy / deploy-staging (push) Successful in 41s
Build, Push and Deploy / deploy-production (push) Has been skipped
update marketing
2026-05-14 11:55:22 +07:00

69 lines
9.0 KiB
PHP

<?php
namespace Modules\MarketingAddon\Database\Seeders;
use Illuminate\Database\Seeder;
use Modules\MarketingAddon\App\Models\Template;
class TemplateSeeder extends Seeder
{
public function run(): void
{
$templates = array(
array('business_id' => '1', 'title' => 'new_sale', 'type' => 'sms', 'template' => NULL, 'attachment' => NULL, 'subject' => NULL, 'variables' => '["customer_name","amount","received_amount","due_amount","invoice_url","business_name"]', 'message' => 'Dear [customer_name],
Thanks for the purchase
Your Invoice amount: [amount]
Received: [received_amount] Current Due: [due_amount]
Online invoice: [invoice_url]
Thank You
[business_name]', 'status' => '1', 'created_at' => '2026-01-05 05:40:37', 'updated_at' => '2026-02-01 11:01:51'),
array('business_id' => '1', 'title' => 'payment_received', 'type' => 'sms', 'template' => NULL, 'attachment' => NULL, 'subject' => NULL, 'variables' => '["customer_name","received_amount","due_amount","invoice_url","business_name"]', 'message' => 'Dear [customer_name],
Thanks for the payment
Received amount: [received_amount]
Current Due: [due_amount]
Online invoice: [invoice_url]
Thank You
[business_name]', 'status' => '1', 'created_at' => '2026-01-05 05:40:37', 'updated_at' => '2026-02-01 11:17:31'),
array('business_id' => '1', 'title' => 'payment_paid', 'type' => 'sms', 'template' => NULL, 'attachment' => NULL, 'subject' => NULL, 'variables' => '["customer_name","amount","paid_amount","due_amount","invoice_url","business_name"]', 'message' => 'Dear [customer_name],
Your Invoice amount: [amount]
Paid: [paid_amount] Current Due: [due_amount]
Online invoice: [invoice_url]
Thank You
[business_name]', 'status' => '1', 'created_at' => '2026-01-05 05:40:37', 'updated_at' => '2026-02-01 11:14:47'),
array('business_id' => '1', 'title' => 'purchase', 'type' => 'sms', 'template' => NULL, 'attachment' => NULL, 'subject' => NULL, 'variables' => '["supplier_name","invoice_no","date"]', 'message' => 'Dear [supplier_name], a purchase order #[invoice_no] has been placed on [date].', 'status' => '1', 'created_at' => '2026-01-05 05:40:37', 'updated_at' => '2026-01-12 11:22:45'),
array('business_id' => '1', 'title' => 'payment_reminder', 'type' => 'sms', 'template' => NULL, 'attachment' => NULL, 'subject' => NULL, 'variables' => '["customer_name","amount","business_phone"]', 'message' => 'Hello [customer_name], kindly clear your outstanding balance of [amount]. For details, contact us at [business_phone].', 'status' => '1', 'created_at' => '2026-01-05 05:40:37', 'updated_at' => '2026-01-12 11:22:45'),
array('business_id' => '1', 'title' => 'attendance', 'type' => 'sms', 'template' => NULL, 'attachment' => NULL, 'subject' => NULL, 'variables' => '["employee_name","entry_time","exit_time","date","business_name"]', 'message' => 'Dear [employee_name], your entry time at [entry_time] and exit time at [exit_time] on [date]. Thanks, [business_name] HR.', 'status' => '1', 'created_at' => '2026-01-29 15:35:09', 'updated_at' => '2026-02-01 10:44:36'),
array('business_id' => '1', 'title' => 'new_sale', 'type' => 'whatsapp', 'template' => 'sell_confirmation', 'attachment' => NULL, 'subject' => NULL, 'variables' => '["customer_name","amount","received_amount","due_amount","invoice_url","business_name"]', 'message' => 'Dear [customer_name],
Thanks for the purchase
Your Invoice amount: [amount]
Received: [received_amount] Current Due: [due_amount]
Online invoice: [invoice_url]
Thank You
[business_name]', 'status' => '1', 'created_at' => '2026-01-05 05:40:37', 'updated_at' => '2026-02-01 11:02:07'),
array('business_id' => '1', 'title' => 'payment_received', 'type' => 'whatsapp', 'template' => NULL, 'attachment' => NULL, 'subject' => NULL, 'variables' => '["customer_name","received_amount","due_amount","invoice_url","business_name"]', 'message' => 'Dear [customer_name],
Thanks for the payment
Received amount: [received_amount]
Current Due: [due_amount]
Online invoice: [invoice_url]
Thank You
[business_name]', 'status' => '1', 'created_at' => '2026-01-05 05:40:37', 'updated_at' => '2026-02-01 11:17:48'),
array('business_id' => '1', 'title' => 'payment_paid', 'type' => 'whatsapp', 'template' => NULL, 'attachment' => NULL, 'subject' => NULL, 'variables' => '["customer_name","amount","paid_amount","due_amount","invoice_url","business_name"]', 'message' => 'Dear [customer_name],
Your Invoice amount: [amount]
Paid: [paid_amount] Current Due: [due_amount]
Online invoice: [invoice_url]
Thank You
[business_name]', 'status' => '1', 'created_at' => '2026-01-05 05:40:37', 'updated_at' => '2026-02-01 11:14:24'),
array('business_id' => '1', 'title' => 'purchase', 'type' => 'whatsapp', 'template' => NULL, 'attachment' => NULL, 'subject' => NULL, 'variables' => '["supplier_name","invoice_no","date"]', 'message' => 'Dear [supplier_name], a purchase order #[invoice_no] has been placed on [date].', 'status' => '1', 'created_at' => '2026-01-05 05:40:37', 'updated_at' => '2026-01-12 11:22:45'),
array('business_id' => '1', 'title' => 'payment_reminder', 'type' => 'whatsapp', 'template' => NULL, 'attachment' => NULL, 'subject' => NULL, 'variables' => '["customer_name","amount","business_phone"]', 'message' => 'Hello [customer_name], kindly clear your outstanding balance of [amount]. For details, contact us at [business_phone].', 'status' => '1', 'created_at' => '2026-01-05 05:40:37', 'updated_at' => '2026-01-12 11:22:45'),
array('business_id' => '1', 'title' => 'attendance', 'type' => 'whatsapp', 'template' => NULL, 'attachment' => NULL, 'subject' => NULL, 'variables' => '["employee_name","entry_time","exit_time","date","business_name"]', 'message' => 'Dear [employee_name], your entry time at [entry_time] and exit time at [exit_time] on [date]. Thanks, [business_name] HR.', 'status' => '1', 'created_at' => '2026-01-29 15:35:09', 'updated_at' => '2026-02-01 10:45:32'),
array('business_id' => '1', 'title' => 'new_sale', 'type' => 'email', 'template' => NULL, 'attachment' => NULL, 'subject' => 'New Sale', 'variables' => '["customer_name","amount","received_amount","due_amount","invoice_url","business_name"]', 'message' => '<div>Dear [customer_name],</div><div>Thanks for the purchase</div><div>Your Invoice amount: [amount]</div><div>Received: [received_amount] Current Due: [due_amount]</div><div>Online invoice: [invoice_url]</div><div>Thank You</div><div>[business_name]</div>', 'status' => '1', 'created_at' => '2026-01-05 05:40:37', 'updated_at' => '2026-02-01 11:02:32'),
array('business_id' => '1', 'title' => 'payment_received', 'type' => 'email', 'template' => NULL, 'attachment' => NULL, 'subject' => 'Payment Received', 'variables' => '["customer_name","received_amount","due_amount","invoice_url","business_name"]', 'message' => '<div>Dear [customer_name],</div><div>Thanks for the payment&nbsp;</div><div>Received amount: [received_amount]</div><div>Current Due: [due_amount]</div><div>Online invoice: [invoice_url]</div><div>Thank You</div><div>[business_name]</div>', 'status' => '1', 'created_at' => '2026-01-05 05:40:37', 'updated_at' => '2026-02-01 11:18:28'),
array('business_id' => '1', 'title' => 'payment_paid', 'type' => 'email', 'template' => NULL, 'attachment' => NULL, 'subject' => 'Payment Paid', 'variables' => '["customer_name","amount","paid_amount","due_amount","invoice_url","business_name"]', 'message' => '<div>Dear [customer_name],</div><div>Your Invoice amount: [amount]</div><div>Paid: [paid_amount] Current Due: [due_amount]</div><div>Online invoice: [invoice_url]</div><div>Thank You</div><div>[business_name]</div>', 'status' => '1', 'created_at' => '2026-01-05 05:40:37', 'updated_at' => '2026-02-01 11:14:14'),
array('business_id' => '1', 'title' => 'purchase', 'type' => 'email', 'template' => NULL, 'attachment' => NULL, 'subject' => 'Purchase', 'variables' => '["supplier_name","invoice_no","date"]', 'message' => 'Dear [supplier_name], a purchase order #[invoice_no] has been placed on [date].', 'status' => '1', 'created_at' => '2026-01-05 05:40:37', 'updated_at' => '2026-01-12 11:22:45'),
array('business_id' => '1', 'title' => 'payment_reminder', 'type' => 'email', 'template' => NULL, 'attachment' => NULL, 'subject' => 'Payment Reminder', 'variables' => '["customer_name","amount","business_phone"]', 'message' => 'Hello [customer_name], kindly clear your outstanding balance of [amount]. For details, contact us at [business_phone].', 'status' => '1', 'created_at' => '2026-01-05 05:40:37', 'updated_at' => '2026-01-12 11:22:45'),
array('business_id' => '1', 'title' => 'attendance', 'type' => 'email', 'template' => NULL, 'attachment' => NULL, 'subject' => 'Attendance', 'variables' => '["employee_name","entry_time","exit_time","date","business_name"]', 'message' => '<span data-teams="true">Dear [employee_name], your entry time at [entry_time] and exit time at [exit_time] on [date]. Thanks, [business_name] HR.</span>', 'status' => '1', 'created_at' => '2026-01-29 15:35:09', 'updated_at' => '2026-02-01 10:46:41')
);
Template::insert($templates);
}
}