

INSERT INTO `{prefix}packages` (`name`, `version`, `created_at`, `updated_at`) VALUES
('shaun_wallet', '1.4.0', NOW(), NOW());

INSERT INTO `{prefix}model_maps` (`subject_type`, `model_class`) VALUES
('wallet_orders', 'Packages\\ShaunSocial\\Wallet\\Models\\WalletOrder'),
('wallet_withdraws', 'Packages\\ShaunSocial\\Wallet\\Models\\WalletWithdraw'),
('wallet_transactions', 'Packages\\ShaunSocial\\Wallet\\Models\\WalletTransaction');

INSERT INTO `{prefix}wallet_transaction_types` (`type`,`order`, `is_root`, `class`) VALUES
('buy', 1, 0, 'Packages\\ShaunSocial\\Wallet\\Wallet\\WalletTransactionTypeBuy'),
('send', 2, 0, 'Packages\\ShaunSocial\\Wallet\\Wallet\\WalletTransactionTypeSend'),
('withdraw', 3, 0, 'Packages\\ShaunSocial\\Wallet\\Wallet\\WalletTransactionTypeWithdraw'),
('payment', 4, 0, 'Packages\\ShaunSocial\\Wallet\\Wallet\\WalletTransactionTypePayment'),
('root_buy', 5, 1, 'Packages\\ShaunSocial\\Wallet\\Wallet\\WalletTransactionTypeRootBuy'),
('root_withdraw', 6, 1, 'Packages\\ShaunSocial\\Wallet\\Wallet\\WalletTransactionTypeRootWithdraw'),
('commission', 7, 0, 'Packages\\ShaunSocial\\Wallet\\Wallet\\WalletTransactionTypeCommission');


INSERT INTO `{prefix}mail_templates` (`type`, `subject`, `content`, `vars`, `created_at`, `updated_at`, `name`, `package`) VALUES
( 'wallet_balance_notify', '', '', '[link]', NOW(), NOW(), 'Remind users to deposit more when the balance in the ewallet is lower', 'shaun_wallet');

INSERT INTO `{prefix}translations` (`table_name`, `column_name`, `foreign_key`, `locale`, `value`) VALUES
('mail_templates', 'subject', (SELECT `id` FROM `{prefix}mail_templates` WHERE `type` = 'wallet_balance_notify'), 'en', '[site_name] Your account balance is running low'),
('mail_templates', 'content', (SELECT `id` FROM `{prefix}mail_templates` WHERE `type` = 'wallet_balance_notify'), 'en', '<p>[header]</p><p>Balance of your eWallet is running low.</p><p>The services that you’re paying using the eWallet on [site_name] will stop serving soon if your account runs out of money.</p><p>To keep your current services running, make a payment to add money to your ewallet.</p><p><a href="[link]">Make Payment Now</a></p><p>[footer]</p>');