zarbox added 7

This commit is contained in:
2026-06-04 17:39:06 +03:30
parent bdafca0f1d
commit a9f468c51b
7 changed files with 87 additions and 9 deletions
+17 -1
View File
@@ -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`) = '';