zarbox added 7
This commit is contained in:
@@ -62,6 +62,19 @@ SELECT 'profit_gold_api_enabled', 'true', 'API سود طلا', 0, 1, NULL
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'profit_gold_api_enabled' LIMIT 1);
|
||||
UPDATE `settings` SET `value` = 'true' WHERE `key` = 'profit_gold_api_enabled';
|
||||
|
||||
-- API خارجی HMAC (قبلاً فقط در .env: NODE_CLIENT_ID / NODE_SHARED_SECRET)
|
||||
INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`)
|
||||
SELECT 'node_client_id', '', 'شناسه کلاینت API خارجی', 1, 1, 'از .env کپی کنید'
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'node_client_id' LIMIT 1);
|
||||
INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`)
|
||||
SELECT 'node_shared_secret', '', 'کلید HMAC API خارجی', 1, 1, 'از .env کپی کنید'
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'node_shared_secret' LIMIT 1);
|
||||
INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`)
|
||||
SELECT 'external_order_api_enabled', 'true', 'API سفارش خارجی', 1, 1, NULL
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'external_order_api_enabled' LIMIT 1);
|
||||
UPDATE `settings` SET `value` = 'true' WHERE `key` = 'external_order_api_enabled';
|
||||
-- بعد از اجرا در پنل: node_client_id و node_shared_secret را با مقادیر .env پر کنید
|
||||
|
||||
INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`)
|
||||
SELECT 'balance_report_exclude_customer_id', '12', 'حذف مشتری از تراز ادمین', 0, 1, NULL
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'balance_report_exclude_customer_id' LIMIT 1);
|
||||
|
||||
@@ -100,6 +100,19 @@ INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `de
|
||||
SELECT 'display_montzar', 'false', 'نمایش بلوک همکار در UI', 1, 1, NULL
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'display_montzar' LIMIT 1);
|
||||
|
||||
-- API خارجی Node (HMAC) — معادل NODE_CLIENT_ID / NODE_SHARED_SECRET در .env
|
||||
INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`)
|
||||
SELECT 'node_client_id', '', 'شناسه کلاینت API خارجی (X-Client-Id)', 1, 1, 'مقدار قبلی .env: NODE_CLIENT_ID'
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'node_client_id' LIMIT 1);
|
||||
|
||||
INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`)
|
||||
SELECT 'node_shared_secret', '', 'کلید امضای HMAC API خارجی', 1, 1, 'مقدار قبلی .env: NODE_SHARED_SECRET'
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'node_shared_secret' LIMIT 1);
|
||||
|
||||
INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`)
|
||||
SELECT 'external_order_api_enabled', 'true', 'فعالسازی API سفارش خارجی (get_wallet / order)', 1, 1, 'true + node_client_id + node_shared_secret'
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'external_order_api_enabled' LIMIT 1);
|
||||
|
||||
-- Jibit
|
||||
INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`)
|
||||
SELECT 'jibit_verification', 'true', 'تأیید کارت بانکی با جیبیت', 1, 1, 'true/false — BankAccountController'
|
||||
@@ -267,6 +280,15 @@ WHERE `key` = 'jibit_verification';
|
||||
UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'تأیید ثبتنام جیبیت'), `can_edit` = 1
|
||||
WHERE `key` = 'register_jibit_verify';
|
||||
|
||||
UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'شناسه کلاینت API خارجی'), `can_edit` = 1
|
||||
WHERE `key` = 'node_client_id';
|
||||
|
||||
UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'کلید HMAC API خارجی'), `can_edit` = 1
|
||||
WHERE `key` = 'node_shared_secret';
|
||||
|
||||
UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'API سفارش خارجی'), `can_edit` = 1
|
||||
WHERE `key` = 'external_order_api_enabled';
|
||||
|
||||
UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'بسته بودن همکار'), `can_edit` = 1
|
||||
WHERE `key` = 'montzar_closed';
|
||||
|
||||
@@ -331,7 +353,7 @@ UPDATE `settings` SET `type` = 'switch' WHERE `key` IN (
|
||||
'has_page_physical_gold', 'has_chat', 'charge_notif', 'group_sms', 'display_montzar',
|
||||
'montzar_closed', 'montzar_open_buy', 'montzar_open_sell', 'is_requaire_referral',
|
||||
'product_update_price_on_list', 'product_auto_close_open_on_list', 'payping_fin_sync_enabled',
|
||||
'fee_free'
|
||||
'fee_free', 'external_order_api_enabled'
|
||||
);
|
||||
|
||||
-- number
|
||||
@@ -351,6 +373,7 @@ UPDATE `settings` SET `type` = 'text' WHERE `key` IN (
|
||||
'montzar_truly_buy_mazaneh', 'montzar_truly_sell_mazaneh', 'startDay', 'endDay',
|
||||
'payping_start_url', 'payping_verify_url', 'payping_gateway_items', 'payping_fin_url',
|
||||
'payping_fin_token', 'payping_gateway_item', 'tahesab_token', 'tahesab_db',
|
||||
'node_client_id', 'node_shared_secret',
|
||||
'tahesab_bank_account', 'telegram_bot_token', 'bale_bot_token', 'referral_limit',
|
||||
'referral_bonus_amount', 'metal_type', 'montify_name', 'price_extreme_date',
|
||||
'liman_token'
|
||||
|
||||
@@ -187,6 +187,21 @@ INSERT INTO `const` (`key`, `value`, `title_fa`)
|
||||
SELECT 'limited_price', '0', 'سقف واریز اولیه'
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `const` WHERE `key` = 'limited_price' LIMIT 1);
|
||||
|
||||
-- -----------------------------------------------------------------------------
|
||||
-- API خارجی Node (HMAC) — NODE_CLIENT_ID / NODE_SHARED_SECRET
|
||||
-- -----------------------------------------------------------------------------
|
||||
INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`)
|
||||
SELECT 'node_client_id', '', 'شناسه کلاینت API خارجی (X-Client-Id)', 1, 1, 'fallback: .env NODE_CLIENT_ID'
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'node_client_id' LIMIT 1);
|
||||
|
||||
INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`)
|
||||
SELECT 'node_shared_secret', '', 'کلید امضای HMAC API خارجی', 1, 1, 'fallback: .env NODE_SHARED_SECRET'
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'node_shared_secret' LIMIT 1);
|
||||
|
||||
INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`)
|
||||
SELECT 'external_order_api_enabled', 'false', 'API سفارش خارجی (get_wallet / order)', 1, 1, NULL
|
||||
WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'external_order_api_enabled' LIMIT 1);
|
||||
|
||||
-- -----------------------------------------------------------------------------
|
||||
-- عنوان فارسی + can_edit برای کلیدهای موجود
|
||||
-- -----------------------------------------------------------------------------
|
||||
@@ -217,7 +232,8 @@ UPDATE `settings` SET `type` = 'longtext' WHERE `key` IN ('text_rule', 'text_abo
|
||||
UPDATE `settings` SET `type` = 'select', `description` = 'montzar,zaarbox,main_product,etehadie,taban_gohar' WHERE `key` = 'price_provider';
|
||||
UPDATE `settings` SET `type` = 'switch' WHERE `key` IN (
|
||||
'jibit_verification', 'register_jibit_verify', 'montzar_price', 'main_product_price',
|
||||
'tabanGohar_price', 'show_last_price', 'close_price', 'montzar_closed', 'montzar_open_buy', 'montzar_open_sell', 'display_montzar'
|
||||
'tabanGohar_price', 'show_last_price', 'close_price', 'montzar_closed', 'montzar_open_buy', 'montzar_open_sell', 'display_montzar',
|
||||
'external_order_api_enabled'
|
||||
);
|
||||
UPDATE `settings` SET `type` = 'number' WHERE `key` IN ('fee_single', 'buy_fee', 'sell_fee', 'fee_cash', 'fee_service_charge_percentage', 'montzar_product_id');
|
||||
UPDATE `settings` SET `type` = 'text' WHERE `type` IS NULL OR TRIM(`type`) = '';
|
||||
|
||||
Reference in New Issue
Block a user