From 89014821c5006dc88fc19e0e4aa252d38651db07 Mon Sep 17 00:00:00 2001 From: adonis Date: Sat, 22 Aug 2026 16:50:49 +0330 Subject: [PATCH] fix all error 3 --- .../sql/abaeigold_merge_goldali_catalog.sql | 701 ++++---- .../abshode_rahimi_merge_goldali_catalog.sql | 703 ++++---- ...ode_rahimi_merge_goldali_catalog_patch.sql | 591 +++---- .../sql/add_main_wallet_products_setting.sql | 12 +- database/sql/add_tracking_systems_setting.sql | 50 +- database/sql/bazre_tala_settings_update.sql | 177 +- .../sql/bourcecu_merge_goldali_catalog.sql | 715 ++++---- database/sql/deploy_safe_schema.sql | 36 +- database/sql/deploy_settings_const.sql | 1471 ++++++++++------- ...ngs_const_preserve_value_sync_can_edit.sql | 899 +++++----- database/sql/fee_deduct_from_gold_patch.sql | 24 +- database/sql/garoosi_gold_settings_finish.sql | 39 +- database/sql/garoosi_gold_settings_update.sql | 111 +- database/sql/goldali_compat_patch.sql | 37 +- database/sql/goldali_database_settings.sql | 50 +- database/sql/goldali_payping_patch.sql | 17 +- database/sql/goldali_post_merge_settings.sql | 60 +- .../sql/goldali_settings_full_catalog.sql | 119 +- database/sql/goldali_zaarbox_price.sql | 6 +- .../kashkol_products_pricing_bootstrap.sql | 3 +- database/sql/price_channel_settings.sql | 67 +- database/sql/remove_montzar_price_setting.sql | 5 +- database/sql/remove_obsolete_wss_settings.sql | 41 +- .../sql/remove_taban_gohar_price_provider.sql | 19 +- database/sql/wss_settings_update.sql | 36 +- 25 files changed, 3371 insertions(+), 2618 deletions(-) diff --git a/database/sql/abaeigold_merge_goldali_catalog.sql b/database/sql/abaeigold_merge_goldali_catalog.sql index 18755ba..c0253f4 100644 --- a/database/sql/abaeigold_merge_goldali_catalog.sql +++ b/database/sql/abaeigold_merge_goldali_catalog.sql @@ -36,12 +36,14 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'auto_active_customer' INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'bace_url', '91.212.174.137', 'آدرس پایه', 1, 1, NULL, 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'bace_url' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'balance_report_exclude_customer_id', '', 'حذف مشتری از تراز ادمین', 0, 0, NULL, 'number' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'balance_report_exclude_customer_id' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'bale_bot_token', '', 'توکن بات بله', 0, 0, NULL, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'bale_bot_token' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'balance_report_exclude_customer_id', '', 'حذف مشتری از تراز ادمین', 0, 0, NULL, 'number' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'balance_report_exclude_customer_id' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'bale_bot_token', '', 'توکن بات بله', 0, 0, NULL, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'bale_bot_token' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'buy_fee', '0', 'سود/اختلاف خرید (ریال)', 1, 1, 'اگر خالی باشد از fee_single', 'number' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'buy_fee' LIMIT 1); @@ -63,9 +65,10 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'color_secondary' LIMIT INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'display_montzar', 'true', 'نمایش بلوک همکار در UI', 1, 1, NULL, 'switch' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'display_montzar' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'down_price', '', 'کمترین قیمت امروز', 0, 0, NULL, 'number' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'down_price' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'down_price', '', 'کمترین قیمت امروز', 0, 0, NULL, 'number' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'down_price' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'endDay', '20:30', 'پایان بازه معامله', 1, 1, NULL, 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'endDay' LIMIT 1); @@ -153,15 +156,18 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_base_url' LIMI INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'montzar_closed', 'false', 'بسته بودن همکار', 1, 1, NULL, 'switch' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_closed' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'montzar_diff', '300106.05286206', 'اختلاف قیمت همکار', 0, 1, 'سیستم پر می‌کند', 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_diff' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'montzar_live_price', '179740440.58339', 'قیمت لحظه‌ای همکار', 0, 1, NULL, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_live_price' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'montzar_mazaneh', '778600000', 'مظنه همکار', 0, 1, NULL, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_mazaneh' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'montzar_diff', '300106.05286206', 'اختلاف قیمت همکار', 0, 1, 'سیستم پر می‌کند', 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_diff' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'montzar_live_price', '179740440.58339', 'قیمت لحظه‌ای همکار', 0, 1, NULL, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_live_price' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'montzar_mazaneh', '778600000', 'مظنه همکار', 0, 1, NULL, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_mazaneh' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'montzar_mobile', '09901810700', 'موبایل API همکار', 1, 1, NULL, 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_mobile' LIMIT 1); @@ -180,15 +186,18 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_price' LIMIT 1 INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'montzar_product_id', '25', 'کد محصول همکار', 1, 1, NULL, 'number' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_product_id' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'montzar_token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL2xpbWFuZ29sZC5pci9zZXJ2ZXIvYXV0aC9sb2dpbiIsImlhdCI6MTc4MDQ5MjE0MiwiZXhwIjoxNzgzMDg0MTQyLCJuYmYiOjE3ODA0OTIxNDIsImp0aSI6IkZyYWwzN09jMzB4SHJRM1MiLCJzdWIiOiIzMzQ2IiwicHJ2IjoiMWQwYTAyMGFjZjVjNGI2YzQ5Nzk4OWRmMWFiZjBmYmQ0ZThjOGQ2MyJ9.cw31HhaBYJtNvTNnJwctU1J5tGp1-FDtIQVSU67HZA8', 'توکن همکار (خودکار)', 0, 1, NULL, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_token' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'montzar_truly_buy_mazaneh', '779900000', 'مظنه خرید همکار', 0, 1, NULL, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_truly_buy_mazaneh' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'montzar_truly_sell_mazaneh', '777300000', 'مظنه فروش همکار', 0, 1, NULL, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_truly_sell_mazaneh' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'montzar_token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL2xpbWFuZ29sZC5pci9zZXJ2ZXIvYXV0aC9sb2dpbiIsImlhdCI6MTc4MDQ5MjE0MiwiZXhwIjoxNzgzMDg0MTQyLCJuYmYiOjE3ODA0OTIxNDIsImp0aSI6IkZyYWwzN09jMzB4SHJRM1MiLCJzdWIiOiIzMzQ2IiwicHJ2IjoiMWQwYTAyMGFjZjVjNGI2YzQ5Nzk4OWRmMWFiZjBmYmQ0ZThjOGQ2MyJ9.cw31HhaBYJtNvTNnJwctU1J5tGp1-FDtIQVSU67HZA8', 'توکن همکار (خودکار)', 0, 1, NULL, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_token' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'montzar_truly_buy_mazaneh', '779900000', 'مظنه خرید همکار', 0, 1, NULL, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_truly_buy_mazaneh' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'montzar_truly_sell_mazaneh', '777300000', 'مظنه فروش همکار', 0, 1, NULL, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_truly_sell_mazaneh' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'name_en', 'abaei_gold', 'نام انگلیسی اپ', 1, 1, NULL, 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'name_en' LIMIT 1); @@ -225,21 +234,24 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_gateway_items' INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'payping_gateway_name', '', 'نام gateway درگاه', 1, 0, 'sepal,', 'select' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_gateway_name' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'payping_round_toman', '', 'گرد کردن مبلغ به تومان', 0, 0, NULL, 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_round_toman' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'payping_round_toman', '', 'گرد کردن مبلغ به تومان', 0, 0, NULL, 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_round_toman' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'payping_start_url', '', 'آدرس شروع درگاه', 1, 0, NULL, 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_start_url' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'payping_strict_failed_withdraw', '', 'اولویت تراکنش ناموفق', 0, 0, NULL, 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_strict_failed_withdraw' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'payping_strict_failed_withdraw', '', 'اولویت تراکنش ناموفق', 0, 0, NULL, 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_strict_failed_withdraw' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'payping_verify_url', '', 'آدرس تأیید درگاه', 1, 0, NULL, 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_verify_url' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'price_extreme_date', '', 'تاریخ min/max روز', 0, 0, NULL, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_extreme_date' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'price_extreme_date', '', 'تاریخ min/max روز', 0, 0, NULL, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_extreme_date' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'price_provider', 'montzar', 'منبع قیمت', 1, 1, 'montzar,zaarbox,main_product,etehadie,taban_gohar', 'select' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_provider' LIMIT 1); @@ -249,9 +261,10 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'product_auto_close_ope INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'product_update_price_on_list', 'true', 'بروز قیمت در لیست محصول', 1, 1, NULL, 'switch' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'product_update_price_on_list' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'profit_gold_api_enabled', '', 'API سود طلا', 0, 0, NULL, 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'profit_gold_api_enabled' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'profit_gold_api_enabled', '', 'API سود طلا', 0, 0, NULL, 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'profit_gold_api_enabled' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'referral_bonus_amount', '', 'مبلغ پاداش معرف', 1, 0, NULL, 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'referral_bonus_amount' LIMIT 1); @@ -276,9 +289,10 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'register_referral_sms_ INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'sell_fee', '0', 'سود/اختلاف فروش (ریال)', 1, 1, 'اگر خالی باشد از fee_single', 'number' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'sell_fee' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'send_to_tahesab', 'false', 'ارسال ته‌حساب', 0, 1, NULL, 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'send_to_tahesab' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'send_to_tahesab', 'false', 'ارسال ته‌حساب', 0, 1, NULL, 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'send_to_tahesab' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'server_url', 'https://abaeigold.ir/api', 'آدرس API سرور', 1, 1, 'in server', 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'server_url' LIMIT 1); @@ -309,9 +323,10 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tahesab_db' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'tahesab_token', '', 'توکن ته‌حساب', 1, 0, NULL, 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tahesab_token' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'telegram_bot_token', '', 'توکن بات تلگرام', 0, 0, NULL, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'telegram_bot_token' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'telegram_bot_token', '', 'توکن بات تلگرام', 0, 0, NULL, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'telegram_bot_token' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'test*', '', '', 1, 0, 'تستی است', 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'test*' LIMIT 1); @@ -327,9 +342,10 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'title_fav' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'title_pwa', '', 'عنوان PWA', 1, 0, NULL, 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'title_pwa' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'up_price', '', 'بیشترین قیمت امروز', 0, 0, 'ReportController', 'number' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'up_price' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'up_price', '', 'بیشترین قیمت امروز', 0, 0, 'ReportController', 'number' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'up_price' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'zaarbox_api_url', '', 'url زرباکس', 1, 0, NULL, 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'zaarbox_api_url' LIMIT 1); @@ -339,15 +355,16 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'zaarbox_price_key' LIM -- 2) UPDATE -UPDATE `settings` SET - `title_fa` = 'آدرس پنل ادمین', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = 'https://abaeigold.ir/admin/', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'admin_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'آدرس پنل ادمین', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = 'https://abaeigold.ir/admin/', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'admin_url'; UPDATE `settings` SET `title_fa` = 'آدرس اپ (کاربر)', `can_edit` = 1, @@ -384,15 +401,16 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'balance_report_exclude_customer_id'; -UPDATE `settings` SET - `title_fa` = 'توکن بات بله', - `can_edit` = 0, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'bale_bot_token'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'توکن بات بله', +-- `can_edit` = 0, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'bale_bot_token'; UPDATE `settings` SET `title_fa` = 'سود/اختلاف خرید (ریال)', `can_edit` = 1, @@ -411,15 +429,16 @@ UPDATE `settings` SET `is_active` = 1, `updated_at` = NOW() WHERE `key` = 'charge_notif'; -UPDATE `settings` SET - `title_fa` = 'UUID نمودار Zaarbox', - `can_edit` = 1, - `type` = 'text', - `description` = 'خالی = ca3800a0-1f57-3528-b963-178f9168e04f', - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'chart_id'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'UUID نمودار Zaarbox', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = 'خالی = ca3800a0-1f57-3528-b963-178f9168e04f', +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'chart_id'; UPDATE `settings` SET `title_fa` = 'بستن قیمت در بازه زمانی', `can_edit` = 1, @@ -456,15 +475,16 @@ UPDATE `settings` SET `is_active` = 1, `updated_at` = NOW() WHERE `key` = 'display_montzar'; -UPDATE `settings` SET - `title_fa` = 'کمترین قیمت امروز', - `can_edit` = 0, - `type` = 'number', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'down_price'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'کمترین قیمت امروز', +-- `can_edit` = 0, +-- `type` = 'number', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'down_price'; UPDATE `settings` SET `title_fa` = 'پایان بازه معامله', `can_edit` = 1, @@ -483,15 +503,16 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'etehadie_api_url'; -UPDATE `settings` SET - `title_fa` = 'فعال‌سازی API سفارش خارجی (get_wallet / order)', - `can_edit` = 1, - `type` = NULL, - `description` = 'true + node_client_id + node_shared_secret', - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'external_order_api_enabled'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'فعال‌سازی API سفارش خارجی (get_wallet / order)', +-- `can_edit` = 1, +-- `type` = NULL, +-- `description` = 'true + node_client_id + node_shared_secret', +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'external_order_api_enabled'; UPDATE `settings` SET `title_fa` = 'اختلاف ریالی هر گرم (سفارش)', `can_edit` = 1, @@ -546,15 +567,16 @@ UPDATE `settings` SET `is_active` = 1, `updated_at` = NOW() WHERE `key` = 'gift_for_referrer'; -UPDATE `settings` SET - `title_fa` = 'پیامک گروهی', - `can_edit` = 1, - `type` = 'switch', - `description` = NULL, - `value` = 'false', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'group_sms'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'پیامک گروهی', +-- `can_edit` = 1, +-- `type` = 'switch', +-- `description` = NULL, +-- `value` = 'false', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'group_sms'; UPDATE `settings` SET `title_fa` = 'چت پشتیبانی', `can_edit` = 1, @@ -564,15 +586,16 @@ UPDATE `settings` SET `is_active` = 1, `updated_at` = NOW() WHERE `key` = 'has_chat'; -UPDATE `settings` SET - `title_fa` = 'صفحه کسب درآمد', - `can_edit` = 1, - `type` = 'switch', - `description` = 'in server', - `value` = 'false', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'has_page_earn_money'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'صفحه کسب درآمد', +-- `can_edit` = 1, +-- `type` = 'switch', +-- `description` = 'in server', +-- `value` = 'false', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'has_page_earn_money'; UPDATE `settings` SET `title_fa` = 'صفحه صندوق', `can_edit` = 1, @@ -600,15 +623,16 @@ UPDATE `settings` SET `is_active` = 1, `updated_at` = NOW() WHERE `key` = 'has_page_physical_gold'; -UPDATE `settings` SET - `title_fa` = 'صفحه هشدار قیمت', - `can_edit` = 1, - `type` = 'switch', - `description` = NULL, - `value` = 'true', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'has_page_price_trigger'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'صفحه هشدار قیمت', +-- `can_edit` = 1, +-- `type` = 'switch', +-- `description` = NULL, +-- `value` = 'true', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'has_page_price_trigger'; UPDATE `settings` SET `title_fa` = 'تأیید کارت بانکی با جیبیت', `can_edit` = 1, @@ -627,33 +651,36 @@ UPDATE `settings` SET `is_active` = 1, `updated_at` = NOW() WHERE `key` = 'key'; -UPDATE `settings` SET - `title_fa` = '', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = 'logo_login', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'logo_login'; -UPDATE `settings` SET - `title_fa` = 'لوگوی صفحه ورود', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = 'logo_register', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'logo_register'; -UPDATE `settings` SET - `title_fa` = 'قیمت صفحه اصلی', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = '13', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'main_product'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = '', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = 'logo_login', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'logo_login'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'لوگوی صفحه ورود', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = 'logo_register', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'logo_register'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'قیمت صفحه اصلی', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '13', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'main_product'; UPDATE `settings` SET `title_fa` = 'قیمت از محصول (legacy)', `can_edit` = 1, @@ -663,15 +690,16 @@ UPDATE `settings` SET `is_active` = 1, `updated_at` = NOW() WHERE `key` = 'main_product_price'; -UPDATE `settings` SET - `title_fa` = 'عنوان فلز در UI', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'metal_type'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'عنوان فلز در UI', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'metal_type'; UPDATE `settings` SET `title_fa` = 'حداقل اولین خرید (ریال)', `can_edit` = 1, @@ -699,24 +727,26 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'minimum_sell'; -UPDATE `settings` SET - `title_fa` = 'نام فروشگاه', - `can_edit` = 1, - `type` = 'text', - `description` = 'RequestsController — اختیاری', - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'montify_name'; -UPDATE `settings` SET - `title_fa` = 'آدرس سرور همکار', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = 'https://limangold.ir', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'montzar_base_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'نام فروشگاه', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = 'RequestsController — اختیاری', +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'montify_name'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'آدرس سرور همکار', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = 'https://limangold.ir', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'montzar_base_url'; UPDATE `settings` SET `title_fa` = 'بسته بودن همکار', `can_edit` = 1, @@ -852,15 +882,16 @@ UPDATE `settings` SET `is_active` = 1, `updated_at` = NOW() WHERE `key` = 'name_fa'; -UPDATE `settings` SET - `title_fa` = 'شناسه کلاینت API خارجی (X-Client-Id)', - `can_edit` = 1, - `type` = NULL, - `description` = 'مقدار قبلی .env: NODE_CLIENT_ID', - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'node_client_id'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'شناسه کلاینت API خارجی (X-Client-Id)', +-- `can_edit` = 1, +-- `type` = NULL, +-- `description` = 'مقدار قبلی .env: NODE_CLIENT_ID', +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'node_client_id'; UPDATE `settings` SET `title_fa` = 'کلید امضای HMAC API خارجی', `can_edit` = 1, @@ -879,24 +910,26 @@ UPDATE `settings` SET `is_active` = 1, `updated_at` = NOW() WHERE `key` = 'open_register'; -UPDATE `settings` SET - `title_fa` = 'customer_id fin', - `can_edit` = 1, - `type` = 'number', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'payping_fin_customer_id'; -UPDATE `settings` SET - `title_fa` = 'همگام‌سازی fin لیمان', - `can_edit` = 1, - `type` = 'switch', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'payping_fin_sync_enabled'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'customer_id fin', +-- `can_edit` = 1, +-- `type` = 'number', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'payping_fin_customer_id'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'همگام‌سازی fin لیمان', +-- `can_edit` = 1, +-- `type` = 'switch', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'payping_fin_sync_enabled'; UPDATE `settings` SET `title_fa` = 'توکن fin', `can_edit` = 1, @@ -924,15 +957,16 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'payping_gateway_item'; -UPDATE `settings` SET - `title_fa` = 'لیست item (چرخشی)', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'payping_gateway_items'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'لیست item (چرخشی)', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'payping_gateway_items'; UPDATE `settings` SET `title_fa` = 'نام gateway درگاه', `can_edit` = 1, @@ -942,15 +976,16 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'payping_gateway_name'; -UPDATE `settings` SET - `title_fa` = 'گرد کردن مبلغ به تومان', - `can_edit` = 0, - `type` = 'switch', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'payping_round_toman'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'گرد کردن مبلغ به تومان', +-- `can_edit` = 0, +-- `type` = 'switch', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'payping_round_toman'; UPDATE `settings` SET `title_fa` = 'آدرس شروع درگاه', `can_edit` = 1, @@ -978,24 +1013,26 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'payping_verify_url'; -UPDATE `settings` SET - `title_fa` = 'تاریخ min/max روز', - `can_edit` = 0, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'price_extreme_date'; -UPDATE `settings` SET - `title_fa` = 'منبع قیمت', - `can_edit` = 1, - `type` = 'select', - `description` = 'montzar,zaarbox,main_product,etehadie,taban_gohar', - `value` = 'montzar', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'price_provider'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'تاریخ min/max روز', +-- `can_edit` = 0, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'price_extreme_date'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'منبع قیمت', +-- `can_edit` = 1, +-- `type` = 'select', +-- `description` = 'montzar,zaarbox,main_product,etehadie,taban_gohar', +-- `value` = 'montzar', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'price_provider'; UPDATE `settings` SET `title_fa` = 'باز/بسته خودکار محصول', `can_edit` = 1, @@ -1023,15 +1060,16 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'profit_gold_api_enabled'; -UPDATE `settings` SET - `title_fa` = 'مبلغ پاداش معرف', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'referral_bonus_amount'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'مبلغ پاداش معرف', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'referral_bonus_amount'; UPDATE `settings` SET `title_fa` = 'تعداد معرف برای هدیه', `can_edit` = 1, @@ -1095,15 +1133,16 @@ UPDATE `settings` SET `is_active` = 1, `updated_at` = NOW() WHERE `key` = 'sell_fee'; -UPDATE `settings` SET - `title_fa` = 'ارسال ته‌حساب', - `can_edit` = 0, - `type` = 'switch', - `description` = NULL, - `value` = 'false', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'send_to_tahesab'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'ارسال ته‌حساب', +-- `can_edit` = 0, +-- `type` = 'switch', +-- `description` = NULL, +-- `value` = 'false', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'send_to_tahesab'; UPDATE `settings` SET `title_fa` = 'آدرس API سرور', `can_edit` = 1, @@ -1167,42 +1206,46 @@ UPDATE `settings` SET `is_active` = 1, `updated_at` = NOW() WHERE `key` = 'tabanGohar_price'; -UPDATE `settings` SET - `title_fa` = 'حساب بانکی ته‌حساب', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'tahesab_bank_account'; -UPDATE `settings` SET - `title_fa` = 'دیتابیس ته‌حساب', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'tahesab_db'; -UPDATE `settings` SET - `title_fa` = 'توکن ته‌حساب', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'tahesab_token'; -UPDATE `settings` SET - `title_fa` = 'توکن بات تلگرام', - `can_edit` = 0, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'telegram_bot_token'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'حساب بانکی ته‌حساب', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'tahesab_bank_account'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'دیتابیس ته‌حساب', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'tahesab_db'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'توکن ته‌حساب', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'tahesab_token'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'توکن بات تلگرام', +-- `can_edit` = 0, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'telegram_bot_token'; UPDATE `settings` SET `title_fa` = '', `can_edit` = 1, @@ -1230,42 +1273,46 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'text_rule'; -UPDATE `settings` SET - `title_fa` = 'عنوان favicon', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'title_fav'; -UPDATE `settings` SET - `title_fa` = 'عنوان PWA', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'title_pwa'; -UPDATE `settings` SET - `title_fa` = 'بیشترین قیمت امروز', - `can_edit` = 0, - `type` = 'number', - `description` = 'ReportController', - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'up_price'; -UPDATE `settings` SET - `title_fa` = 'url زرباکس', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'zaarbox_api_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'عنوان favicon', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'title_fav'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'عنوان PWA', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'title_pwa'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'بیشترین قیمت امروز', +-- `can_edit` = 0, +-- `type` = 'number', +-- `description` = 'ReportController', +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'up_price'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'url زرباکس', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'zaarbox_api_url'; UPDATE `settings` SET `title_fa` = 'کد محصول زرباکس', `can_edit` = 1, diff --git a/database/sql/abshode_rahimi_merge_goldali_catalog.sql b/database/sql/abshode_rahimi_merge_goldali_catalog.sql index e5e8439..dcac28b 100644 --- a/database/sql/abshode_rahimi_merge_goldali_catalog.sql +++ b/database/sql/abshode_rahimi_merge_goldali_catalog.sql @@ -35,12 +35,14 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'auto_active_customer' INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'bace_url', '91.212.174.137', 'آدرس پایه', 1, 1, NULL, 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'bace_url' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'balance_report_exclude_customer_id', '', 'حذف مشتری از تراز ادمین', 0, 0, NULL, 'number' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'balance_report_exclude_customer_id' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'bale_bot_token', '', 'توکن بات بله', 0, 0, NULL, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'bale_bot_token' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'balance_report_exclude_customer_id', '', 'حذف مشتری از تراز ادمین', 0, 0, NULL, 'number' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'balance_report_exclude_customer_id' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'bale_bot_token', '', 'توکن بات بله', 0, 0, NULL, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'bale_bot_token' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'support_messenger_id', '', 'شناسه پشتیبانی پیام‌رسان', 1, 0, 'بله: یوزرنیم ble.ir | تلگرام: یوزرنیم | واتساپ: شماره با کد کشور | روبیکا/ایتا/سروش: یوزرنیم', 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'support_messenger_id' LIMIT 1); @@ -71,9 +73,10 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'color_secondary' LIMIT INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'display_montzar', '', 'نمایش بلوک همکار در UI', 1, 0, NULL, 'switch' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'display_montzar' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'down_price', '', 'کمترین قیمت امروز', 0, 0, NULL, 'number' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'down_price' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'down_price', '', 'کمترین قیمت امروز', 0, 0, NULL, 'number' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'down_price' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'endDay', '20:30', 'پایان بازه معامله', 1, 1, NULL, 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'endDay' LIMIT 1); @@ -162,15 +165,18 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_base_url' LIMI INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'montzar_closed', 'false', 'بسته بودن همکار', 1, 1, NULL, 'switch' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_closed' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'montzar_diff', '334733.67434615', 'اختلاف قیمت همکار', 0, 1, 'سیستم پر می‌کند', 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_diff' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'montzar_live_price', '183572564.02763', 'قیمت لحظه‌ای همکار', 0, 1, NULL, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_live_price' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'montzar_mazaneh', '795200000', 'مظنه همکار', 0, 1, NULL, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_mazaneh' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'montzar_diff', '334733.67434615', 'اختلاف قیمت همکار', 0, 1, 'سیستم پر می‌کند', 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_diff' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'montzar_live_price', '183572564.02763', 'قیمت لحظه‌ای همکار', 0, 1, NULL, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_live_price' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'montzar_mazaneh', '795200000', 'مظنه همکار', 0, 1, NULL, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_mazaneh' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'montzar_mobile', '09133745569', 'موبایل API همکار', 1, 1, NULL, 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_mobile' LIMIT 1); @@ -189,15 +195,18 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_price' LIMIT 1 INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'montzar_product_id', '1', 'کد محصول همکار', 1, 1, NULL, 'number' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_product_id' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'montzar_token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL2xpbWFuZ29sZC5pci9zZXJ2ZXIvYXV0aC9sb2dpbiIsImlhdCI6MTc3OTcxNTkxMywiZXhwIjoxNzgyMzA3OTEzLCJuYmYiOjE3Nzk3MTU5MTMsImp0aSI6ImZ4SDkwcWV4eHRiTmx5RUUiLCJzdWIiOiIzMzQ2IiwicHJ2IjoiMWQwYTAyMGFjZjVjNGI2YzQ5Nzk4OWRmMWFiZjBmYmQ0ZThjOGQ2MyJ9.M_Yff36nYQ94p8HnjB2wuHEQJaZTgW6Ppr-PRTXkyHE', 'توکن همکار (خودکار)', 0, 1, NULL, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_token' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'montzar_truly_buy_mazaneh', '796650000', 'مظنه خرید همکار', 0, 1, NULL, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_truly_buy_mazaneh' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'montzar_truly_sell_mazaneh', '793750000', 'مظنه فروش همکار', 0, 1, NULL, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_truly_sell_mazaneh' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'montzar_token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL2xpbWFuZ29sZC5pci9zZXJ2ZXIvYXV0aC9sb2dpbiIsImlhdCI6MTc3OTcxNTkxMywiZXhwIjoxNzgyMzA3OTEzLCJuYmYiOjE3Nzk3MTU5MTMsImp0aSI6ImZ4SDkwcWV4eHRiTmx5RUUiLCJzdWIiOiIzMzQ2IiwicHJ2IjoiMWQwYTAyMGFjZjVjNGI2YzQ5Nzk4OWRmMWFiZjBmYmQ0ZThjOGQ2MyJ9.M_Yff36nYQ94p8HnjB2wuHEQJaZTgW6Ppr-PRTXkyHE', 'توکن همکار (خودکار)', 0, 1, NULL, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_token' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'montzar_truly_buy_mazaneh', '796650000', 'مظنه خرید همکار', 0, 1, NULL, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_truly_buy_mazaneh' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'montzar_truly_sell_mazaneh', '793750000', 'مظنه فروش همکار', 0, 1, NULL, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_truly_sell_mazaneh' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'name_en', 'abshode_rahimi', 'نام انگلیسی اپ', 1, 1, NULL, 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'name_en' LIMIT 1); @@ -234,21 +243,24 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_gateway_items' INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'payping_gateway_name', '', 'نام gateway درگاه', 1, 0, 'sepal,', 'select' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_gateway_name' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'payping_round_toman', '', 'گرد کردن مبلغ به تومان', 0, 0, NULL, 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_round_toman' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'payping_round_toman', '', 'گرد کردن مبلغ به تومان', 0, 0, NULL, 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_round_toman' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'payping_start_url', '', 'آدرس شروع درگاه', 1, 0, NULL, 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_start_url' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'payping_strict_failed_withdraw', '', 'اولویت تراکنش ناموفق', 0, 0, NULL, 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_strict_failed_withdraw' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'payping_strict_failed_withdraw', '', 'اولویت تراکنش ناموفق', 0, 0, NULL, 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_strict_failed_withdraw' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'payping_verify_url', '', 'آدرس تأیید درگاه', 1, 0, NULL, 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_verify_url' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'price_extreme_date', '', 'تاریخ min/max روز', 0, 0, NULL, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_extreme_date' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'price_extreme_date', '', 'تاریخ min/max روز', 0, 0, NULL, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_extreme_date' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'price_provider', '', 'منبع قیمت', 1, 0, 'montzar,zaarbox,main_product,etehadie,taban_gohar', 'select' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_provider' LIMIT 1); @@ -258,9 +270,10 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'product_auto_close_ope INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'product_update_price_on_list', 'true', 'بروز قیمت در لیست محصول', 1, 1, NULL, 'switch' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'product_update_price_on_list' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'profit_gold_api_enabled', '', 'API سود طلا', 0, 0, NULL, 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'profit_gold_api_enabled' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'profit_gold_api_enabled', '', 'API سود طلا', 0, 0, NULL, 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'profit_gold_api_enabled' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'referral_bonus_amount', '', 'مبلغ پاداش معرف', 1, 0, NULL, 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'referral_bonus_amount' LIMIT 1); @@ -285,9 +298,10 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'register_referral_sms_ INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'sell_fee', '0', 'سود/اختلاف فروش (ریال)', 1, 1, 'اگر خالی باشد از fee_single', 'number' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'sell_fee' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'send_to_tahesab', 'false', 'ارسال ته‌حساب', 0, 1, NULL, 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'send_to_tahesab' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'send_to_tahesab', 'false', 'ارسال ته‌حساب', 0, 1, NULL, 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'send_to_tahesab' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'server_url', 'https://app.abshodehrahimi.ir/api', 'آدرس API سرور', 1, 1, 'in server', 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'server_url' LIMIT 1); @@ -309,9 +323,10 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tahesab_db' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'tahesab_token', 'X4V2Q8J1C4P1A7P7P5K2E6X2U1L8D4E4Y8N5Q4O6N2R6L2H1W1S1W1N1E5F6A8F7N4U2X4J4B4R2R2W2', 'توکن ته‌حساب', 1, 1, NULL, 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tahesab_token' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'telegram_bot_token', '', 'توکن بات تلگرام', 0, 0, NULL, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'telegram_bot_token' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'telegram_bot_token', '', 'توکن بات تلگرام', 0, 0, NULL, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'telegram_bot_token' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'test*', '', '', 1, 0, 'تستی است', 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'test*' LIMIT 1); @@ -327,9 +342,10 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'title_fav' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'title_pwa', '', 'عنوان PWA', 1, 0, NULL, 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'title_pwa' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'up_price', '', 'بیشترین قیمت امروز', 0, 0, 'ReportController', 'number' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'up_price' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'up_price', '', 'بیشترین قیمت امروز', 0, 0, 'ReportController', 'number' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'up_price' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'zaarbox_api_url', '', 'url زرباکس', 1, 0, NULL, 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'zaarbox_api_url' LIMIT 1); @@ -339,15 +355,16 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'zaarbox_price_key' LIM -- 2) UPDATE -UPDATE `settings` SET - `title_fa` = 'آدرس پنل ادمین', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = 'https://app.abshodehrahimi.ir/admin/', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'admin_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'آدرس پنل ادمین', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = 'https://app.abshodehrahimi.ir/admin/', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'admin_url'; UPDATE `settings` SET `title_fa` = 'آدرس اپ (کاربر)', `can_edit` = 1, @@ -384,15 +401,16 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'balance_report_exclude_customer_id'; -UPDATE `settings` SET - `title_fa` = 'توکن بات بله', - `can_edit` = 0, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'bale_bot_token'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'توکن بات بله', +-- `can_edit` = 0, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'bale_bot_token'; UPDATE `settings` SET `title_fa` = 'شناسه پشتیبانی پیام‌رسان', `can_edit` = 1, @@ -438,15 +456,16 @@ UPDATE `settings` SET `is_active` = 1, `updated_at` = NOW() WHERE `key` = 'charge_notif'; -UPDATE `settings` SET - `title_fa` = 'UUID نمودار Zaarbox', - `can_edit` = 1, - `type` = 'text', - `description` = 'خالی = ca3800a0-1f57-3528-b963-178f9168e04f', - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'chart_id'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'UUID نمودار Zaarbox', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = 'خالی = ca3800a0-1f57-3528-b963-178f9168e04f', +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'chart_id'; UPDATE `settings` SET `title_fa` = 'بستن قیمت در بازه زمانی', `can_edit` = 1, @@ -483,15 +502,16 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'display_montzar'; -UPDATE `settings` SET - `title_fa` = 'کمترین قیمت امروز', - `can_edit` = 0, - `type` = 'number', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'down_price'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'کمترین قیمت امروز', +-- `can_edit` = 0, +-- `type` = 'number', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'down_price'; UPDATE `settings` SET `title_fa` = 'پایان بازه معامله', `can_edit` = 1, @@ -510,15 +530,16 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'etehadie_api_url'; -UPDATE `settings` SET - `title_fa` = 'فعال‌سازی API سفارش خارجی (get_wallet / order)', - `can_edit` = 1, - `type` = NULL, - `description` = 'true + node_client_id + node_shared_secret', - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'external_order_api_enabled'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'فعال‌سازی API سفارش خارجی (get_wallet / order)', +-- `can_edit` = 1, +-- `type` = NULL, +-- `description` = 'true + node_client_id + node_shared_secret', +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'external_order_api_enabled'; UPDATE `settings` SET `title_fa` = 'اختلاف ریالی هر گرم (سفارش)', `can_edit` = 1, @@ -573,15 +594,16 @@ UPDATE `settings` SET `is_active` = 1, `updated_at` = NOW() WHERE `key` = 'gift_for_referrer'; -UPDATE `settings` SET - `title_fa` = 'پیامک گروهی', - `can_edit` = 1, - `type` = 'switch', - `description` = NULL, - `value` = 'false', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'group_sms'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'پیامک گروهی', +-- `can_edit` = 1, +-- `type` = 'switch', +-- `description` = NULL, +-- `value` = 'false', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'group_sms'; UPDATE `settings` SET `title_fa` = 'چت پشتیبانی', `can_edit` = 1, @@ -591,15 +613,16 @@ UPDATE `settings` SET `is_active` = 1, `updated_at` = NOW() WHERE `key` = 'has_chat'; -UPDATE `settings` SET - `title_fa` = 'صفحه کسب درآمد', - `can_edit` = 1, - `type` = 'switch', - `description` = 'in server', - `value` = 'false', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'has_page_earn_money'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'صفحه کسب درآمد', +-- `can_edit` = 1, +-- `type` = 'switch', +-- `description` = 'in server', +-- `value` = 'false', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'has_page_earn_money'; UPDATE `settings` SET `title_fa` = 'صفحه صندوق', `can_edit` = 1, @@ -627,15 +650,16 @@ UPDATE `settings` SET `is_active` = 1, `updated_at` = NOW() WHERE `key` = 'has_page_physical_gold'; -UPDATE `settings` SET - `title_fa` = 'صفحه هشدار قیمت', - `can_edit` = 1, - `type` = 'switch', - `description` = NULL, - `value` = 'true', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'has_page_price_trigger'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'صفحه هشدار قیمت', +-- `can_edit` = 1, +-- `type` = 'switch', +-- `description` = NULL, +-- `value` = 'true', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'has_page_price_trigger'; UPDATE `settings` SET `title_fa` = 'تأیید کارت بانکی با جیبیت', `can_edit` = 1, @@ -654,34 +678,37 @@ UPDATE `settings` SET `is_active` = 1, `updated_at` = NOW() WHERE `key` = 'key'; -UPDATE `settings` SET - `title_fa` = '', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = 'logo_login -', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'logo_login'; -UPDATE `settings` SET - `title_fa` = 'لوگوی صفحه ورود', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = 'logo_register', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'logo_register'; -UPDATE `settings` SET - `title_fa` = 'قیمت صفحه اصلی', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'main_product'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = '', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = 'logo_login +-- ', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'logo_login'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'لوگوی صفحه ورود', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = 'logo_register', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'logo_register'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'قیمت صفحه اصلی', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'main_product'; UPDATE `settings` SET `title_fa` = 'قیمت از محصول (legacy)', `can_edit` = 1, @@ -691,15 +718,16 @@ UPDATE `settings` SET `is_active` = 1, `updated_at` = NOW() WHERE `key` = 'main_product_price'; -UPDATE `settings` SET - `title_fa` = 'عنوان فلز در UI', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'metal_type'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'عنوان فلز در UI', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'metal_type'; UPDATE `settings` SET `title_fa` = 'حداقل اولین خرید (ریال)', `can_edit` = 1, @@ -727,24 +755,26 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'minimum_sell'; -UPDATE `settings` SET - `title_fa` = 'نام فروشگاه', - `can_edit` = 1, - `type` = 'text', - `description` = 'RequestsController — اختیاری', - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'montify_name'; -UPDATE `settings` SET - `title_fa` = 'آدرس سرور همکار', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = 'https://abshodehrahimi.ir', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'montzar_base_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'نام فروشگاه', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = 'RequestsController — اختیاری', +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'montify_name'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'آدرس سرور همکار', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = 'https://abshodehrahimi.ir', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'montzar_base_url'; UPDATE `settings` SET `title_fa` = 'بسته بودن همکار', `can_edit` = 1, @@ -880,15 +910,16 @@ UPDATE `settings` SET `is_active` = 1, `updated_at` = NOW() WHERE `key` = 'name_fa'; -UPDATE `settings` SET - `title_fa` = 'شناسه کلاینت API خارجی (X-Client-Id)', - `can_edit` = 1, - `type` = NULL, - `description` = 'مقدار قبلی .env: NODE_CLIENT_ID', - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'node_client_id'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'شناسه کلاینت API خارجی (X-Client-Id)', +-- `can_edit` = 1, +-- `type` = NULL, +-- `description` = 'مقدار قبلی .env: NODE_CLIENT_ID', +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'node_client_id'; UPDATE `settings` SET `title_fa` = 'کلید امضای HMAC API خارجی', `can_edit` = 1, @@ -907,24 +938,26 @@ UPDATE `settings` SET `is_active` = 1, `updated_at` = NOW() WHERE `key` = 'open_register'; -UPDATE `settings` SET - `title_fa` = 'customer_id fin', - `can_edit` = 1, - `type` = 'number', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'payping_fin_customer_id'; -UPDATE `settings` SET - `title_fa` = 'همگام‌سازی fin لیمان', - `can_edit` = 1, - `type` = 'switch', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'payping_fin_sync_enabled'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'customer_id fin', +-- `can_edit` = 1, +-- `type` = 'number', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'payping_fin_customer_id'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'همگام‌سازی fin لیمان', +-- `can_edit` = 1, +-- `type` = 'switch', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'payping_fin_sync_enabled'; UPDATE `settings` SET `title_fa` = 'توکن fin', `can_edit` = 1, @@ -952,15 +985,16 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'payping_gateway_item'; -UPDATE `settings` SET - `title_fa` = 'لیست item (چرخشی)', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'payping_gateway_items'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'لیست item (چرخشی)', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'payping_gateway_items'; UPDATE `settings` SET `title_fa` = 'نام gateway درگاه', `can_edit` = 1, @@ -970,15 +1004,16 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'payping_gateway_name'; -UPDATE `settings` SET - `title_fa` = 'گرد کردن مبلغ به تومان', - `can_edit` = 0, - `type` = 'switch', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'payping_round_toman'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'گرد کردن مبلغ به تومان', +-- `can_edit` = 0, +-- `type` = 'switch', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'payping_round_toman'; UPDATE `settings` SET `title_fa` = 'آدرس شروع درگاه', `can_edit` = 1, @@ -1006,24 +1041,26 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'payping_verify_url'; -UPDATE `settings` SET - `title_fa` = 'تاریخ min/max روز', - `can_edit` = 0, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'price_extreme_date'; -UPDATE `settings` SET - `title_fa` = 'منبع قیمت', - `can_edit` = 1, - `type` = 'select', - `description` = 'montzar,zaarbox,main_product,etehadie,taban_gohar', - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'price_provider'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'تاریخ min/max روز', +-- `can_edit` = 0, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'price_extreme_date'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'منبع قیمت', +-- `can_edit` = 1, +-- `type` = 'select', +-- `description` = 'montzar,zaarbox,main_product,etehadie,taban_gohar', +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'price_provider'; UPDATE `settings` SET `title_fa` = 'باز/بسته خودکار محصول', `can_edit` = 1, @@ -1051,15 +1088,16 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'profit_gold_api_enabled'; -UPDATE `settings` SET - `title_fa` = 'مبلغ پاداش معرف', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'referral_bonus_amount'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'مبلغ پاداش معرف', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'referral_bonus_amount'; UPDATE `settings` SET `title_fa` = 'تعداد معرف برای هدیه', `can_edit` = 1, @@ -1123,15 +1161,16 @@ UPDATE `settings` SET `is_active` = 1, `updated_at` = NOW() WHERE `key` = 'sell_fee'; -UPDATE `settings` SET - `title_fa` = 'ارسال ته‌حساب', - `can_edit` = 0, - `type` = 'switch', - `description` = NULL, - `value` = 'false', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'send_to_tahesab'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'ارسال ته‌حساب', +-- `can_edit` = 0, +-- `type` = 'switch', +-- `description` = NULL, +-- `value` = 'false', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'send_to_tahesab'; UPDATE `settings` SET `title_fa` = 'آدرس API سرور', `can_edit` = 1, @@ -1168,42 +1207,46 @@ UPDATE `settings` SET `is_active` = 1, `updated_at` = NOW() WHERE `key` = 'tabanGohar_price'; -UPDATE `settings` SET - `title_fa` = 'حساب بانکی ته‌حساب', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = 'کشاورزي قلک', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'tahesab_bank_account'; -UPDATE `settings` SET - `title_fa` = 'دیتابیس ته‌حساب', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = 'TahesabDB5', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'tahesab_db'; -UPDATE `settings` SET - `title_fa` = 'توکن ته‌حساب', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = 'X4V2Q8J1C4P1A7P7P5K2E6X2U1L8D4E4Y8N5Q4O6N2R6L2H1W1S1W1N1E5F6A8F7N4U2X4J4B4R2R2W2', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'tahesab_token'; -UPDATE `settings` SET - `title_fa` = 'توکن بات تلگرام', - `can_edit` = 0, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'telegram_bot_token'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'حساب بانکی ته‌حساب', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = 'کشاورزي قلک', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'tahesab_bank_account'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'دیتابیس ته‌حساب', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = 'TahesabDB5', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'tahesab_db'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'توکن ته‌حساب', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = 'X4V2Q8J1C4P1A7P7P5K2E6X2U1L8D4E4Y8N5Q4O6N2R6L2H1W1S1W1N1E5F6A8F7N4U2X4J4B4R2R2W2', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'tahesab_token'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'توکن بات تلگرام', +-- `can_edit` = 0, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'telegram_bot_token'; UPDATE `settings` SET `title_fa` = '', `can_edit` = 1, @@ -1231,42 +1274,46 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'text_rule'; -UPDATE `settings` SET - `title_fa` = 'عنوان favicon', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'title_fav'; -UPDATE `settings` SET - `title_fa` = 'عنوان PWA', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'title_pwa'; -UPDATE `settings` SET - `title_fa` = 'بیشترین قیمت امروز', - `can_edit` = 0, - `type` = 'number', - `description` = 'ReportController', - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'up_price'; -UPDATE `settings` SET - `title_fa` = 'url زرباکس', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'zaarbox_api_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'عنوان favicon', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'title_fav'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'عنوان PWA', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'title_pwa'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'بیشترین قیمت امروز', +-- `can_edit` = 0, +-- `type` = 'number', +-- `description` = 'ReportController', +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'up_price'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'url زرباکس', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'zaarbox_api_url'; UPDATE `settings` SET `title_fa` = 'کد محصول زرباکس', `can_edit` = 1, diff --git a/database/sql/abshode_rahimi_merge_goldali_catalog_patch.sql b/database/sql/abshode_rahimi_merge_goldali_catalog_patch.sql index c4b6c79..5fdfca5 100644 --- a/database/sql/abshode_rahimi_merge_goldali_catalog_patch.sql +++ b/database/sql/abshode_rahimi_merge_goldali_catalog_patch.sql @@ -8,15 +8,16 @@ ALTER TABLE `settings` START TRANSACTION; -UPDATE `settings` SET - `title_fa` = 'آدرس پنل ادمین', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = 'https://app.abshodehrahimi.ir/admin/', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'admin_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'آدرس پنل ادمین', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = 'https://app.abshodehrahimi.ir/admin/', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'admin_url'; UPDATE `settings` SET `title_fa` = 'آدرس اپ (کاربر)', `can_edit` = 1, @@ -53,15 +54,16 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'balance_report_exclude_customer_id'; -UPDATE `settings` SET - `title_fa` = 'توکن بات بله', - `can_edit` = 0, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'bale_bot_token'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'توکن بات بله', +-- `can_edit` = 0, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'bale_bot_token'; UPDATE `settings` SET `title_fa` = 'سود/اختلاف خرید (ریال)', `can_edit` = 1, @@ -80,15 +82,16 @@ UPDATE `settings` SET `is_active` = 1, `updated_at` = NOW() WHERE `key` = 'charge_notif'; -UPDATE `settings` SET - `title_fa` = 'UUID نمودار Zaarbox', - `can_edit` = 1, - `type` = 'text', - `description` = 'خالی = ca3800a0-1f57-3528-b963-178f9168e04f', - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'chart_id'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'UUID نمودار Zaarbox', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = 'خالی = ca3800a0-1f57-3528-b963-178f9168e04f', +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'chart_id'; UPDATE `settings` SET `title_fa` = 'بستن قیمت در بازه زمانی', `can_edit` = 1, @@ -125,15 +128,16 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'display_montzar'; -UPDATE `settings` SET - `title_fa` = 'کمترین قیمت امروز', - `can_edit` = 0, - `type` = 'number', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'down_price'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'کمترین قیمت امروز', +-- `can_edit` = 0, +-- `type` = 'number', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'down_price'; UPDATE `settings` SET `title_fa` = 'پایان بازه معامله', `can_edit` = 1, @@ -152,15 +156,16 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'etehadie_api_url'; -UPDATE `settings` SET - `title_fa` = 'فعال‌سازی API سفارش خارجی (get_wallet / order)', - `can_edit` = 1, - `type` = NULL, - `description` = 'true + node_client_id + node_shared_secret', - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'external_order_api_enabled'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'فعال‌سازی API سفارش خارجی (get_wallet / order)', +-- `can_edit` = 1, +-- `type` = NULL, +-- `description` = 'true + node_client_id + node_shared_secret', +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'external_order_api_enabled'; UPDATE `settings` SET `title_fa` = 'اختلاف ریالی هر گرم (سفارش)', `can_edit` = 1, @@ -215,15 +220,16 @@ UPDATE `settings` SET `is_active` = 1, `updated_at` = NOW() WHERE `key` = 'gift_for_referrer'; -UPDATE `settings` SET - `title_fa` = 'پیامک گروهی', - `can_edit` = 1, - `type` = 'switch', - `description` = NULL, - `value` = 'false', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'group_sms'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'پیامک گروهی', +-- `can_edit` = 1, +-- `type` = 'switch', +-- `description` = NULL, +-- `value` = 'false', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'group_sms'; UPDATE `settings` SET `title_fa` = 'چت پشتیبانی', `can_edit` = 1, @@ -233,15 +239,16 @@ UPDATE `settings` SET `is_active` = 1, `updated_at` = NOW() WHERE `key` = 'has_chat'; -UPDATE `settings` SET - `title_fa` = 'صفحه کسب درآمد', - `can_edit` = 1, - `type` = 'switch', - `description` = 'in server', - `value` = 'false', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'has_page_earn_money'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'صفحه کسب درآمد', +-- `can_edit` = 1, +-- `type` = 'switch', +-- `description` = 'in server', +-- `value` = 'false', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'has_page_earn_money'; UPDATE `settings` SET `title_fa` = 'صفحه صندوق', `can_edit` = 1, @@ -269,15 +276,16 @@ UPDATE `settings` SET `is_active` = 1, `updated_at` = NOW() WHERE `key` = 'has_page_physical_gold'; -UPDATE `settings` SET - `title_fa` = 'صفحه هشدار قیمت', - `can_edit` = 1, - `type` = 'switch', - `description` = NULL, - `value` = 'true', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'has_page_price_trigger'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'صفحه هشدار قیمت', +-- `can_edit` = 1, +-- `type` = 'switch', +-- `description` = NULL, +-- `value` = 'true', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'has_page_price_trigger'; UPDATE `settings` SET `title_fa` = 'کد معرف اجباری (قدیمی)', `can_edit` = 1, @@ -305,34 +313,37 @@ UPDATE `settings` SET `is_active` = 1, `updated_at` = NOW() WHERE `key` = 'key'; -UPDATE `settings` SET - `title_fa` = '', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = 'logo_login -', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'logo_login'; -UPDATE `settings` SET - `title_fa` = 'لوگوی صفحه ورود', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = 'logo_register', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'logo_register'; -UPDATE `settings` SET - `title_fa` = 'قیمت صفحه اصلی', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'main_product'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = '', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = 'logo_login +-- ', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'logo_login'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'لوگوی صفحه ورود', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = 'logo_register', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'logo_register'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'قیمت صفحه اصلی', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'main_product'; UPDATE `settings` SET `title_fa` = 'قیمت از محصول (legacy)', `can_edit` = 1, @@ -342,15 +353,16 @@ UPDATE `settings` SET `is_active` = 1, `updated_at` = NOW() WHERE `key` = 'main_product_price'; -UPDATE `settings` SET - `title_fa` = 'عنوان فلز در UI', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'metal_type'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'عنوان فلز در UI', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'metal_type'; UPDATE `settings` SET `title_fa` = 'حداقل اولین خرید (ریال)', `can_edit` = 1, @@ -378,24 +390,26 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'minimum_sell'; -UPDATE `settings` SET - `title_fa` = 'نام فروشگاه', - `can_edit` = 1, - `type` = 'text', - `description` = 'RequestsController — اختیاری', - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'montify_name'; -UPDATE `settings` SET - `title_fa` = 'آدرس سرور همکار', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = 'https://abshodehrahimi.ir', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'montzar_base_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'نام فروشگاه', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = 'RequestsController — اختیاری', +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'montify_name'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'آدرس سرور همکار', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = 'https://abshodehrahimi.ir', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'montzar_base_url'; UPDATE `settings` SET `title_fa` = 'بسته بودن همکار', `can_edit` = 1, @@ -531,15 +545,16 @@ UPDATE `settings` SET `is_active` = 1, `updated_at` = NOW() WHERE `key` = 'name_fa'; -UPDATE `settings` SET - `title_fa` = 'شناسه کلاینت API خارجی (X-Client-Id)', - `can_edit` = 1, - `type` = NULL, - `description` = 'مقدار قبلی .env: NODE_CLIENT_ID', - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'node_client_id'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'شناسه کلاینت API خارجی (X-Client-Id)', +-- `can_edit` = 1, +-- `type` = NULL, +-- `description` = 'مقدار قبلی .env: NODE_CLIENT_ID', +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'node_client_id'; UPDATE `settings` SET `title_fa` = 'کلید امضای HMAC API خارجی', `can_edit` = 1, @@ -558,24 +573,26 @@ UPDATE `settings` SET `is_active` = 1, `updated_at` = NOW() WHERE `key` = 'open_register'; -UPDATE `settings` SET - `title_fa` = 'customer_id fin', - `can_edit` = 1, - `type` = 'number', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'payping_fin_customer_id'; -UPDATE `settings` SET - `title_fa` = 'همگام‌سازی fin لیمان', - `can_edit` = 1, - `type` = 'switch', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'payping_fin_sync_enabled'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'customer_id fin', +-- `can_edit` = 1, +-- `type` = 'number', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'payping_fin_customer_id'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'همگام‌سازی fin لیمان', +-- `can_edit` = 1, +-- `type` = 'switch', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'payping_fin_sync_enabled'; UPDATE `settings` SET `title_fa` = 'توکن fin', `can_edit` = 1, @@ -603,15 +620,16 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'payping_gateway_item'; -UPDATE `settings` SET - `title_fa` = 'لیست item (چرخشی)', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'payping_gateway_items'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'لیست item (چرخشی)', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'payping_gateway_items'; UPDATE `settings` SET `title_fa` = 'نام gateway درگاه', `can_edit` = 1, @@ -621,15 +639,16 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'payping_gateway_name'; -UPDATE `settings` SET - `title_fa` = 'گرد کردن مبلغ به تومان', - `can_edit` = 0, - `type` = 'switch', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'payping_round_toman'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'گرد کردن مبلغ به تومان', +-- `can_edit` = 0, +-- `type` = 'switch', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'payping_round_toman'; UPDATE `settings` SET `title_fa` = 'آدرس شروع درگاه', `can_edit` = 1, @@ -657,24 +676,26 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'payping_verify_url'; -UPDATE `settings` SET - `title_fa` = 'تاریخ min/max روز', - `can_edit` = 0, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'price_extreme_date'; -UPDATE `settings` SET - `title_fa` = 'منبع قیمت', - `can_edit` = 1, - `type` = 'select', - `description` = 'montzar,zaarbox,main_product,etehadie,taban_gohar', - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'price_provider'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'تاریخ min/max روز', +-- `can_edit` = 0, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'price_extreme_date'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'منبع قیمت', +-- `can_edit` = 1, +-- `type` = 'select', +-- `description` = 'montzar,zaarbox,main_product,etehadie,taban_gohar', +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'price_provider'; UPDATE `settings` SET `title_fa` = 'باز/بسته خودکار محصول', `can_edit` = 1, @@ -702,15 +723,16 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'profit_gold_api_enabled'; -UPDATE `settings` SET - `title_fa` = 'مبلغ پاداش معرف', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'referral_bonus_amount'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'مبلغ پاداش معرف', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'referral_bonus_amount'; UPDATE `settings` SET `title_fa` = 'تعداد معرف برای هدیه', `can_edit` = 1, @@ -774,15 +796,16 @@ UPDATE `settings` SET `is_active` = 1, `updated_at` = NOW() WHERE `key` = 'sell_fee'; -UPDATE `settings` SET - `title_fa` = 'ارسال ته‌حساب', - `can_edit` = 0, - `type` = 'switch', - `description` = NULL, - `value` = 'false', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'send_to_tahesab'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'ارسال ته‌حساب', +-- `can_edit` = 0, +-- `type` = 'switch', +-- `description` = NULL, +-- `value` = 'false', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'send_to_tahesab'; UPDATE `settings` SET `title_fa` = 'آدرس API سرور', `can_edit` = 1, @@ -819,42 +842,46 @@ UPDATE `settings` SET `is_active` = 1, `updated_at` = NOW() WHERE `key` = 'tabanGohar_price'; -UPDATE `settings` SET - `title_fa` = 'حساب بانکی ته‌حساب', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = 'کشاورزي قلک', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'tahesab_bank_account'; -UPDATE `settings` SET - `title_fa` = 'دیتابیس ته‌حساب', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = 'TahesabDB5', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'tahesab_db'; -UPDATE `settings` SET - `title_fa` = 'توکن ته‌حساب', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = 'X4V2Q8J1C4P1A7P7P5K2E6X2U1L8D4E4Y8N5Q4O6N2R6L2H1W1S1W1N1E5F6A8F7N4U2X4J4B4R2R2W2', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'tahesab_token'; -UPDATE `settings` SET - `title_fa` = 'توکن بات تلگرام', - `can_edit` = 0, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'telegram_bot_token'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'حساب بانکی ته‌حساب', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = 'کشاورزي قلک', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'tahesab_bank_account'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'دیتابیس ته‌حساب', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = 'TahesabDB5', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'tahesab_db'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'توکن ته‌حساب', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = 'X4V2Q8J1C4P1A7P7P5K2E6X2U1L8D4E4Y8N5Q4O6N2R6L2H1W1S1W1N1E5F6A8F7N4U2X4J4B4R2R2W2', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'tahesab_token'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'توکن بات تلگرام', +-- `can_edit` = 0, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'telegram_bot_token'; UPDATE `settings` SET `title_fa` = '', `can_edit` = 1, @@ -882,42 +909,46 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'text_rule'; -UPDATE `settings` SET - `title_fa` = 'عنوان favicon', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'title_fav'; -UPDATE `settings` SET - `title_fa` = 'عنوان PWA', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'title_pwa'; -UPDATE `settings` SET - `title_fa` = 'بیشترین قیمت امروز', - `can_edit` = 0, - `type` = 'number', - `description` = 'ReportController', - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'up_price'; -UPDATE `settings` SET - `title_fa` = 'url زرباکس', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'zaarbox_api_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'عنوان favicon', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'title_fav'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'عنوان PWA', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'title_pwa'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'بیشترین قیمت امروز', +-- `can_edit` = 0, +-- `type` = 'number', +-- `description` = 'ReportController', +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'up_price'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'url زرباکس', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'zaarbox_api_url'; UPDATE `settings` SET `title_fa` = 'کد محصول زرباکس', `can_edit` = 1, diff --git a/database/sql/add_main_wallet_products_setting.sql b/database/sql/add_main_wallet_products_setting.sql index 369d473..4ebfe71 100644 --- a/database/sql/add_main_wallet_products_setting.sql +++ b/database/sql/add_main_wallet_products_setting.sql @@ -13,10 +13,12 @@ -- UPDATE `settings` SET `value` = '13,25' WHERE `key` = 'main_wallet_products'; -- ============================================================================ -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'main_wallet_products', '', 'محصولات متصل به کیف اصلی', 0, 1, - 'idهای محصول با کاما (مثل 13,25). موجودی این محصولات = gold کیف اصلی. خالی = غیرفعال' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'main_wallet_products' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'main_wallet_products', '', 'محصولات متصل به کیف اصلی', 0, 1, +-- 'idهای محصول با کاما (مثل 13,25). موجودی این محصولات = gold کیف اصلی. خالی = غیرفعال' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'main_wallet_products' LIMIT 1); -- اگر کلید از قبل وجود دارد، قابل ادیت نبودنش تضمین شود -UPDATE `settings` SET `can_edit` = 0 WHERE `key` = 'main_wallet_products'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `can_edit` = 0 WHERE `key` = 'main_wallet_products'; diff --git a/database/sql/add_tracking_systems_setting.sql b/database/sql/add_tracking_systems_setting.sql index 9633c5e..db9e7e1 100644 --- a/database/sql/add_tracking_systems_setting.sql +++ b/database/sql/add_tracking_systems_setting.sql @@ -1,27 +1,29 @@ -- سامانه‌های ردیابی (آنالیتیکس) — can_edit=0، مقدار JSON -INSERT INTO `settings` (`key`, `value`, `title_fa`, `type`, `can_edit`, `is_active`, `description`, `created_at`, `updated_at`) -SELECT - 'tracking_systems', - '[]', - 'سامانه‌های ردیابی', - 'longtext', - 0, - 1, - 'JSON: [{"type":"gtag","id":"G-XXXXXXX","enabled":true}] — type: gtag|gtm|clarity|custom', - NOW(), - NOW() -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tracking_systems' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `type`, `can_edit`, `is_active`, `description`, `created_at`, `updated_at`) +-- SELECT +-- 'tracking_systems', +-- '[]', +-- 'سامانه‌های ردیابی', +-- 'longtext', +-- 0, +-- 1, +-- 'JSON: [{"type":"gtag","id":"G-XXXXXXX","enabled":true}] — type: gtag|gtm|clarity|custom', +-- NOW(), +-- NOW() +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tracking_systems' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `type`, `can_edit`, `is_active`, `description`, `created_at`, `updated_at`) -SELECT - 'tracking_systems_enabled', - 'false', - 'نمایش سامانه‌های ردیابی', - 'switch', - 0, - 1, - 'روشن: اسکریپت‌های tracking_systems در اپ مشتری بارگذاری می‌شوند؛ خاموش: هیچ ردیابی فعال نیست', - NOW(), - NOW() -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tracking_systems_enabled' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `type`, `can_edit`, `is_active`, `description`, `created_at`, `updated_at`) +-- SELECT +-- 'tracking_systems_enabled', +-- 'false', +-- 'نمایش سامانه‌های ردیابی', +-- 'switch', +-- 0, +-- 1, +-- 'روشن: اسکریپت‌های tracking_systems در اپ مشتری بارگذاری می‌شوند؛ خاموش: هیچ ردیابی فعال نیست', +-- NOW(), +-- NOW() +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tracking_systems_enabled' LIMIT 1); diff --git a/database/sql/bazre_tala_settings_update.sql b/database/sql/bazre_tala_settings_update.sql index 7a80dc7..d853604 100644 --- a/database/sql/bazre_tala_settings_update.sql +++ b/database/sql/bazre_tala_settings_update.sql @@ -88,13 +88,15 @@ INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `de SELECT 'montzar_base_url', 'https://limangold.ir', 'آدرس سرور همکار', 1, 1, NULL WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_base_url' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'montzar_token', '', 'توکن همکار (سیستم)', 0, 1, 'خودکار پر می‌شود' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_token' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'montzar_token', '', 'توکن همکار (سیستم)', 0, 1, 'خودکار پر می‌شود' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_token' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'montzar_closed', 'false', 'بسته بودن سرویس همکار', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_closed' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'montzar_closed', 'false', 'بسته بودن سرویس همکار', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_closed' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) SELECT 'montzar_open_buy', 'true', 'باز بودن خرید همکار', 1, 1, NULL @@ -104,25 +106,30 @@ INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `de SELECT 'montzar_open_sell', 'true', 'باز بودن فروش همکار', 1, 1, NULL WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_open_sell' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'montzar_diff', '0', 'اختلاف قیمت همکار (سیستم)', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_diff' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'montzar_diff', '0', 'اختلاف قیمت همکار (سیستم)', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_diff' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'montzar_live_price', '0', 'قیمت لحظه‌ای همکار', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_live_price' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'montzar_live_price', '0', 'قیمت لحظه‌ای همکار', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_live_price' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'montzar_mazaneh', '0', 'مظنه همکار', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_mazaneh' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'montzar_mazaneh', '0', 'مظنه همکار', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_mazaneh' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'montzar_truly_buy_mazaneh', '0', 'مظنه خرید واقعی همکار', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_truly_buy_mazaneh' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'montzar_truly_buy_mazaneh', '0', 'مظنه خرید واقعی همکار', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_truly_buy_mazaneh' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'montzar_truly_sell_mazaneh', '0', 'مظنه فروش واقعی همکار', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_truly_sell_mazaneh' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'montzar_truly_sell_mazaneh', '0', 'مظنه فروش واقعی همکار', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_truly_sell_mazaneh' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) SELECT 'display_montzar', 'true', 'نمایش بلوک همکار در UI', 1, 1, NULL @@ -275,13 +282,15 @@ INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `de SELECT 'price_liman', 'false', 'دریافت قیمت از لیمان (legacy)', 1, 1, NULL, 'switch' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_liman' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'montzar_order_response', '[]', 'پاسخ سفارش همکار', 0, 1, NULL, 'longtext' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_order_response' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'montzar_order_response', '[]', 'پاسخ سفارش همکار', 0, 1, NULL, 'longtext' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_order_response' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'montzar_last_product_log', '{}', 'لاگ محصول همکار', 0, 1, NULL, 'longtext' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_last_product_log' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'montzar_last_product_log', '{}', 'لاگ محصول همکار', 0, 1, NULL, 'longtext' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_last_product_log' LIMIT 1); -- ----------------------------------------------------------------------------- -- const پر شده → settings خالی (مهاجرت؛ value پر overwrite نمی‌شود) @@ -392,34 +401,49 @@ UPDATE `settings` SET `title_fa` = 'نام فارسی', `type` = 'text UPDATE `settings` SET `title_fa` = 'نام انگلیسی', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'name_en'; UPDATE `settings` SET `title_fa` = 'آدرس اپ (کاربر)', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'app_url'; UPDATE `settings` SET `title_fa` = 'آدرس پایه سرور', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'bace_url'; -UPDATE `settings` SET `title_fa` = 'لوگوی ورود', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'logo_login'; -UPDATE `settings` SET `title_fa` = 'لوگوی ثبت‌نام', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'logo_register'; -UPDATE `settings` SET `title_fa` = 'آدرس پنل ادمین', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'admin_url'; -UPDATE `settings` SET `title_fa` = 'عنوان PWA', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'title_pwa'; -UPDATE `settings` SET `title_fa` = 'عنوان favicon', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'title_fav'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'لوگوی ورود', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'logo_login'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'لوگوی ثبت‌نام', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'logo_register'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'آدرس پنل ادمین', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'admin_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'عنوان PWA', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'title_pwa'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'عنوان favicon', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'title_fav'; UPDATE `settings` SET `title_fa` = 'متن قوانین', `type` = 'longtext', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'text_rule'; UPDATE `settings` SET `title_fa` = 'متن درباره ما', `type` = 'longtext', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'text_about'; -UPDATE `settings` SET `title_fa` = 'نوع فلز', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'metal_type'; -UPDATE `settings` SET `title_fa` = 'توکن ته‌حساب', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'tahesab_token'; -UPDATE `settings` SET `title_fa` = 'دیتابیس ته‌حساب', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'tahesab_db'; -UPDATE `settings` SET `title_fa` = 'حساب بانکی ته‌حساب', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'tahesab_bank_account'; -UPDATE `settings` SET `title_fa` = 'صفحه کسب درآمد', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'has_page_earn_money'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'نوع فلز', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'metal_type'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'توکن ته‌حساب', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'tahesab_token'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'دیتابیس ته‌حساب', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'tahesab_db'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'حساب بانکی ته‌حساب', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'tahesab_bank_account'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'صفحه کسب درآمد', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'has_page_earn_money'; UPDATE `settings` SET `title_fa` = 'صفحه صندوق', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'has_page_fund'; UPDATE `settings` SET `title_fa` = 'صفحه مجوزها', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'has_page_permission'; -UPDATE `settings` SET `title_fa` = 'صفحه هشدار قیمت', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'has_page_price_trigger'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'صفحه هشدار قیمت', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'has_page_price_trigger'; UPDATE `settings` SET `title_fa` = 'صفحه طلای فیزیکی', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'has_page_physical_gold'; UPDATE `settings` SET `title_fa` = 'رنگ اصلی', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'color_primary'; UPDATE `settings` SET `title_fa` = 'رنگ ثانویه', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'color_secondary'; UPDATE `settings` SET `title_fa` = 'چت', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'has_chat'; UPDATE `settings` SET `title_fa` = 'آدرس API سرور', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'server_url'; UPDATE `settings` SET `title_fa` = 'کلید اپ', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'key'; -UPDATE `settings` SET `title_fa` = 'توکن بات تلگرام', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'telegram_bot_token'; -UPDATE `settings` SET `title_fa` = 'توکن بات بله', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'bale_bot_token'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'توکن بات تلگرام', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'telegram_bot_token'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'توکن بات بله', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'bale_bot_token'; UPDATE `settings` SET `title_fa` = 'پیامک شارژ ادمین', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'charge_notif'; -UPDATE `settings` SET `title_fa` = 'پیامک گروهی', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'group_sms'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'پیامک گروهی', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'group_sms'; UPDATE `settings` SET `title_fa` = 'فعال‌سازی خودکار کاربر', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'auto_active_customer'; UPDATE `settings` SET `title_fa` = 'ثبت‌نام باز', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'open_register'; -UPDATE `settings` SET `title_fa` = 'ارسال اسناد به ته‌حساب', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'send_to_tahesab'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'ارسال اسناد به ته‌حساب', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'send_to_tahesab'; UPDATE `settings` SET `title_fa` = 'کد معرف اجباری (legacy)', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'is_requaire_referral'; UPDATE `settings` SET `title_fa` = 'کد معرف', `type` = 'select', `is_active` = COALESCE(`is_active`, 1), `description` = 'required = اجباری|required,' WHERE `key` = 'referral_id'; UPDATE `settings` SET `title_fa` = 'محدودیت دعوت', `type` = 'number', `is_active` = COALESCE(`is_active`, 0) WHERE `key` = 'referral_limit'; @@ -432,16 +456,21 @@ UPDATE `settings` SET `title_fa` = 'کارمزد رایگان (تعداد)', `ty UPDATE `settings` SET `title_fa` = 'کارمزد درصدی (legacy)', `type` = 'number', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'fee'; UPDATE `settings` SET `title_fa` = 'کارمزد درصدی', `type` = 'number', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'fee_service_charge_percentage'; UPDATE `settings` SET `title_fa` = 'کارمزد درصدی (alias)', `type` = 'number', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'service_charge_percentage'; -UPDATE `settings` SET `title_fa` = 'کارمزد ریالی', `type` = 'number', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'fee_cash'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'کارمزد ریالی', `type` = 'number', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'fee_cash'; UPDATE `settings` SET `title_fa` = 'اختلاف با قیمت واقعی', `type` = 'number', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'fee_single'; UPDATE `settings` SET `title_fa` = 'سود خرید', `type` = 'number', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'buy_fee'; UPDATE `settings` SET `title_fa` = 'سود فروش', `type` = 'number', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'sell_fee'; -UPDATE `settings` SET `title_fa` = 'منبع قیمت', `type` = 'select', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 1, `description` = 'montzar,zaarbox,main_product,etehadie,taban_gohar' WHERE `key` = 'price_provider'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'منبع قیمت', `type` = 'select', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 1, `description` = 'montzar,zaarbox,main_product,etehadie,taban_gohar' WHERE `key` = 'price_provider'; UPDATE `settings` SET `title_fa` = 'منبع قیمت (legacy)', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'price_primary_source'; -UPDATE `settings` SET `title_fa` = 'محصول آبشده', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 1 WHERE `key` = 'main_product'; -UPDATE `settings` SET `title_fa` = 'آدرس API Zaarbox', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 1 WHERE `key` = 'zaarbox_api_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'محصول آبشده', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 1 WHERE `key` = 'main_product'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'آدرس API Zaarbox', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 1 WHERE `key` = 'zaarbox_api_url'; UPDATE `settings` SET `title_fa` = 'شناسه ردیف Zaarbox', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 1 WHERE `key` = 'zaarbox_price_key'; -UPDATE `settings` SET `title_fa` = 'UUID نمودار Zaarbox', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 1 WHERE `key` = 'chart_id'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'UUID نمودار Zaarbox', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 1 WHERE `key` = 'chart_id'; UPDATE `settings` SET `title_fa` = 'آدرس API اتحادیه', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'etehadie_api_url'; UPDATE `settings` SET `title_fa` = 'دریافت قیمت از محصولات', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'main_product_price'; UPDATE `settings` SET `title_fa` = 'دریافت قیمت تابان‌گوهر', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'tabanGohar_price'; @@ -449,26 +478,41 @@ UPDATE `settings` SET `title_fa` = 'نشان دادن آخرین قیمت', `ty UPDATE `settings` SET `title_fa` = 'بستن قیمت در ساعات مشخص', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'close_price'; UPDATE `settings` SET `title_fa` = 'ساعت شروع', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'startDay'; UPDATE `settings` SET `title_fa` = 'ساعت پایان', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'endDay'; -UPDATE `settings` SET `title_fa` = 'بیشترین قیمت امروز', `type` = 'number', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'up_price'; -UPDATE `settings` SET `title_fa` = 'کمترین قیمت امروز', `type` = 'number', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'down_price'; -UPDATE `settings` SET `title_fa` = 'تاریخ min/max روز', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'price_extreme_date'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'بیشترین قیمت امروز', `type` = 'number', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'up_price'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'کمترین قیمت امروز', `type` = 'number', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'down_price'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'تاریخ min/max روز', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'price_extreme_date'; UPDATE `settings` SET `title_fa` = 'دریافت قیمت از همکار', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'montzar_price'; UPDATE `settings` SET `title_fa` = 'نمایش بلوک همکار', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'display_montzar'; UPDATE `settings` SET `title_fa` = 'شماره همراه همکار', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'montzar_mobile'; UPDATE `settings` SET `title_fa` = 'کلمه عبور همکار', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'montzar_password'; UPDATE `settings` SET `title_fa` = 'کد محصول همکار', `type` = 'number', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'montzar_product_id'; -UPDATE `settings` SET `title_fa` = 'آدرس API همکار', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_base_url'; -UPDATE `settings` SET `title_fa` = 'توکن همکار', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_token'; -UPDATE `settings` SET `title_fa` = 'بسته بودن سرویس همکار', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_closed'; -UPDATE `settings` SET `title_fa` = 'باز بودن خرید همکار', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_open_buy'; -UPDATE `settings` SET `title_fa` = 'باز بودن فروش همکار', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_open_sell'; -UPDATE `settings` SET `title_fa` = 'اختلاف قیمت همکار', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_diff'; -UPDATE `settings` SET `title_fa` = 'قیمت لحظه‌ای همکار', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_live_price'; -UPDATE `settings` SET `title_fa` = 'مظنه همکار', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_mazaneh'; -UPDATE `settings` SET `title_fa` = 'مظنه خرید واقعی همکار', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_truly_buy_mazaneh'; -UPDATE `settings` SET `title_fa` = 'مظنه فروش واقعی همکار', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_truly_sell_mazaneh'; -UPDATE `settings` SET `title_fa` = 'پاسخ سفارش همکار', `type` = 'longtext', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_order_response'; -UPDATE `settings` SET `title_fa` = 'لاگ محصول همکار', `type` = 'longtext', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_last_product_log'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'آدرس API همکار', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_base_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'توکن همکار', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_token'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'بسته بودن سرویس همکار', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_closed'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'باز بودن خرید همکار', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_open_buy'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'باز بودن فروش همکار', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_open_sell'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'اختلاف قیمت همکار', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_diff'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'قیمت لحظه‌ای همکار', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_live_price'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'مظنه همکار', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_mazaneh'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'مظنه خرید واقعی همکار', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_truly_buy_mazaneh'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'مظنه فروش واقعی همکار', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_truly_sell_mazaneh'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'پاسخ سفارش همکار', `type` = 'longtext', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_order_response'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'لاگ محصول همکار', `type` = 'longtext', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_last_product_log'; UPDATE `settings` SET `title_fa` = 'توکن لیمان (legacy)', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'liman_token'; UPDATE `settings` SET `title_fa` = 'رمز لیمان (legacy)', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'liman_password'; UPDATE `settings` SET `title_fa` = 'موبایل لیمان (legacy)', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'liman_mobile'; @@ -478,13 +522,16 @@ UPDATE `settings` SET `title_fa` = 'تأیید کارت با جیبیت', `type` UPDATE `settings` SET `title_fa` = 'تأیید کد ملی در ثبت‌نام', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'register_jibit_verify'; UPDATE `settings` SET `title_fa` = 'بروزرسانی قیمت در لیست', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'product_update_price_on_list'; UPDATE `settings` SET `title_fa` = 'باز/بسته خودکار محصول در لیست', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'product_auto_close_open_on_list'; -UPDATE `settings` SET `title_fa` = 'شناسه کلاینت API خارجی', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'node_client_id'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'شناسه کلاینت API خارجی', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'node_client_id'; UPDATE `settings` SET `title_fa` = 'کلید HMAC API خارجی', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'node_shared_secret'; -UPDATE `settings` SET `title_fa` = 'API سفارش خارجی', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'external_order_api_enabled'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'API سفارش خارجی', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'external_order_api_enabled'; UPDATE `settings` SET `title_fa` = 'پیام‌رسان پشتیبانی', `type` = 'select', `is_active` = COALESCE(`is_active`, 1), `description` = 'bale,telegram,whatsapp,rubika,eitaa,soroush' WHERE `key` = 'support_messenger'; UPDATE `settings` SET `title_fa` = 'شناسه پشتیبانی', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'support_messenger_id'; UPDATE `settings` SET `title_fa` = 'متن پشتیبانی', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'support_messenger_text'; -UPDATE `settings` SET `title_fa` = 'نام Montify', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'montify_name'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'نام Montify', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'montify_name'; UPDATE `settings` SET `title_fa` = 'API سود طلا', `type` = 'switch', `is_active` = COALESCE(`is_active`, 0) WHERE `key` = 'profit_gold_api_enabled'; -- const — عنوان فارسی diff --git a/database/sql/bourcecu_merge_goldali_catalog.sql b/database/sql/bourcecu_merge_goldali_catalog.sql index b1eab91..f9b07b9 100644 --- a/database/sql/bourcecu_merge_goldali_catalog.sql +++ b/database/sql/bourcecu_merge_goldali_catalog.sql @@ -98,12 +98,14 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'server_url' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'key', 'demogold', 'کلید داخلی اپ', 1, 1, NULL, 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'key' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'balance_report_exclude_customer_id', '', 'حذف مشتری از تراز ادمین', 0, 0, NULL, 'number' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'balance_report_exclude_customer_id' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'send_to_tahesab', 'false', 'ارسال ته‌حساب', 0, 1, NULL, 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'send_to_tahesab' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'balance_report_exclude_customer_id', '', 'حذف مشتری از تراز ادمین', 0, 0, NULL, 'number' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'balance_report_exclude_customer_id' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'send_to_tahesab', 'false', 'ارسال ته‌حساب', 0, 1, NULL, 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'send_to_tahesab' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'test*', '', '', 1, 0, 'تستی است', 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'test*' LIMIT 1); @@ -125,9 +127,10 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'min_first_buy' LIMIT 1 INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'montify_name', '', 'نام فروشگاه', 1, 0, 'RequestsController — اختیاری', 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montify_name' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'profit_gold_api_enabled', '', 'API سود طلا', 0, 0, NULL, 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'profit_gold_api_enabled' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'profit_gold_api_enabled', '', 'API سود طلا', 0, 0, NULL, 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'profit_gold_api_enabled' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'open_register', 'true', 'ثبت‌نام باز', 1, 1, NULL, 'switch' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'open_register' LIMIT 1); @@ -143,9 +146,10 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'buy_fee' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'sell_fee', '', 'سود/اختلاف فروش (ریال)', 1, 0, 'اگر خالی باشد از fee_single', 'number' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'sell_fee' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'referral_id', '', 'الزام کد معرف', 0, 0, 'required,', 'select' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'referral_id' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'referral_id', '', 'الزام کد معرف', 0, 0, 'required,', 'select' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'referral_id' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'fee_service_charge_percentage', '0.005', 'درصد کارمزد سفارش', 1, 1, 'مقدار نمونه: 0.07', 'number' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'fee_service_charge_percentage' LIMIT 1); @@ -164,12 +168,14 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_gateway_name' INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'payping_gateway_items', '', 'لیست item (چرخشی)', 1, 0, NULL, 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_gateway_items' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'payping_round_toman', '', 'گرد کردن مبلغ به تومان', 0, 0, NULL, 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_round_toman' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'payping_strict_failed_withdraw', '', 'اولویت تراکنش ناموفق', 0, 0, NULL, 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_strict_failed_withdraw' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'payping_round_toman', '', 'گرد کردن مبلغ به تومان', 0, 0, NULL, 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_round_toman' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'payping_strict_failed_withdraw', '', 'اولویت تراکنش ناموفق', 0, 0, NULL, 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_strict_failed_withdraw' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'montzar_closed', '', 'بسته بودن همکار', 1, 0, NULL, 'switch' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_closed' LIMIT 1); @@ -212,30 +218,36 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_product_id' LI INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'montzar_base_url', '', 'آدرس سرور همکار', 1, 0, NULL, 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_base_url' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'montzar_token', '', 'توکن همکار (خودکار)', 0, 0, NULL, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_token' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'montzar_token', '', 'توکن همکار (خودکار)', 0, 0, NULL, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_token' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'montzar_open_buy', '', 'باز بودن خرید همکار', 1, 0, NULL, 'switch' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_open_buy' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'montzar_open_sell', '', 'باز بودن فروش همکار', 1, 0, NULL, 'switch' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_open_sell' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'montzar_diff', '', 'اختلاف قیمت همکار', 0, 0, 'سیستم پر می‌کند', 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_diff' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'montzar_live_price', '', 'قیمت لحظه‌ای همکار', 0, 0, NULL, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_live_price' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'montzar_mazaneh', '', 'مظنه همکار', 0, 0, NULL, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_mazaneh' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'montzar_truly_buy_mazaneh', '', 'مظنه خرید همکار', 0, 0, NULL, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_truly_buy_mazaneh' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'montzar_truly_sell_mazaneh', '', 'مظنه فروش همکار', 0, 0, NULL, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_truly_sell_mazaneh' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'montzar_diff', '', 'اختلاف قیمت همکار', 0, 0, 'سیستم پر می‌کند', 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_diff' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'montzar_live_price', '', 'قیمت لحظه‌ای همکار', 0, 0, NULL, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_live_price' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'montzar_mazaneh', '', 'مظنه همکار', 0, 0, NULL, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_mazaneh' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'montzar_truly_buy_mazaneh', '', 'مظنه خرید همکار', 0, 0, NULL, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_truly_buy_mazaneh' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'montzar_truly_sell_mazaneh', '', 'مظنه فروش همکار', 0, 0, NULL, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_truly_sell_mazaneh' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'display_montzar', 'true', 'نمایش بلوک همکار در UI', 1, 1, NULL, 'switch' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'display_montzar' LIMIT 1); @@ -290,30 +302,36 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tahesab_db' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'tahesab_bank_account', 'کشاورزي قلک', 'حساب بانکی ته‌حساب', 1, 1, NULL, 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tahesab_bank_account' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'telegram_bot_token', '8140615853:AAGQj0yUIcWTTn1_exz2vn5TsgiUJFnVom8', 'توکن بات تلگرام', 0, 1, NULL, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'telegram_bot_token' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'bale_bot_token', '1212891021:F2IPeXI_oCA55pRDKkE300bd8DbkbqS0HGk', 'توکن بات بله', 0, 1, NULL, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'bale_bot_token' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'up_price', '22567500', 'بیشترین قیمت امروز', 0, 1, 'ReportController', 'number' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'up_price' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'down_price', '22567500', 'کمترین قیمت امروز', 0, 1, NULL, 'number' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'down_price' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'price_extreme_date', '2026-06-05', 'تاریخ min/max روز', 0, 1, NULL, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_extreme_date' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'telegram_bot_token', '8140615853:AAGQj0yUIcWTTn1_exz2vn5TsgiUJFnVom8', 'توکن بات تلگرام', 0, 1, NULL, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'telegram_bot_token' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'bale_bot_token', '1212891021:F2IPeXI_oCA55pRDKkE300bd8DbkbqS0HGk', 'توکن بات بله', 0, 1, NULL, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'bale_bot_token' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'up_price', '22567500', 'بیشترین قیمت امروز', 0, 1, 'ReportController', 'number' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'up_price' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'down_price', '22567500', 'کمترین قیمت امروز', 0, 1, NULL, 'number' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'down_price' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'price_extreme_date', '2026-06-05', 'تاریخ min/max روز', 0, 1, NULL, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_extreme_date' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'product_update_price_on_list', '', 'بروز قیمت در لیست محصول', 1, 0, NULL, 'switch' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'product_update_price_on_list' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'product_auto_close_open_on_list', '', 'باز/بسته خودکار محصول', 1, 0, NULL, 'switch' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'product_auto_close_open_on_list' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'metal_type', 'کاتد مس', 'عنوان فلز در UI', 0, 1, NULL, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'metal_type' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'metal_type', 'کاتد مس', 'عنوان فلز در UI', 0, 1, NULL, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'metal_type' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'payping_fin_sync_enabled', '', 'همگام‌سازی fin لیمان', 1, 0, NULL, 'switch' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_fin_sync_enabled' LIMIT 1); @@ -380,51 +398,56 @@ UPDATE `settings` SET `is_active` = 1, `updated_at` = NOW() WHERE `key` = 'bace_url'; -UPDATE `settings` SET - `title_fa` = '', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = 'logo_login', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'logo_login'; -UPDATE `settings` SET - `title_fa` = 'لوگوی صفحه ورود', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = 'logo_register', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'logo_register'; -UPDATE `settings` SET - `title_fa` = 'آدرس پنل ادمین', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = 'https://kh.montzar.ir/admin/', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'admin_url'; -UPDATE `settings` SET - `title_fa` = 'عنوان PWA', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'title_pwa'; -UPDATE `settings` SET - `title_fa` = 'عنوان favicon', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'title_fav'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = '', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = 'logo_login', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'logo_login'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'لوگوی صفحه ورود', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = 'logo_register', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'logo_register'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'آدرس پنل ادمین', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = 'https://kh.montzar.ir/admin/', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'admin_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'عنوان PWA', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'title_pwa'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'عنوان favicon', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'title_fav'; UPDATE `settings` SET `title_fa` = 'متن قوانین', `can_edit` = 1, @@ -452,15 +475,16 @@ UPDATE `settings` SET `is_active` = 1, `updated_at` = NOW() WHERE `key` = 'is_requaire_referral'; -UPDATE `settings` SET - `title_fa` = 'صفحه کسب درآمد', - `can_edit` = 1, - `type` = 'switch', - `description` = 'in server', - `value` = 'true', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'has_page_earn_money'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'صفحه کسب درآمد', +-- `can_edit` = 1, +-- `type` = 'switch', +-- `description` = 'in server', +-- `value` = 'true', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'has_page_earn_money'; UPDATE `settings` SET `title_fa` = 'صفحه صندوق', `can_edit` = 1, @@ -479,15 +503,16 @@ UPDATE `settings` SET `is_active` = 1, `updated_at` = NOW() WHERE `key` = 'has_page_permission'; -UPDATE `settings` SET - `title_fa` = 'صفحه هشدار قیمت', - `can_edit` = 1, - `type` = 'switch', - `description` = NULL, - `value` = 'true', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'has_page_price_trigger'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'صفحه هشدار قیمت', +-- `can_edit` = 1, +-- `type` = 'switch', +-- `description` = NULL, +-- `value` = 'true', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'has_page_price_trigger'; UPDATE `settings` SET `title_fa` = 'صفحه طلای فیزیکی', `can_edit` = 1, @@ -551,15 +576,16 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'balance_report_exclude_customer_id'; -UPDATE `settings` SET - `title_fa` = 'ارسال ته‌حساب', - `can_edit` = 0, - `type` = 'switch', - `description` = NULL, - `value` = 'false', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'send_to_tahesab'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'ارسال ته‌حساب', +-- `can_edit` = 0, +-- `type` = 'switch', +-- `description` = NULL, +-- `value` = 'false', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'send_to_tahesab'; UPDATE `settings` SET `title_fa` = '', `can_edit` = 1, @@ -587,15 +613,16 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'referral_count_for_gift'; -UPDATE `settings` SET - `title_fa` = 'مبلغ پاداش معرف', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'referral_bonus_amount'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'مبلغ پاداش معرف', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'referral_bonus_amount'; UPDATE `settings` SET `title_fa` = 'حداقل برداشت (ریال)', `can_edit` = 1, @@ -614,15 +641,16 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'min_first_buy'; -UPDATE `settings` SET - `title_fa` = 'نام فروشگاه', - `can_edit` = 1, - `type` = 'text', - `description` = 'RequestsController — اختیاری', - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'montify_name'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'نام فروشگاه', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = 'RequestsController — اختیاری', +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'montify_name'; UPDATE `settings` SET `title_fa` = 'API سود طلا', `can_edit` = 0, @@ -641,15 +669,16 @@ UPDATE `settings` SET `is_active` = 1, `updated_at` = NOW() WHERE `key` = 'open_register'; -UPDATE `settings` SET - `title_fa` = 'منبع قیمت', - `can_edit` = 1, - `type` = 'select', - `description` = 'montzar,zaarbox,main_product,etehadie,taban_gohar', - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'price_provider'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'منبع قیمت', +-- `can_edit` = 1, +-- `type` = 'select', +-- `description` = 'montzar,zaarbox,main_product,etehadie,taban_gohar', +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'price_provider'; UPDATE `settings` SET `title_fa` = 'اختلاف قیمت پایه (ریال)', `can_edit` = 1, @@ -731,24 +760,26 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'payping_gateway_name'; -UPDATE `settings` SET - `title_fa` = 'لیست item (چرخشی)', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'payping_gateway_items'; -UPDATE `settings` SET - `title_fa` = 'گرد کردن مبلغ به تومان', - `can_edit` = 0, - `type` = 'switch', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'payping_round_toman'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'لیست item (چرخشی)', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'payping_gateway_items'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'گرد کردن مبلغ به تومان', +-- `can_edit` = 0, +-- `type` = 'switch', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'payping_round_toman'; UPDATE `settings` SET `title_fa` = 'اولویت تراکنش ناموفق', `can_edit` = 0, @@ -767,24 +798,26 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'montzar_closed'; -UPDATE `settings` SET - `title_fa` = 'قیمت صفحه اصلی', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'main_product'; -UPDATE `settings` SET - `title_fa` = 'url زرباکس', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'zaarbox_api_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'قیمت صفحه اصلی', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'main_product'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'url زرباکس', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'zaarbox_api_url'; UPDATE `settings` SET `title_fa` = 'کد محصول زرباکس', `can_edit` = 1, @@ -794,15 +827,16 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'zaarbox_price_key'; -UPDATE `settings` SET - `title_fa` = 'UUID نمودار Zaarbox', - `can_edit` = 1, - `type` = 'text', - `description` = 'خالی = ca3800a0-1f57-3528-b963-178f9168e04f', - `value` = '8c19e06a-446e-3d56-9cc0-750f7c6cd767', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'chart_id'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'UUID نمودار Zaarbox', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = 'خالی = ca3800a0-1f57-3528-b963-178f9168e04f', +-- `value` = '8c19e06a-446e-3d56-9cc0-750f7c6cd767', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'chart_id'; UPDATE `settings` SET `title_fa` = 'آدرس API اتحادیه (پشتیبان)', `can_edit` = 1, @@ -875,15 +909,16 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'montzar_product_id'; -UPDATE `settings` SET - `title_fa` = 'آدرس سرور همکار', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'montzar_base_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'آدرس سرور همکار', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'montzar_base_url'; UPDATE `settings` SET `title_fa` = 'توکن همکار (خودکار)', `can_edit` = 0, @@ -1082,87 +1117,96 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'referral_limit'; -UPDATE `settings` SET - `title_fa` = 'پیامک گروهی', - `can_edit` = 1, - `type` = 'switch', - `description` = NULL, - `value` = 'false', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'group_sms'; -UPDATE `settings` SET - `title_fa` = 'توکن ته‌حساب', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = 'X4V2Q8J1C4P1A7P7P5K2E6X2U1L8D4E4Y8N5Q4O6N2R6L2H1W1S1W1N1E5F6A8F7N4U2X4J4B4R2R2W2', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'tahesab_token'; -UPDATE `settings` SET - `title_fa` = 'دیتابیس ته‌حساب', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = 'TahesabDB5', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'tahesab_db'; -UPDATE `settings` SET - `title_fa` = 'حساب بانکی ته‌حساب', - `can_edit` = 1, - `type` = 'text', - `description` = NULL, - `value` = 'کشاورزي قلک', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'tahesab_bank_account'; -UPDATE `settings` SET - `title_fa` = 'توکن بات تلگرام', - `can_edit` = 0, - `type` = 'text', - `description` = NULL, - `value` = '8140615853:AAGQj0yUIcWTTn1_exz2vn5TsgiUJFnVom8', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'telegram_bot_token'; -UPDATE `settings` SET - `title_fa` = 'توکن بات بله', - `can_edit` = 0, - `type` = 'text', - `description` = NULL, - `value` = '1212891021:F2IPeXI_oCA55pRDKkE300bd8DbkbqS0HGk', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'bale_bot_token'; -UPDATE `settings` SET - `title_fa` = 'بیشترین قیمت امروز', - `can_edit` = 0, - `type` = 'number', - `description` = 'ReportController', - `value` = '22567500', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'up_price'; -UPDATE `settings` SET - `title_fa` = 'کمترین قیمت امروز', - `can_edit` = 0, - `type` = 'number', - `description` = NULL, - `value` = '22567500', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'down_price'; -UPDATE `settings` SET - `title_fa` = 'تاریخ min/max روز', - `can_edit` = 0, - `type` = 'text', - `description` = NULL, - `value` = '2026-06-05', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'price_extreme_date'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'پیامک گروهی', +-- `can_edit` = 1, +-- `type` = 'switch', +-- `description` = NULL, +-- `value` = 'false', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'group_sms'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'توکن ته‌حساب', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = 'X4V2Q8J1C4P1A7P7P5K2E6X2U1L8D4E4Y8N5Q4O6N2R6L2H1W1S1W1N1E5F6A8F7N4U2X4J4B4R2R2W2', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'tahesab_token'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'دیتابیس ته‌حساب', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = 'TahesabDB5', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'tahesab_db'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'حساب بانکی ته‌حساب', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = 'کشاورزي قلک', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'tahesab_bank_account'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'توکن بات تلگرام', +-- `can_edit` = 0, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '8140615853:AAGQj0yUIcWTTn1_exz2vn5TsgiUJFnVom8', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'telegram_bot_token'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'توکن بات بله', +-- `can_edit` = 0, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '1212891021:F2IPeXI_oCA55pRDKkE300bd8DbkbqS0HGk', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'bale_bot_token'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'بیشترین قیمت امروز', +-- `can_edit` = 0, +-- `type` = 'number', +-- `description` = 'ReportController', +-- `value` = '22567500', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'up_price'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'کمترین قیمت امروز', +-- `can_edit` = 0, +-- `type` = 'number', +-- `description` = NULL, +-- `value` = '22567500', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'down_price'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'تاریخ min/max روز', +-- `can_edit` = 0, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = '2026-06-05', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'price_extreme_date'; UPDATE `settings` SET `title_fa` = 'بروز قیمت در لیست محصول', `can_edit` = 1, @@ -1181,24 +1225,26 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'product_auto_close_open_on_list'; -UPDATE `settings` SET - `title_fa` = 'عنوان فلز در UI', - `can_edit` = 0, - `type` = 'text', - `description` = NULL, - `value` = 'کاتد مس', - `is_active` = 1, - `updated_at` = NOW() -WHERE `key` = 'metal_type'; -UPDATE `settings` SET - `title_fa` = 'همگام‌سازی fin لیمان', - `can_edit` = 1, - `type` = 'switch', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'payping_fin_sync_enabled'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'عنوان فلز در UI', +-- `can_edit` = 0, +-- `type` = 'text', +-- `description` = NULL, +-- `value` = 'کاتد مس', +-- `is_active` = 1, +-- `updated_at` = NOW() +-- WHERE `key` = 'metal_type'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'همگام‌سازی fin لیمان', +-- `can_edit` = 1, +-- `type` = 'switch', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'payping_fin_sync_enabled'; UPDATE `settings` SET `title_fa` = 'URL fin', `can_edit` = 1, @@ -1217,15 +1263,16 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'payping_fin_token'; -UPDATE `settings` SET - `title_fa` = 'customer_id fin', - `can_edit` = 1, - `type` = 'number', - `description` = NULL, - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'payping_fin_customer_id'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'customer_id fin', +-- `can_edit` = 1, +-- `type` = 'number', +-- `description` = NULL, +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'payping_fin_customer_id'; UPDATE `settings` SET `title_fa` = 'item تکی (legacy)', `can_edit` = 1, @@ -1235,15 +1282,16 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'payping_gateway_item'; -UPDATE `settings` SET - `title_fa` = 'شناسه کلاینت API خارجی (X-Client-Id)', - `can_edit` = 1, - `type` = 'text', - `description` = 'مقدار قبلی .env: NODE_CLIENT_ID', - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'node_client_id'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'شناسه کلاینت API خارجی (X-Client-Id)', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = 'مقدار قبلی .env: NODE_CLIENT_ID', +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'node_client_id'; UPDATE `settings` SET `title_fa` = 'کلید امضای HMAC API خارجی', `can_edit` = 1, @@ -1253,15 +1301,16 @@ UPDATE `settings` SET `is_active` = 0, `updated_at` = NOW() WHERE `key` = 'node_shared_secret'; -UPDATE `settings` SET - `title_fa` = 'فعال‌سازی API سفارش خارجی (get_wallet / order)', - `can_edit` = 1, - `type` = 'text', - `description` = 'true + node_client_id + node_shared_secret', - `value` = '', - `is_active` = 0, - `updated_at` = NOW() -WHERE `key` = 'external_order_api_enabled'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'فعال‌سازی API سفارش خارجی (get_wallet / order)', +-- `can_edit` = 1, +-- `type` = 'text', +-- `description` = 'true + node_client_id + node_shared_secret', +-- `value` = '', +-- `is_active` = 0, +-- `updated_at` = NOW() +-- WHERE `key` = 'external_order_api_enabled'; -- ============================================================================= -- 3) اصلاح کلید خراب logo_login (در صورت وجود) diff --git a/database/sql/deploy_safe_schema.sql b/database/sql/deploy_safe_schema.sql index 365fe55..bb79cd7 100644 --- a/database/sql/deploy_safe_schema.sql +++ b/database/sql/deploy_safe_schema.sql @@ -366,24 +366,26 @@ AND NOT EXISTS ( -- موجودی این محصولات = gold کیف اصلی. خالی = غیرفعال (رفتار پیش‌فرض چندکیفه) -- مثال گلد علی: UPDATE settings SET value='13,25' WHERE `key`='main_wallet_products'; -- --------------------------------------------------------------------------- -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT - 'main_wallet_products', - '', - 'محصولات متصل به کیف اصلی', - 0, - 1, - 'idهای محصول با کاما (مثل 13,25). موجودی این محصولات = gold کیف اصلی. خالی = غیرفعال' -FROM DUAL -WHERE EXISTS ( - SELECT 1 FROM information_schema.TABLES - WHERE TABLE_SCHEMA = @db AND TABLE_NAME = 'settings' -) -AND NOT EXISTS ( - SELECT 1 FROM `settings` WHERE `key` = 'main_wallet_products' LIMIT 1 -); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT +-- 'main_wallet_products', +-- '', +-- 'محصولات متصل به کیف اصلی', +-- 0, +-- 1, +-- 'idهای محصول با کاما (مثل 13,25). موجودی این محصولات = gold کیف اصلی. خالی = غیرفعال' +-- FROM DUAL +-- WHERE EXISTS ( +-- SELECT 1 FROM information_schema.TABLES +-- WHERE TABLE_SCHEMA = @db AND TABLE_NAME = 'settings' +-- ) +-- AND NOT EXISTS ( +-- SELECT 1 FROM `settings` WHERE `key` = 'main_wallet_products' LIMIT 1 +-- ); -UPDATE `settings` SET `can_edit` = 0 WHERE `key` = 'main_wallet_products'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `can_edit` = 0 WHERE `key` = 'main_wallet_products'; -- --------------------------------------------------------------------------- -- products — نوع هزینه خرید/فروش: نقدی (ریال) یا درصدی diff --git a/database/sql/deploy_settings_const.sql b/database/sql/deploy_settings_const.sql index c425f7f..bd817af 100644 --- a/database/sql/deploy_settings_const.sql +++ b/database/sql/deploy_settings_const.sql @@ -16,6 +16,7 @@ -- • چند بار قابل اجرا (idempotent) -- • value / is_active ردیف‌های موجود هرگز دست نخورده — فقط INSERT برای کلید جدید -- • can_edit / title_fa / description / type هر deploy از این فایل به‌روز می‌شوند +-- • کلیدهای can_edit=0 (سوپرادمین) در این فایل کامنت شده‌اند — مالکیت: SuperAdminProgramSettingsOverlay -- • schema (جدول/ستون) فقط با migrate — نه این فایل -- -- ⚠️ هرگز UPDATE روی `value` برای ردیف موجود ننویس (مگر شرط خالی بودن صریح و مستند). @@ -178,13 +179,15 @@ INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `de SELECT 'admin_url', '', 'آدرس پنل ادمین', 1, 1, NULL, 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'admin_url' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'logo_login', '', 'لوگوی صفحه ورود', 0, 0, NULL, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'logo_login' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'logo_login', '', 'لوگوی صفحه ورود', 0, 0, NULL, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'logo_login' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'logo_register', '', 'لوگوی ثبت‌نام', 0, 0, NULL, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'logo_register' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'logo_register', '', 'لوگوی ثبت‌نام', 0, 0, NULL, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'logo_register' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'has_page_earn_money', 'false', 'صفحه کسب درآمد', 1, 1, NULL, 'switch' @@ -327,13 +330,15 @@ SELECT 'external_order_api_enabled', 'true', 'فعال‌سازی API سفارش WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'external_order_api_enabled' LIMIT 1); -- SSE قیمت (last/list از لاراول) -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'wss_enabled', 'true', 'قیمت لحظه‌ای (SSE)', 0, 1, 'روشن: اپ به sse_path وصل می‌شود؛ خاموش: polling /api/price/last و /customer/product/list', 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'wss_enabled' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'wss_enabled', 'true', 'قیمت لحظه‌ای (SSE)', 0, 1, 'روشن: اپ به sse_path وصل می‌شود؛ خاموش: polling /api/price/last و /customer/product/list', 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'wss_enabled' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'sse_path', '/api/price/stream', 'مسیر SSE قیمت', 0, 1, 'GET لاراول — استریم event:last و event:list با payload کامل', 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'sse_path' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'sse_path', '/api/price/stream', 'مسیر SSE قیمت', 0, 1, 'GET لاراول — استریم event:last و event:list با payload کامل', 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'sse_path' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'tracking_systems', '[]', 'سایت‌های ری‌گیری', 1, 1, @@ -345,13 +350,15 @@ SELECT 'tracking_systems_enabled', 'false', 'نمایش سایت‌های ری 'روشن: منوی «سایت‌های ری‌گیری» در ادمین و اپ مشتری نمایش داده می‌شود. خاموش: مخفی است.', 'switch' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tracking_systems_enabled' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'montify_name', '', 'نام فروشگاه در درگاه', 0, 1, NULL, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montify_name' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'montify_name', '', 'نام فروشگاه در درگاه', 0, 1, NULL, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montify_name' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'is_store', 'false', 'حالت فروشگاهی', 0, 1, 'فعال = سبد خرید، دسته‌بندی، حواله، تخفیف', 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'is_store' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'is_store', 'false', 'حالت فروشگاهی', 0, 1, 'فعال = سبد خرید، دسته‌بندی، حواله، تخفیف', 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'is_store' LIMIT 1); -- Jibit INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) @@ -388,53 +395,61 @@ INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `de SELECT 'charge_notif', 'true', 'پیامک شارژ ادمین', 1, 1, NULL WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'charge_notif' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'customer_direct_sms', 'false', 'پیامک تکی به مشتری از لیست', 0, 1, - 'روشن: در لیست مشتریان دکمه ارسال پیامک تکی نمایش داده می‌شود. خاموش: مخفی است. فقط از صفحه دیپلوی قابل تغییر است.', - 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'customer_direct_sms' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'customer_direct_sms', 'false', 'پیامک تکی به مشتری از لیست', 0, 1, +-- 'روشن: در لیست مشتریان دکمه ارسال پیامک تکی نمایش داده می‌شود. خاموش: مخفی است. فقط از صفحه دیپلوی قابل تغییر است.', +-- 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'customer_direct_sms' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'enable_conditional_order', 'false', 'سفارش شرطی', 0, 1, - 'روشن: قابلیت سفارش شرطی سراسری فعال است. خاموش: منو و ارزیابی اجرا نمی‌شود. فقط از دیپلوی قابل تغییر است.', - 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'enable_conditional_order' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'enable_conditional_order', 'false', 'سفارش شرطی', 0, 1, +-- 'روشن: قابلیت سفارش شرطی سراسری فعال است. خاموش: منو و ارزیابی اجرا نمی‌شود. فقط از دیپلوی قابل تغییر است.', +-- 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'enable_conditional_order' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'enable_product_funds', 'false', 'قلک محصول', 0, 1, - 'روشن: ساخت و مدیریت قلک per-product در اپ مشتری فعال است (یک محصول در هر قلک؛ انتقال بدون سند حسابداری). خاموش: منو و API ساخت قلک جدید در دسترس نیست. فقط از دیپلوی قابل تغییر است.', - 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'enable_product_funds' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'enable_product_funds', 'false', 'قلک محصول', 0, 1, +-- 'روشن: ساخت و مدیریت قلک per-product در اپ مشتری فعال است (یک محصول در هر قلک؛ انتقال بدون سند حسابداری). خاموش: منو و API ساخت قلک جدید در دسترس نیست. فقط از دیپلوی قابل تغییر است.', +-- 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'enable_product_funds' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'has_page_gift_card', 'false', 'کارت هدیه', 0, 1, - 'روشن: منوی «ثبت کارت هدیه» و صفحه ثبت کد در اپ کاربر فعال است. خاموش: منو و صفحه مخفی است و API استفاده از کد هدیه در دسترس نیست. فقط از دیپلوی قابل تغییر است.', - 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'has_page_gift_card' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'has_page_gift_card', 'false', 'کارت هدیه', 0, 1, +-- 'روشن: منوی «ثبت کارت هدیه» و صفحه ثبت کد در اپ کاربر فعال است. خاموش: منو و صفحه مخفی است و API استفاده از کد هدیه در دسترس نیست. فقط از دیپلوی قابل تغییر است.', +-- 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'has_page_gift_card' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'enable_customer_level_profit', 'false', 'سود چندسطحی معرف', 0, 1, - 'روشن: در لیست مشتریان آیکون تنظیم درصد سود هر سطح زیرمجموعه فعال است و پس از سفارش، سهم کارمزد طبق درصدهای هر معرف به کیف طلا واریز می‌شود. خاموش: آیکون و واریز سود چندسطحی غیرفعال است. فقط از دیپلوی قابل تغییر است.', - 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'enable_customer_level_profit' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'enable_customer_level_profit', 'false', 'سود چندسطحی معرف', 0, 1, +-- 'روشن: در لیست مشتریان آیکون تنظیم درصد سود هر سطح زیرمجموعه فعال است و پس از سفارش، سهم کارمزد طبق درصدهای هر معرف به کیف طلا واریز می‌شود. خاموش: آیکون و واریز سود چندسطحی غیرفعال است. فقط از دیپلوی قابل تغییر است.', +-- 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'enable_customer_level_profit' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'has_page_price_trigger', 'true', 'هشدار قیمت', 0, 1, - 'روشن: منوی هشدار قیمت در اپ کاربر نمایش داده می‌شود. خاموش: منو و صفحه مخفی است. فقط از دیپلوی قابل تغییر است.', - 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'has_page_price_trigger' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'has_page_price_trigger', 'true', 'هشدار قیمت', 0, 1, +-- 'روشن: منوی هشدار قیمت در اپ کاربر نمایش داده می‌شود. خاموش: منو و صفحه مخفی است. فقط از دیپلوی قابل تغییر است.', +-- 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'has_page_price_trigger' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'has_page_notification', 'true', 'اعلان داخل اپ', 0, 1, - 'روشن: زنگوله اعلان در اپ کاربر و منوی ثبت اعلان در ادمین فعال است. خاموش: مخفی است. فقط از دیپلوی قابل تغییر است.', - 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'has_page_notification' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'has_page_notification', 'true', 'اعلان داخل اپ', 0, 1, +-- 'روشن: زنگوله اعلان در اپ کاربر و منوی ثبت اعلان در ادمین فعال است. خاموش: مخفی است. فقط از دیپلوی قابل تغییر است.', +-- 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'has_page_notification' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'jibit_enabled', 'true', 'احراز هویت جیبیت', 0, 1, - 'روشن: سرویس احراز هویت جیبیت (تطبیق کد ملی/موبایل و کارت بانکی) فعال است. خاموش: هیچ فراخوانی به جیبیت انجام نمی‌شود و احراز هویت خودکار کار نمی‌کند. فقط از صفحه دیپلوی قابل تغییر است.', - 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'jibit_enabled' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'jibit_enabled', 'true', 'احراز هویت جیبیت', 0, 1, +-- 'روشن: سرویس احراز هویت جیبیت (تطبیق کد ملی/موبایل و کارت بانکی) فعال است. خاموش: هیچ فراخوانی به جیبیت انجام نمی‌شود و احراز هویت خودکار کار نمی‌کند. فقط از صفحه دیپلوی قابل تغییر است.', +-- 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'jibit_enabled' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'fee_conditional_order', '0', 'کارمزد سفارش شرطی', 1, 1, @@ -507,15 +522,17 @@ SELECT 'sms_notif_support_admin', 'true', 'پیامک پیام پشتیبانی 'روشن: وقتی مشتری اولین پیام خوانده‌نشده را در چت پشتیبانی می‌فرستد و ادمین همان اتاق را باز و visible ندارد، پیامک به ادمین‌های دارای «ارسال پیامک» می‌رود. خاموش: اعلان پیامک چت نمی‌رود.' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'sms_notif_support_admin' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'chat_webhook_secret', '', 'رمز وب‌هوک چت', 0, 1, - 'رمز مشترک بین لاراول و سرور چت برای اعلان پیام پشتیبانی. فقط سرور؛ در صورت خالی بودن به‌صورت خودکار ساخته می‌شود.', 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'chat_webhook_secret' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'chat_webhook_secret', '', 'رمز وب‌هوک چت', 0, 1, +-- 'رمز مشترک بین لاراول و سرور چت برای اعلان پیام پشتیبانی. فقط سرور؛ در صورت خالی بودن به‌صورت خودکار ساخته می‌شود.', 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'chat_webhook_secret' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'chat_webhook_base_url', '', 'آدرس پایه وب‌هوک چت', 0, 1, - 'اگر APP_URL فرانت است (مثلاً https://niazitala.ir) اینجا آدرس لاراول را بگذار (مثلاً https://niazitala.ir/server). خالی = همان APP_URL.', 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'chat_webhook_base_url' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'chat_webhook_base_url', '', 'آدرس پایه وب‌هوک چت', 0, 1, +-- 'اگر APP_URL فرانت است (مثلاً https://niazitala.ir) اینجا آدرس لاراول را بگذار (مثلاً https://niazitala.ir/server). خالی = همان APP_URL.', 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'chat_webhook_base_url' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) SELECT 'gift_for_referrer', '0.005', 'پاداش معرف', 1, 1, NULL @@ -549,115 +566,141 @@ INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `de SELECT 'referral_limit', '', 'محدودیت دعوت', 1, 1, NULL WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'referral_limit' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'group_sms', 'false', 'پیامک گروهی', 0, 1, - 'روشن: دکمه ارسال پیامک گروهی در پنل ادمین فعال است (ارسال ۱۰تایی). خاموش: ارسال پیامک گروهی غیرفعال است. فقط از تنظیمات پیشرفته.', - 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'group_sms' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'group_sms', 'false', 'پیامک گروهی', 0, 1, +-- 'روشن: دکمه ارسال پیامک گروهی در پنل ادمین فعال است (ارسال ۱۰تایی). خاموش: ارسال پیامک گروهی غیرفعال است. فقط از تنظیمات پیشرفته.', +-- 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'group_sms' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'customer_special_pricing', 'false', 'قیمت ویژه مشتری', 0, 1, - 'روشن: زیرمنوی قیمت ویژه در مشتریان و اعمال سود خرید/فروش پکیج روی مظنه و سفارش برای کاربران انتخاب‌شده. خاموش: غیرفعال. فقط از دیپلوی قابل تغییر است.', - 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'customer_special_pricing' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'customer_special_pricing', 'false', 'قیمت ویژه مشتری', 0, 1, +-- 'روشن: زیرمنوی قیمت ویژه در مشتریان و اعمال سود خرید/فروش پکیج روی مظنه و سفارش برای کاربران انتخاب‌شده. خاموش: غیرفعال. فقط از دیپلوی قابل تغییر است.', +-- 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'customer_special_pricing' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'sms_panel', 'true', 'پنل پیامک (کیف پول)', 0, 1, 'روشن: پنل پیامک و کیف پول billing فعال است. خاموش: پیامک‌ها مثل قبل ارسال می‌شوند بدون billing.', 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'sms_panel' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'sms_panel', 'true', 'پنل پیامک (کیف پول)', 0, 1, 'روشن: پنل پیامک و کیف پول billing فعال است. خاموش: پیامک‌ها مثل قبل ارسال می‌شوند بدون billing.', 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'sms_panel' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'tahesab_host', '', 'آدرس IP سرور ته‌حساب', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tahesab_host' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'tahesab_host', '', 'آدرس IP سرور ته‌حساب', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tahesab_host' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'tahesab_port', '', 'پورت سرور ته‌حساب', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tahesab_port' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'tahesab_port', '', 'پورت سرور ته‌حساب', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tahesab_port' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'tahesab_token', '', 'توکن ته‌حساب', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tahesab_token' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'tahesab_token', '', 'توکن ته‌حساب', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tahesab_token' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'tahesab_db', '', 'دیتابیس ته‌حساب', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tahesab_db' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'tahesab_db', '', 'دیتابیس ته‌حساب', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tahesab_db' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'tahesab_bank_account', '', 'حساب بانکی ته‌حساب', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tahesab_bank_account' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'tahesab_bank_account', '', 'حساب بانکی ته‌حساب', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tahesab_bank_account' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'send_to_tahesab', 'false', 'ارسال به ته‌حساب (قدیمی)', 0, 0, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'send_to_tahesab' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'send_to_tahesab', 'false', 'ارسال به ته‌حساب (قدیمی)', 0, 0, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'send_to_tahesab' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'accounting_provider', 'none', 'سیستم حسابداری', 0, 1, 'none,pargar,tahesab,zarin' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'accounting_provider' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'accounting_provider', 'none', 'سیستم حسابداری', 0, 1, 'none,pargar,tahesab,zarin' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'accounting_provider' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'zarin_api', '', 'آدرس API زرین', 0, 1, 'آدرس پایه وب‌سرویس زرین (بدون /ZarrinService/accounting).', 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'zarin_api' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'zarin_api', '', 'آدرس API زرین', 0, 1, 'آدرس پایه وب‌سرویس زرین (بدون /ZarrinService/accounting).', 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'zarin_api' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'zarin_token', '', 'توکن زرین', 0, 1, 'توکن مکمل API زرین که در نرم‌افزار زرین تعریف می‌شود.', 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'zarin_token' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'zarin_token', '', 'توکن زرین', 0, 1, 'توکن مکمل API زرین که در نرم‌افزار زرین تعریف می‌شود.', 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'zarin_token' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'zarin_noe_kar', '16', 'نوع کار پیش‌فرض زرین', 0, 1, 'کد noeKar هنگام ساخت کار ساخته در زرین. مقدار ۱۶ معمولاً گرمی است و برای sabtSanadTedadi مناسب نیست.', 'number' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'zarin_noe_kar' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'zarin_noe_kar', '16', 'نوع کار پیش‌فرض زرین', 0, 1, 'کد noeKar هنگام ساخت کار ساخته در زرین. مقدار ۱۶ معمولاً گرمی است و برای sabtSanadTedadi مناسب نیست.', 'number' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'zarin_noe_kar' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'zarin_noe_kar_tedadi', '17', 'نوع کار تعدادی زرین', 0, 1, 'noeKar برای سند تعدادی (سکه/شمش/گوی/مکعب). روی زرین معمولاً ۱۷=سکه-تعدادی یا ۱۸=اجرت تعدادی. اگر خالی/نامعتبر باشد کد از ۱۷ استفاده می‌کند.', 'number' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'zarin_noe_kar_tedadi' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'zarin_noe_kar_tedadi', '17', 'نوع کار تعدادی زرین', 0, 1, 'noeKar برای سند تعدادی (سکه/شمش/گوی/مکعب). روی زرین معمولاً ۱۷=سکه-تعدادی یا ۱۸=اجرت تعدادی. اگر خالی/نامعتبر باشد کد از ۱۷ استفاده می‌کند.', 'number' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'zarin_noe_kar_tedadi' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'zarin_gorohe_kar', '52', 'گروه کار پیش‌فرض زرین', 0, 1, 'کد gorooheKar هنگام ساخت/جستجوی کار در زرین. برای جداسازی چند پنل روی یک زرین، برای هر پنل مقدار متفاوت بگذارید.', 'number' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'zarin_gorohe_kar' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'zarin_gorohe_kar', '52', 'گروه کار پیش‌فرض زرین', 0, 1, 'کد gorooheKar هنگام ساخت/جستجوی کار در زرین. برای جداسازی چند پنل روی یک زرین، برای هر پنل مقدار متفاوت بگذارید.', 'number' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'zarin_gorohe_kar' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'zarin_name_g', 'مشتری نقدی (خریدار)', 'نام گروه حساب مشتریان زرین', 0, 1, 'پارامتر nameG در addhesab — گروه حساب زرین. برای اپ خانگی: مشتری نقدی (خریدار) = گروه ۶. گروه همکار استفاده نشود (مظنه متفاوت است).', 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'zarin_name_g' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'zarin_name_g', 'مشتری نقدی (خریدار)', 'نام گروه حساب مشتریان زرین', 0, 1, 'پارامتر nameG در addhesab — گروه حساب زرین. برای اپ خانگی: مشتری نقدی (خریدار) = گروه ۶. گروه همکار استفاده نشود (مظنه متفاوت است).', 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'zarin_name_g' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'zarin_uid_prefix', '', 'پیشوند عددی uid زرین', 0, 1, 'فقط عدد. وقتی چند پنل یک زرین دارند باید متفاوت باشد تا uid تکراری نشود.', 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'zarin_uid_prefix' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'zarin_uid_prefix', '', 'پیشوند عددی uid زرین', 0, 1, 'فقط عدد. وقتی چند پنل یک زرین دارند باید متفاوت باشد تا uid تکراری نشود.', 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'zarin_uid_prefix' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'send_to_pargar', 'false', 'ارسال به پرگار (قدیمی)', 0, 0, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'send_to_pargar' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'send_to_pargar', 'false', 'ارسال به پرگار (قدیمی)', 0, 0, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'send_to_pargar' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'pargar_username', '', 'نام کاربری API پرگار', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'pargar_username' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'pargar_username', '', 'نام کاربری API پرگار', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'pargar_username' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'pargar_password', '', 'رمز عبور API پرگار', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'pargar_password' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'pargar_password', '', 'رمز عبور API پرگار', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'pargar_password' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'pargar_api_token', '', 'توکن ثابت API پرگار', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'pargar_api_token' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'pargar_api_token', '', 'توکن ثابت API پرگار', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'pargar_api_token' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'pargar_item_id_rial', '0', 'کد کالای ریال پرگار', 0, 1, - 'کد کالا برای اسناد واریز/برداشت ریالی در پرگار. صفر = استفاده از کد طلا با وزن صفر.', 'number' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'pargar_item_id_rial' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'pargar_item_id_rial', '0', 'کد کالای ریال پرگار', 0, 1, +-- 'کد کالا برای اسناد واریز/برداشت ریالی در پرگار. صفر = استفاده از کد طلا با وزن صفر.', 'number' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'pargar_item_id_rial' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'pargar_item_id_gold', '11', 'کد کالای طلا پرگار', 0, 1, - 'کد کالای طلا (کیف اصلی / آبشده) در پرگار برای اسناد وزن‌دار.', 'number' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'pargar_item_id_gold' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'pargar_item_id_gold', '11', 'کد کالای طلا پرگار', 0, 1, +-- 'کد کالای طلا (کیف اصلی / آبشده) در پرگار برای اسناد وزن‌دار.', 'number' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'pargar_item_id_gold' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'telegram_bot_token', '', 'توکن بات تلگرام', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'telegram_bot_token' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'telegram_bot_token', '', 'توکن بات تلگرام', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'telegram_bot_token' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'bale_bot_token', '', 'توکن بات بله', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'bale_bot_token' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'bale_bot_token', '', 'توکن بات بله', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'bale_bot_token' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'rubika_bot_token', '', 'توکن بات روبیکا', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'rubika_bot_token' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'rubika_bot_token', '', 'توکن بات روبیکا', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'rubika_bot_token' LIMIT 1); -- =========================================================================== -- ارسال قیمت به کانال‌های پیام‌رسان (بله / تلگرام / روبیکا) @@ -666,10 +709,11 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'rubika_bot_token' LIMI -- • سیستمی (can_edit=0): مقصد ارسال هر پیام‌رسان (آیدی چنل/گروه) -- • توکن‌ها همان bale_bot_token / telegram_bot_token / rubika_bot_token (can_edit=0) -- =========================================================================== -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'price_channel_access', 'false', 'دسترسی ارسال قیمت به کانال', 0, 1, - 'روشن: گروه «ارسال قیمت به کانال» در تنظیمات عادی پنل دیده می‌شود. خاموش: مخفی است (فقط از تنظیمات پیشرفته).', 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_channel_access' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'price_channel_access', 'false', 'دسترسی ارسال قیمت به کانال', 0, 1, +-- 'روشن: گروه «ارسال قیمت به کانال» در تنظیمات عادی پنل دیده می‌شود. خاموش: مخفی است (فقط از تنظیمات پیشرفته).', 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_channel_access' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'price_channel_enabled', 'false', 'ارسال قیمت به کانال', 1, 1, @@ -713,20 +757,23 @@ SELECT 'price_channel_footer_link', '', 'لینک در پیام', 1, 1, 'لینک برای متغیر %لینک در قالب پیام. خالی = خط خالی.', 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_channel_footer_link' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'price_channel_bale_to', '', 'مقصد ارسال بله', 0, 1, - 'آیدی چنل/گروه بله برای ارسال قیمت (چند مقصد با ویرگول).', 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_channel_bale_to' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'price_channel_bale_to', '', 'مقصد ارسال بله', 0, 1, +-- 'آیدی چنل/گروه بله برای ارسال قیمت (چند مقصد با ویرگول).', 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_channel_bale_to' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'price_channel_telegram_to', '', 'مقصد ارسال تلگرام', 0, 1, - 'آیدی چنل/گروه تلگرام برای ارسال قیمت (چند مقصد با ویرگول).', 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_channel_telegram_to' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'price_channel_telegram_to', '', 'مقصد ارسال تلگرام', 0, 1, +-- 'آیدی چنل/گروه تلگرام برای ارسال قیمت (چند مقصد با ویرگول).', 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_channel_telegram_to' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'price_channel_rubika_to', '', 'مقصد ارسال روبیکا', 0, 1, - 'آیدی چنل/گروه روبیکا برای ارسال قیمت (چند مقصد با ویرگول).', 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_channel_rubika_to' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'price_channel_rubika_to', '', 'مقصد ارسال روبیکا', 0, 1, +-- 'آیدی چنل/گروه روبیکا برای ارسال قیمت (چند مقصد با ویرگول).', 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_channel_rubika_to' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'change_mesghal', '4.3318', 'وزن مثقال (گرم)', 1, 1, @@ -749,30 +796,35 @@ INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `de SELECT 'support_messenger', '', 'پیام‌رسان پشتیبانی', 1, 1, 'bale,telegram,whatsapp,rubika,eitaa,soroush' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'support_messenger' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'show_to_users_chat', 'deactivate', 'نمایش چت به کاربران', 0, 1, - 'روشن: قابلیت چت پشتیبانی برای این دیپلوی فعال است (منوی ادمین و پیش‌نیاز نمایش به کاربر). خاموش: چت در ادمین و اپ کاربر مخفی است و سوییچ «چت پشتیبانی» (has_chat) از تنظیمات عادی هم برداشته می‌شود.', 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'show_to_users_chat' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'show_to_users_chat', 'deactivate', 'نمایش چت به کاربران', 0, 1, +-- 'روشن: قابلیت چت پشتیبانی برای این دیپلوی فعال است (منوی ادمین و پیش‌نیاز نمایش به کاربر). خاموش: چت در ادمین و اپ کاربر مخفی است و سوییچ «چت پشتیبانی» (has_chat) از تنظیمات عادی هم برداشته می‌شود.', 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'show_to_users_chat' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'chat_api', '', 'API چت', 0, 1, - 'هاست سرور چت جدا (بدون https)، مثلاً chat.example.ir — برای WS و ساخت روم.', 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'chat_api' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'chat_api', '', 'API چت', 0, 1, +-- 'هاست سرور چت جدا (بدون https)، مثلاً chat.example.ir — برای WS و ساخت روم.', 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'chat_api' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'chat_api_key', '', 'کلید API چت', 0, 1, - 'کلید API سرور چت جدا.', 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'chat_api_key' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'chat_api_key', '', 'کلید API چت', 0, 1, +-- 'کلید API سرور چت جدا.', 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'chat_api_key' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'chat_upload_url', '', 'آدرس آپلود فایل چت', 0, 1, - 'URL کامل آپلود مدیا برای چت پشتیبانی.', 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'chat_upload_url' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'chat_upload_url', '', 'آدرس آپلود فایل چت', 0, 1, +-- 'URL کامل آپلود مدیا برای چت پشتیبانی.', 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'chat_upload_url' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'chat_download_url', '', 'آدرس دانلود فایل چت', 0, 1, - 'پایهٔ URL دانلود/نمایش فایل‌های چت پشتیبانی.', 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'chat_download_url' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'chat_download_url', '', 'آدرس دانلود فایل چت', 0, 1, +-- 'پایهٔ URL دانلود/نمایش فایل‌های چت پشتیبانی.', 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'chat_download_url' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'has_chat', 'true', 'چت پشتیبانی', 1, 1, @@ -830,82 +882,96 @@ SELECT 'deposit_support_message_text', 'شماره حساب', 'متن پیام WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'deposit_support_message_text' LIMIT 1); -- min/max قیمت روز (سیستم) -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'up_price', '0', 'بیشترین قیمت امروز', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'up_price' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'up_price', '0', 'بیشترین قیمت امروز', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'up_price' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'down_price', '0', 'کمترین قیمت امروز', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'down_price' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'down_price', '0', 'کمترین قیمت امروز', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'down_price' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'price_extreme_date', '', 'تاریخ min/max روز', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_extreme_date' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'price_extreme_date', '', 'تاریخ min/max روز', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_extreme_date' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'metal_type', 'طلای آبشده', 'عنوان فلز در UI', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'metal_type' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'metal_type', 'طلای آبشده', 'عنوان فلز در UI', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'metal_type' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'main_metal', 'طلا', 'نام فلز اصلی (ادمین)', 0, 1, NULL, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'main_metal' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'main_metal', 'طلا', 'نام فلز اصلی (ادمین)', 0, 1, NULL, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'main_metal' LIMIT 1); -- --------------------------------------------------------------------------- -- درگاه شارژ آنلاین (Montify / external_payment) — فقط تنظیمات پیشرفته (can_edit=0) -- پیش‌فرض enabled خاموش؛ value ردیف موجود دست نخورده می‌ماند. -- --------------------------------------------------------------------------- -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'external_payment_enabled', 'false', 'فعال‌سازی شارژ آنلاین', 0, 1, - 'روشن: در صورت کامل بودن BASE_URL و client_id و client_secret و gateway، دکمه پرداخت آنلاین در اپ نمایش داده می‌شود. خاموش: فقط واریز دستی.', - 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'external_payment_enabled' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'external_payment_enabled', 'false', 'فعال‌سازی شارژ آنلاین', 0, 1, +-- 'روشن: در صورت کامل بودن BASE_URL و client_id و client_secret و gateway، دکمه پرداخت آنلاین در اپ نمایش داده می‌شود. خاموش: فقط واریز دستی.', +-- 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'external_payment_enabled' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'wallet_payment_provider', 'none', 'نوع درگاه شارژ آنلاین', 0, 1, - 'none=خاموش، montify=پارتنر Montify|none,montify', - 'select' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'wallet_payment_provider' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'wallet_payment_provider', 'none', 'نوع درگاه شارژ آنلاین', 0, 1, +-- 'none=خاموش، montify=پارتنر Montify|none,montify', +-- 'select' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'wallet_payment_provider' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'external_payment_base_url', '', 'آدرس API درگاه (BASE_URL)', 0, 1, - 'آدرس پایه API سرویس Montify (بدون اسلش انتهایی)، مثلاً https://node.example.com — فقط سرور؛ در اپ کاربر ارسال نمی‌شود.', - 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'external_payment_base_url' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'external_payment_base_url', '', 'آدرس API درگاه (BASE_URL)', 0, 1, +-- 'آدرس پایه API سرویس Montify (بدون اسلش انتهایی)، مثلاً https://node.example.com — فقط سرور؛ در اپ کاربر ارسال نمی‌شود.', +-- 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'external_payment_base_url' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'external_payment_client_id', '', 'شناسه کلاینت (client_id)', 0, 1, - 'شناسه partner (client_id) — فقط سرور؛ در اپ کاربر یا پاسخ get_settings عمومی نیست.', - 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'external_payment_client_id' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'external_payment_client_id', '', 'شناسه کلاینت (client_id)', 0, 1, +-- 'شناسه partner (client_id) — فقط سرور؛ در اپ کاربر یا پاسخ get_settings عمومی نیست.', +-- 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'external_payment_client_id' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'external_payment_client_secret', '', 'رمز کلاینت (client_secret)', 0, 1, - 'رمز مخفی partner (client_secret) — فقط سرور. در فرانت و Network تب کاربر دیده نمی‌شود.', - 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'external_payment_client_secret' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'external_payment_client_secret', '', 'رمز کلاینت (client_secret)', 0, 1, +-- 'رمز مخفی partner (client_secret) — فقط سرور. در فرانت و Network تب کاربر دیده نمی‌شود.', +-- 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'external_payment_client_secret' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'external_payment_gateway', 'zarinpall', 'نام درگاه داخل Montify', 0, 1, - 'نام درگاه فعال داخل Montify: zarinpall، zibal، payping یا sepal|zarinpall,zibal,payping,sepal', - 'select' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'external_payment_gateway' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'external_payment_gateway', 'zarinpall', 'نام درگاه داخل Montify', 0, 1, +-- 'نام درگاه فعال داخل Montify: zarinpall، zibal، payping یا sepal|zarinpall,zibal,payping,sepal', +-- 'select' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'external_payment_gateway' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'external_payment_return_url', '', 'آدرس برگشت (return_url)', 0, 1, - 'آدرس صفحه فرانت بعد از پرداخت. خالی = دامنه سایت + /wallet/payment-result', - 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'external_payment_return_url' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'external_payment_return_url', '', 'آدرس برگشت (return_url)', 0, 1, +-- 'آدرس صفحه فرانت بعد از پرداخت. خالی = دامنه سایت + /wallet/payment-result', +-- 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'external_payment_return_url' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'external_payment_webhook_url', '', 'آدرس Webhook', 0, 1, - 'آدرس بک‌اند برای webhook (شارژ قطعی کیف). خالی = مسیر پیش‌فرض سرور.', - 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'external_payment_webhook_url' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'external_payment_webhook_url', '', 'آدرس Webhook', 0, 1, +-- 'آدرس بک‌اند برای webhook (شارژ قطعی کیف). خالی = مسیر پیش‌فرض سرور.', +-- 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'external_payment_webhook_url' LIMIT 1); -- درگاه — کلیدهای اختیاری payping -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'payping_fin_sync_enabled', 'false', 'همگام‌سازی fin', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_fin_sync_enabled' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'payping_fin_sync_enabled', 'false', 'همگام‌سازی fin', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_fin_sync_enabled' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) SELECT 'payping_fin_url', 'https://limangold.ir/kernel/admin/fin', 'URL fin', 1, 1, NULL @@ -972,11 +1038,12 @@ SELECT 'fee_service_charge_percentage', '0.005', 'درصد کارمزد سفار WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'fee_service_charge_percentage' LIMIT 1); -- fee_deduct_from_gold: value پیش‌فرض false فقط در INSERT اولیه؛ اجرای مجدد value/is_active را overwrite نمی‌کند -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'fee_deduct_from_gold', 'false', 'اعمال مبلغ دقیق در معامله مشتری', 0, 1, - 'روشن: مشتری دقیقاً همان مبلغ یا وزنی را که وارد کرده دریافت می‌کند. در فروش، مثلاً ۱۰۰ میلیون ریال درخواست → همان ۱۰۰ میلیون واریز و کارمزد از طلای کیف کسر می‌شود. در خرید، مثلاً ۱۰ گرم درخواست → همان ۱۰ گرم واریز و کارمزد به ریال قابل پرداخت اضافه می‌شود. خاموش (پیش‌فرض): در فروش کارمزد از مبلغ ریالی واریزی کم می‌شود (مشتری مبلغ کمتری می‌گیرد). در خرید کارمزد از وزن طلای واریزی کم می‌شود (مشتری طلای کمتری می‌گیرد).', - 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'fee_deduct_from_gold' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'fee_deduct_from_gold', 'false', 'اعمال مبلغ دقیق در معامله مشتری', 0, 1, +-- 'روشن: مشتری دقیقاً همان مبلغ یا وزنی را که وارد کرده دریافت می‌کند. در فروش، مثلاً ۱۰۰ میلیون ریال درخواست → همان ۱۰۰ میلیون واریز و کارمزد از طلای کیف کسر می‌شود. در خرید، مثلاً ۱۰ گرم درخواست → همان ۱۰ گرم واریز و کارمزد به ریال قابل پرداخت اضافه می‌شود. خاموش (پیش‌فرض): در فروش کارمزد از مبلغ ریالی واریزی کم می‌شود (مشتری مبلغ کمتری می‌گیرد). در خرید کارمزد از وزن طلای واریزی کم می‌شود (مشتری طلای کمتری می‌گیرد).', +-- 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'fee_deduct_from_gold' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'min_withdraw', '', 'حداقل برداشت (ریال)', 1, 1, NULL, 'price' @@ -996,9 +1063,10 @@ INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `de SELECT 'minimum_sell', '', 'حداقل فروش', 1, 1, NULL, 'price' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'minimum_sell' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'referral_bonus_amount', '', 'مقدار پاداش معرف', 0, 1, NULL, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'referral_bonus_amount' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'referral_bonus_amount', '', 'مقدار پاداش معرف', 0, 1, NULL, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'referral_bonus_amount' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'balance_report_exclude_customer_id', '', 'حذف مشتری از تراز', 1, 1, NULL, 'text' @@ -1017,17 +1085,24 @@ UPDATE `settings` SET `title_fa` = 'نام فارسی اپ' WHERE `key` = 'name_ UPDATE `settings` SET `title_fa` = 'نام انگلیسی اپ' WHERE `key` = 'name_en' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'آدرس اپ (کاربر)' WHERE `key` = 'app_url' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'آدرس پایه' WHERE `key` = 'bace_url' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); -UPDATE `settings` SET `title_fa` = 'لوگوی صفحه ورود' WHERE `key` = 'logo_login' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); -UPDATE `settings` SET `title_fa` = 'لوگوی ثبت‌نام' WHERE `key` = 'logo_register' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); -UPDATE `settings` SET `title_fa` = 'آدرس پنل ادمین' WHERE `key` = 'admin_url' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); -UPDATE `settings` SET `title_fa` = 'عنوان PWA' WHERE `key` = 'title_pwa' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); -UPDATE `settings` SET `title_fa` = 'عنوان favicon' WHERE `key` = 'title_fav' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'لوگوی صفحه ورود' WHERE `key` = 'logo_login' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'لوگوی ثبت‌نام' WHERE `key` = 'logo_register' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'آدرس پنل ادمین' WHERE `key` = 'admin_url' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'عنوان PWA' WHERE `key` = 'title_pwa' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'عنوان favicon' WHERE `key` = 'title_fav' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'متن قوانین' WHERE `key` = 'text_rule' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'متن درباره ما' WHERE `key` = 'text_about' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); -UPDATE `settings` SET `title_fa` = 'صفحه کسب درآمد' WHERE `key` = 'has_page_earn_money' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'صفحه کسب درآمد' WHERE `key` = 'has_page_earn_money' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'صفحه صندوق' WHERE `key` = 'has_page_fund' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'صفحه مجوزها' WHERE `key` = 'has_page_permission' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); -UPDATE `settings` SET `title_fa` = 'هشدار قیمت' WHERE `key` = 'has_page_price_trigger' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'هشدار قیمت' WHERE `key` = 'has_page_price_trigger' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'صفحه طلای فیزیکی' WHERE `key` = 'has_page_physical_gold' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'رنگ اصلی' WHERE `key` = 'color_primary' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'رنگ ثانویه' WHERE `key` = 'color_secondary' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); @@ -1036,31 +1111,39 @@ UPDATE `settings` SET `title_fa` = 'چت پشتیبانی' WHERE `key` = 'has_ch UPDATE `settings` SET `title_fa` = 'آدرس API سرور' WHERE `key` = 'server_url' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'کلید داخلی اپ' WHERE `key` = 'key' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'تعداد معرف برای هدیه' WHERE `key` = 'referral_count_for_gift' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); -UPDATE `settings` SET `title_fa` = 'مقدار پاداش معرف' WHERE `key` = 'referral_bonus_amount' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = '' OR `title_fa` = 'مبلغ پاداش معرف'); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'مقدار پاداش معرف' WHERE `key` = 'referral_bonus_amount' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = '' OR `title_fa` = 'مبلغ پاداش معرف'); UPDATE `settings` SET `title_fa` = 'حداقل برداشت (ریال)' WHERE `key` = 'min_withdraw' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'حداقل واریز کیف پول (ریال)' WHERE `key` = 'min_deposit' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'حداقل اولین خرید (ریال)' WHERE `key` = 'min_first_buy' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `value` = '1000000' WHERE `key` = 'min_deposit' AND (`value` IS NULL OR TRIM(`value`) = ''); UPDATE `settings` SET `title_fa` = 'حداقل فروش' WHERE `key` = 'minimum_sell' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'ثبت‌نام باز' WHERE `key` = 'open_register' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); -UPDATE `settings` SET `title_fa` = 'ارسال به ته‌حساب' WHERE `key` = 'send_to_tahesab' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); -UPDATE `settings` SET `title_fa` = 'گرد کردن تومان پی‌پینگ' WHERE `key` = 'payping_round_toman' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'ارسال به ته‌حساب' WHERE `key` = 'send_to_tahesab' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'گرد کردن تومان پی‌پینگ' WHERE `key` = 'payping_round_toman' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'برداشت ناموفق سخت‌گیرانه' WHERE `key` = 'payping_strict_failed_withdraw' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'وضعیت فروشگاه' WHERE `key` = 'store_status' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); -UPDATE `settings` SET `title_fa` = 'حالت فروشگاهی' WHERE `key` = 'is_store' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); -UPDATE `settings` SET `title_fa` = 'محصولات متصل به کیف اصلی' WHERE `key` = 'main_wallet_products' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'حالت فروشگاهی' WHERE `key` = 'is_store' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'محصولات متصل به کیف اصلی' WHERE `key` = 'main_wallet_products' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'واحد وزن' WHERE `key` = 'unit' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'حذف مشتری از تراز' WHERE `key` = 'balance_report_exclude_customer_id' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); -UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'منبع قیمت'), - `description` = 'منبع فعال قیمت|montzar,zaarbox,main_product' -WHERE `key` = 'price_provider'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'منبع قیمت'), +-- `description` = 'منبع فعال قیمت|montzar,zaarbox,main_product' +-- WHERE `key` = 'price_provider'; -UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'محصول / UUID تابلو') -WHERE `key` = 'main_product'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'محصول / UUID تابلو') +-- WHERE `key` = 'main_product'; -UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'آدرس API Zaarbox') -WHERE `key` = 'zaarbox_api_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'آدرس API Zaarbox') +-- WHERE `key` = 'zaarbox_api_url'; UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'شناسه ردیف Zaarbox') WHERE `key` = 'zaarbox_price_key'; @@ -1080,26 +1163,31 @@ WHERE `key` = 'jibit_verification'; UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'تأیید ثبت‌نام جیبیت') WHERE `key` = 'register_jibit_verify'; -UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'شناسه کلاینت API خارجی') -WHERE `key` = 'node_client_id'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'شناسه کلاینت API خارجی') +-- WHERE `key` = 'node_client_id'; UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'کلید HMAC API خارجی') WHERE `key` = 'node_shared_secret'; -UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'API سفارش خارجی') -WHERE `key` = 'external_order_api_enabled'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'API سفارش خارجی') +-- WHERE `key` = 'external_order_api_enabled'; -UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'قیمت لحظه‌ای (SSE)') -WHERE `key` = 'wss_enabled'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'قیمت لحظه‌ای (SSE)') +-- WHERE `key` = 'wss_enabled'; -UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'مسیر SSE قیمت') -WHERE `key` = 'sse_path'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'مسیر SSE قیمت') +-- WHERE `key` = 'sse_path'; UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'بسته بودن همکار') WHERE `key` = 'montzar_closed'; -UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'نام فروشگاه در درگاه') -WHERE `key` = 'montify_name'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'نام فروشگاه در درگاه') +-- WHERE `key` = 'montify_name'; -- ============================================================================= -- CONST — کلیدهای مورد استفاده کد @@ -1140,14 +1228,16 @@ WHERE `key` = 'main_product'; -- longtext UPDATE `settings` SET `type` = 'longtext' WHERE `key` IN ( - 'text_rule', 'text_about', 'support_messenger_text', 'invite_link_text', + 'text_rule', 'text_about', 'about_software', 'enamad_url', 'support_messenger_text', 'invite_link_text', 'deposit_support_message_text', 'price_channel_message_text', 'montzar_order_response', 'montzar_last_product_log', 'tracking_systems' ); -- select (+ گزینه‌ها در description) -UPDATE `settings` SET `type` = 'select', `description` = 'none,pargar,tahesab,zarin' WHERE `key` = 'accounting_provider'; -UPDATE `settings` SET `type` = 'select', `description` = 'منبع فعال قیمت|montzar,zaarbox,main_product' WHERE `key` = 'price_provider'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `type` = 'select', `description` = 'none,pargar,tahesab,zarin' WHERE `key` = 'accounting_provider'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `type` = 'select', `description` = 'منبع فعال قیمت|montzar,zaarbox,main_product' WHERE `key` = 'price_provider'; UPDATE `settings` SET `type` = 'switch', `title_fa` = 'کد معرف اجباری', `description` = 'روشن = اجباری در ثبت‌نام | خاموش = اختیاری' WHERE `key` = 'referral_id'; UPDATE `settings` SET `type` = 'switch', `title_fa` = 'نمایش فیلد کد معرف', `description` = 'روشن: فیلد کد معرف در صفحه ثبت‌نام اپ کاربر نمایش داده می‌شود. خاموش: فیلد مخفی است (لینک دعوت با ?id= همچنان اعمال می‌شود).' WHERE `key` = 'referral_show'; UPDATE `settings` SET `type` = 'select', `description` = 'sepal,' WHERE `key` = 'payping_gateway_name'; @@ -1232,13 +1322,15 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_provider' LIMIT -- حذف alias قدیمی؛ منبع واحد: fee_service_charge_percentage DELETE FROM `settings` WHERE `key` = 'service_charge_percentage'; -INSERT INTO `settings` (`key`, `title_fa`, `value`, `can_edit`, `is_exist`, `is_active`, `type`) -SELECT 'title_pwa', 'عنوان PWA', '', 0, 0, 0, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'title_pwa' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `title_fa`, `value`, `can_edit`, `is_exist`, `is_active`, `type`) +-- SELECT 'title_pwa', 'عنوان PWA', '', 0, 0, 0, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'title_pwa' LIMIT 1); -INSERT INTO `settings` (`key`, `title_fa`, `value`, `can_edit`, `is_exist`, `is_active`, `type`) -SELECT 'title_fav', 'عنوان favicon', '', 0, 0, 0, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'title_fav' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `title_fa`, `value`, `can_edit`, `is_exist`, `is_active`, `type`) +-- SELECT 'title_fav', 'عنوان favicon', '', 0, 0, 0, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'title_fav' LIMIT 1); INSERT INTO `settings` (`key`, `title_fa`, `value`, `can_edit`, `is_exist`, `is_active`, `type`) SELECT 'text_rule', 'متن قوانین', '', 1, 0, 1, 'longtext' @@ -1248,6 +1340,16 @@ INSERT INTO `settings` (`key`, `title_fa`, `value`, `can_edit`, `is_exist`, `is_ SELECT 'text_about', 'متن درباره ما', '', 1, 0, 1, 'longtext' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'text_about' LIMIT 1); +INSERT INTO `settings` (`key`, `title_fa`, `value`, `can_edit`, `is_exist`, `is_active`, `type`) +SELECT 'about_software', 'متن درباره نرم‌افزار', '', 1, 0, 1, 'longtext' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'about_software' LIMIT 1); + +UPDATE `settings` SET `key` = 'about_software' WHERE `key` = 'text_about_extra'; + +INSERT INTO `settings` (`key`, `title_fa`, `value`, `can_edit`, `is_exist`, `is_active`, `type`) +SELECT 'enamad_url', 'آدرس اینماد', '', 1, 0, 1, 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'enamad_url' LIMIT 1); + INSERT INTO `settings` (`key`, `title_fa`, `value`, `can_edit`, `is_exist`, `is_active`, `type`) SELECT 'zaarbox_api_url', 'آدرس API تابلو Zaarbox', '', 1, 0, 1, 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'zaarbox_api_url' LIMIT 1); @@ -1269,30 +1371,33 @@ SELECT 'unit', '', 'واحد وزن دارایی و معاملات', 1, 1, 'واحد نمایش وزن فلز در دارایی‌ها، کیف پول و تراکنش‌ها|گرم,کیلوگرم', 'select' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'unit' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'main_wallet_products', '13', 'محصولات متصل به کیف اصلی', 0, 1, - 'محصولاتی که موجودی‌شان از کیف طلای اصلی خوانده می‌شود. چند محصول با کاما. پیش‌فرض: 13' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'main_wallet_products' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'main_wallet_products', '13', 'محصولات متصل به کیف اصلی', 0, 1, +-- 'محصولاتی که موجودی‌شان از کیف طلای اصلی خوانده می‌شود. چند محصول با کاما. پیش‌فرض: 13' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'main_wallet_products' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'require_zero_main_gold_before_other_buy', 'true', 'الزام صفر بودن کیف اصلی قبل از خرید محصول دیگر', 1, 1, 'روشن: اگر مانده طلای کیف اصلی صفر یا زیر صفر باشد (بدهی)، مشتری ابتدا باید آبشده/مانده کیف اصلی را صفر کند و بعد می‌تواند محصول دیگر بخرد. خاموش: بدون این محدودیت. معامله خودِ محصولات کیف اصلی همیشه مجاز است.', 'switch' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'require_zero_main_gold_before_other_buy' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'apk_download_link', '', 'لینک دانلود اپ اندروید', 0, 1, - 'آدرس کامل فایل APK اندروید (https). اگر خالی باشد لینک دانلود در اپ نمایش داده نمی‌شود.', 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'apk_download_link' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'apk_download_link', '', 'لینک دانلود اپ اندروید', 0, 1, +-- 'آدرس کامل فایل APK اندروید (https). اگر خالی باشد لینک دانلود در اپ نمایش داده نمی‌شود.', 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'apk_download_link' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'banner_enabled', 'true', 'نمایش بنرها', 1, 1, 'روشن: منوی «بنرها» در ادمین و اسلایدر صفحه اصلی اپ مشتری نمایش داده می‌شود. خاموش: مخفی است (محتوای بنر از همان منو مدیریت می‌شود).', 'switch' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'banner_enabled' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'permision__enabled', 'false', 'نمایش منوی مجوزها', 0, 1, - 'روشن: آیتم «مجوز ها» در منوی تنظیمات اپ خانگی (تم جدید) نمایش داده می‌شود. خاموش: مخفی است.', 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'permision__enabled' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'permision__enabled', 'false', 'نمایش منوی مجوزها', 0, 1, +-- 'روشن: آیتم «مجوز ها» در منوی تنظیمات اپ خانگی (تم جدید) نمایش داده می‌شود. خاموش: مخفی است.', 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'permision__enabled' LIMIT 1); -- --------------------------------------------------------------------------- -- const — کلیدهای اضافی @@ -1352,8 +1457,9 @@ UPDATE `settings` SET `description` = NULL WHERE LOWER(TRIM(COALESCE(`description`, ''))) IN ('true', 'false', '0', '1', 'yes', 'no', 'in server') OR TRIM(COALESCE(`description`, '')) LIKE 'count of%'; -UPDATE `settings` SET `description` = 'منبع فعال قیمت. montzar = همکار|montzar,zaarbox,main_product' -WHERE `key` = 'price_provider'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'منبع فعال قیمت. montzar = همکار|montzar,zaarbox,main_product' +-- WHERE `key` = 'price_provider'; UPDATE `settings` SET `type` = 'switch', @@ -1380,7 +1486,8 @@ UPDATE `settings` SET `type` = 'number', `title_fa` = 'تعداد سفارش ا WHERE `key` = 'fee_free'; UPDATE `settings` SET `description` = 'تعداد سفارش اول بدون کارمزد' WHERE `key` = 'fee_free'; -UPDATE `settings` SET `description` = 'id یا reading_method محصول آبشده' WHERE `key` = 'main_product'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'id یا reading_method محصول آبشده' WHERE `key` = 'main_product'; UPDATE `settings` SET `title_fa` = 'شناسه پشتیبانی پیام‌رسان', @@ -1442,43 +1549,51 @@ UPDATE `settings` SET `description` = 'bale,telegram,whatsapp,rubika,eitaa,soroush' WHERE `key` = 'support_messenger'; -UPDATE `settings` SET - `title_fa` = 'آدرس IP سرور ته‌حساب', - `type` = 'text', - `description` = NULL -WHERE `key` = 'tahesab_host'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'آدرس IP سرور ته‌حساب', +-- `type` = 'text', +-- `description` = NULL +-- WHERE `key` = 'tahesab_host'; -UPDATE `settings` SET - `title_fa` = 'پورت سرور ته‌حساب', - `type` = 'number', - `description` = NULL -WHERE `key` = 'tahesab_port'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'پورت سرور ته‌حساب', +-- `type` = 'number', +-- `description` = NULL +-- WHERE `key` = 'tahesab_port'; -UPDATE `settings` SET - `title_fa` = 'نام دیتابیس ته‌حساب', - `type` = 'text', - `description` = 'مثال: TahesabDB' -WHERE `key` = 'tahesab_db'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'نام دیتابیس ته‌حساب', +-- `type` = 'text', +-- `description` = 'مثال: TahesabDB' +-- WHERE `key` = 'tahesab_db'; -UPDATE `settings` SET - `title_fa` = 'حساب بانکی ته‌حساب', - `type` = 'text', - `description` = 'نام حساب بانکی در سند واریز' -WHERE `key` = 'tahesab_bank_account'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'حساب بانکی ته‌حساب', +-- `type` = 'text', +-- `description` = 'نام حساب بانکی در سند واریز' +-- WHERE `key` = 'tahesab_bank_account'; -UPDATE `settings` SET `title_fa` = 'مقدار پاداش معرف' WHERE `key` = 'referral_bonus_amount'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'مقدار پاداش معرف' WHERE `key` = 'referral_bonus_amount'; UPDATE `settings` SET `type` = 'text' WHERE `key` = 'balance_report_exclude_customer_id'; -- پاکسازی title_fa / description از نام پروژه یا ارجاع کد -UPDATE `settings` SET `title_fa` = 'حالت فروشگاهی' -WHERE `key` = 'is_store' AND (`title_fa` LIKE '%قطره%' OR `title_fa` LIKE '%کشکول%'); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'حالت فروشگاهی' +-- WHERE `key` = 'is_store' AND (`title_fa` LIKE '%قطره%' OR `title_fa` LIKE '%کشکول%'); -UPDATE `settings` SET `title_fa` = 'همگام‌سازی fin' -WHERE `key` = 'payping_fin_sync_enabled' AND `title_fa` LIKE '%لیمان%'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'همگام‌سازی fin' +-- WHERE `key` = 'payping_fin_sync_enabled' AND `title_fa` LIKE '%لیمان%'; -UPDATE `settings` SET `title_fa` = 'نام فروشگاه در درگاه', `description` = 'نام فروشگاه که در درگاه پرداخت و رسید بانکی به کاربر نمایش داده می‌شود.' -WHERE `key` = 'montify_name'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'نام فروشگاه در درگاه', `description` = 'نام فروشگاه که در درگاه پرداخت و رسید بانکی به کاربر نمایش داده می‌شود.' +-- WHERE `key` = 'montify_name'; -- descriptionهای قدیمی که عمداً NULL می‌شدند — در بلوک پایانی بازنویسی می‌شوند @@ -1494,25 +1609,37 @@ UPDATE `const` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'لاگ -- --------------------------------------------------------------------------- UPDATE `settings` SET `description` = 'نام فارسی برند که در پیامک‌ها، عنوان صفحات و بخش‌های عمومی اپ کاربر نمایش داده می‌شود.' WHERE `key` = 'name_fa'; UPDATE `settings` SET `description` = 'آدرس کامل وب‌اپ کاربر (با https). در لینک‌های پیامک، بازگشت از درگاه و ارجاعات داخلی استفاده می‌شود.' WHERE `key` = 'app_url'; -UPDATE `settings` SET `description` = 'آدرس کامل پنل مدیریت (با https). برای لینک‌های ادمین و تنظیمات CORS در صورت نیاز.' WHERE `key` = 'admin_url'; -UPDATE `settings` SET `description` = 'آدرس تصویر لوگو در صفحه ورود. معمولاً از طریق دیپلوی یا آپلود فایل تنظیم می‌شود؛ در پنل قابل ویرایش نیست.' WHERE `key` = 'logo_login'; -UPDATE `settings` SET `description` = 'آدرس تصویر لوگو در صفحه ثبت‌نام. معمولاً از طریق دیپلوی تنظیم می‌شود؛ در پنل قابل ویرایش نیست.' WHERE `key` = 'logo_register'; -UPDATE `settings` SET `description` = 'عنوان کوتاه برای نصب PWA روی موبایل. از دیپلوی مدیریت می‌شود.' WHERE `key` = 'title_pwa'; -UPDATE `settings` SET `description` = 'عنوان نمایش‌داده‌شده در تب مرورگر (favicon). از دیپلوی مدیریت می‌شود.' WHERE `key` = 'title_fav'; -UPDATE `settings` SET `description` = 'عنوان فلز اصلی در رابط کاربر (مثلاً «طلای آبشده» یا «کاتد مس»). در دارایی، کیف پول و برچسب‌های معامله دیده می‌شود. فقط از دیپلوی/SQL تغییر می‌کند.' WHERE `key` = 'metal_type'; -UPDATE `settings` SET `title_fa` = 'نام فلز اصلی (ادمین)', `description` = 'نام کوتاه فلز برای برچسب‌های پنل ادمین (مثلاً «مس» یا «طلا»). «تراز طلایی» می‌شود «تراز مس» — نه «تراز مسی». فقط از دیپلوی/SQL تغییر می‌کند.' WHERE `key` = 'main_metal'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'آدرس کامل پنل مدیریت (با https). برای لینک‌های ادمین و تنظیمات CORS در صورت نیاز.' WHERE `key` = 'admin_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'آدرس تصویر لوگو در صفحه ورود. معمولاً از طریق دیپلوی یا آپلود فایل تنظیم می‌شود؛ در پنل قابل ویرایش نیست.' WHERE `key` = 'logo_login'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'آدرس تصویر لوگو در صفحه ثبت‌نام. معمولاً از طریق دیپلوی تنظیم می‌شود؛ در پنل قابل ویرایش نیست.' WHERE `key` = 'logo_register'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'عنوان کوتاه برای نصب PWA روی موبایل. از دیپلوی مدیریت می‌شود.' WHERE `key` = 'title_pwa'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'عنوان نمایش‌داده‌شده در تب مرورگر (favicon). از دیپلوی مدیریت می‌شود.' WHERE `key` = 'title_fav'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'عنوان فلز اصلی در رابط کاربر (مثلاً «طلای آبشده» یا «کاتد مس»). در دارایی، کیف پول و برچسب‌های معامله دیده می‌شود. فقط از دیپلوی/SQL تغییر می‌کند.' WHERE `key` = 'metal_type'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'نام فلز اصلی (ادمین)', `description` = 'نام کوتاه فلز برای برچسب‌های پنل ادمین (مثلاً «مس» یا «طلا»). «تراز طلایی» می‌شود «تراز مس» — نه «تراز مسی». فقط از دیپلوی/SQL تغییر می‌کند.' WHERE `key` = 'main_metal'; UPDATE `settings` SET `description` = 'واحد نمایش وزن در دارایی‌ها، کیف پول و جزئیات معاملات|گرم,کیلوگرم' WHERE `key` = 'unit'; UPDATE `settings` SET `description` = 'روشن: کاربران جدید می‌توانند ثبت‌نام کنند. خاموش: فقط ورود کاربران موجود مجاز است.' WHERE `key` = 'open_register'; UPDATE `settings` SET `description` = 'روشن: بعد از ثبت‌نام کاربر می‌تواند وارد اپ شود (بدون تأیید دستی ادمین). خاموش: ورود فقط بعد از فعال‌سازی دستی در پنل. این سوییچ اجازهٔ خرید/فروش نمی‌دهد — معامله فقط بعد از احراز هویت ممکن است.' WHERE `key` = 'auto_active_customer'; UPDATE `settings` SET `title_fa` = 'فعال‌سازی خودکار پس از ثبت‌نام' WHERE `key` = 'auto_active_customer'; -UPDATE `settings` SET `description` = 'نوع چیدمان اپ: روشن = حالت فروشگاهی (سبد، دسته‌بندی، حواله و …). خاموش = حالت معامله آبشده/محصولات کلاسیک. فقط از دیپلوی تغییر می‌کند.' WHERE `key` = 'is_store'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'نوع چیدمان اپ: روشن = حالت فروشگاهی (سبد، دسته‌بندی، حواله و …). خاموش = حالت معامله آبشده/محصولات کلاسیک. فقط از دیپلوی تغییر می‌کند.' WHERE `key` = 'is_store'; UPDATE `settings` SET `description` = 'روشن: نمودار قیمت از تاریخچه ذخیره‌شده در دیتابیس خودتان. خاموش: از سرویس تابلو آنلاین (با شناسه chart_id) استفاده می‌شود.' WHERE `key` = 'chart_use_local_data'; -UPDATE `settings` SET `description` = 'شناسه یکتا (UUID) نمودار در سرویس تابلو. اگر خالی باشد از شناسه پیش‌فرض سرویس استفاده می‌شود.' WHERE `key` = 'chart_id'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'شناسه یکتا (UUID) نمودار در سرویس تابلو. اگر خالی باشد از شناسه پیش‌فرض سرویس استفاده می‌شود.' WHERE `key` = 'chart_id'; -UPDATE `settings` SET `description` = 'منبع دریافت قیمت لحظه‌ای برای اپ کاربر و همگام‌سازی محصولات. مقدار montzar = قیمت از همکار (Montzar).|montzar,zaarbox,main_product' WHERE `key` = 'price_provider'; -UPDATE `settings` SET `description` = 'شناسه عددی یا نام reading_method محصول آبشده مرجع. وقتی منبع قیمت روی main_product باشد برای محاسبه استفاده می‌شود.' WHERE `key` = 'main_product'; -UPDATE `settings` SET `description` = 'آدرس سرور(های) فید قیمت (/api/free). تا ۵ آدرس (JSON آرایه) پشتیبانی می‌شود؛ اگر آدرس اول پاسخ ندهد به‌ترتیب سراغ بعدی می‌رود. مقدار تکی قبلی حفظ می‌شود.' WHERE `key` = 'zaarbox_api_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'منبع دریافت قیمت لحظه‌ای برای اپ کاربر و همگام‌سازی محصولات. مقدار montzar = قیمت از همکار (Montzar).|montzar,zaarbox,main_product' WHERE `key` = 'price_provider'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'شناسه عددی یا نام reading_method محصول آبشده مرجع. وقتی منبع قیمت روی main_product باشد برای محاسبه استفاده می‌شود.' WHERE `key` = 'main_product'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'آدرس سرور(های) فید قیمت (/api/free). تا ۵ آدرس (JSON آرایه) پشتیبانی می‌شود؛ اگر آدرس اول پاسخ ندهد به‌ترتیب سراغ بعدی می‌رود. مقدار تکی قبلی حفظ می‌شود.' WHERE `key` = 'zaarbox_api_url'; UPDATE `settings` SET `description` = 'کلید یا UUID ردیف قیمت در پاسخ API تابلو. باید با محصول/ردیف موردنظر در سرویس خارجی یکسان باشد.' WHERE `key` = 'zaarbox_price_key'; UPDATE `settings` SET `description` = 'روشن: اگر API قیمت در دسترس نباشد، آخرین قیمت ذخیره‌شده در دیتابیس به کاربر نشان داده می‌شود. خاموش: در قطعی API ممکن است قیمت صفر نمایش داده شود.' WHERE `key` = 'show_last_price'; UPDATE `settings` SET `description` = 'روشن: اگر آدرس API تابلو (zaarbox_api_url) تنظیم شده باشد، قیمت انس طلا در اپ مشتری نمایش داده می‌شود. خاموش: نمایش داده نمی‌شود.' WHERE `key` = 'show_gold_ounce_price'; @@ -1529,25 +1656,31 @@ UPDATE `settings` SET `description` = 'ساعت پایان فعالیت روزا UPDATE `settings` SET `description` = 'مبلغ اضافه (ریال) روی قیمت پایه برای سمت خرید. خالی یا صفر = بدون اختلاف.' WHERE `key` = 'buy_fee'; UPDATE `settings` SET `description` = 'مبلغ کسر (ریال) از قیمت پایه برای سمت فروش. خالی یا صفر = بدون اختلاف.' WHERE `key` = 'sell_fee'; UPDATE `settings` SET `description` = 'درصد کارمزد هر سفارش از مبلغ معامله (اعشاری؛ مثلاً ۰٫۰۰۵ یعنی نیم در هزار).' WHERE `key` = 'fee_service_charge_percentage'; -UPDATE `settings` SET - `title_fa` = 'اعمال مبلغ دقیق در معامله مشتری', - `type` = 'switch', - `can_edit` = 0, - `description` = 'روشن: مشتری دقیقاً همان مبلغ یا وزنی را که وارد کرده دریافت می‌کند. در فروش، مثلاً ۱۰۰ میلیون ریال درخواست → همان ۱۰۰ میلیون واریز و کارمزد از طلای کیف کسر می‌شود. در خرید، مثلاً ۱۰ گرم درخواست → همان ۱۰ گرم واریز و کارمزد به ریال قابل پرداخت اضافه می‌شود. خاموش (پیش‌فرض): در فروش کارمزد از مبلغ ریالی واریزی کم می‌شود (مشتری مبلغ کمتری می‌گیرد). در خرید کارمزد از وزن طلای واریزی کم می‌شود (مشتری طلای کمتری می‌گیرد).' -WHERE `key` = 'fee_deduct_from_gold'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'اعمال مبلغ دقیق در معامله مشتری', +-- `type` = 'switch', +-- `can_edit` = 0, +-- `description` = 'روشن: مشتری دقیقاً همان مبلغ یا وزنی را که وارد کرده دریافت می‌کند. در فروش، مثلاً ۱۰۰ میلیون ریال درخواست → همان ۱۰۰ میلیون واریز و کارمزد از طلای کیف کسر می‌شود. در خرید، مثلاً ۱۰ گرم درخواست → همان ۱۰ گرم واریز و کارمزد به ریال قابل پرداخت اضافه می‌شود. خاموش (پیش‌فرض): در فروش کارمزد از مبلغ ریالی واریزی کم می‌شود (مشتری مبلغ کمتری می‌گیرد). در خرید کارمزد از وزن طلای واریزی کم می‌شود (مشتری طلای کمتری می‌گیرد).' +-- WHERE `key` = 'fee_deduct_from_gold'; UPDATE `settings` SET `description` = 'تعداد اولین سفارش‌های هر کاربر که از کارمزد معاف می‌شوند. ۰ = غیرفعال.' WHERE `key` = 'fee_free'; UPDATE `settings` SET `description` = 'حداقل مبلغ درخواست برداشت وجه (ریال). درخواست‌های کمتر رد می‌شوند.' WHERE `key` = 'min_withdraw'; UPDATE `settings` SET `description` = 'حداقل مبلغ واریز به کیف پول (ریال). مبالغ کمتر در اپ و درگاه پذیرفته نمی‌شوند.' WHERE `key` = 'min_deposit'; UPDATE `settings` SET `description` = 'حداقل مبلغ اولین خرید هر کاربر (ریال). برای فعال‌سازی کیف یا احراز سطح اول استفاده می‌شود.' WHERE `key` = 'min_first_buy'; UPDATE `settings` SET `description` = 'حداقل مقدار/مبلغ مجاز برای ثبت سفارش فروش. بسته به نوع محصول می‌تواند وزن یا ریال باشد.' WHERE `key` = 'minimum_sell'; -UPDATE `settings` SET `description` = 'بیشترین قیمت ثبت‌شده در روز جاری (ریال). توسط سیستم به‌روز می‌شود؛ دستی تغییر ندهید.' WHERE `key` = 'up_price'; -UPDATE `settings` SET `description` = 'کمترین قیمت ثبت‌شده در روز جاری (ریال). توسط سیستم به‌روز می‌شود؛ دستی تغییر ندهید.' WHERE `key` = 'down_price'; -UPDATE `settings` SET `description` = 'تاریخ آخرین به‌روزرسانی بیشترین/کمترین قیمت روز. توسط سیستم پر می‌شود.' WHERE `key` = 'price_extreme_date'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'بیشترین قیمت ثبت‌شده در روز جاری (ریال). توسط سیستم به‌روز می‌شود؛ دستی تغییر ندهید.' WHERE `key` = 'up_price'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'کمترین قیمت ثبت‌شده در روز جاری (ریال). توسط سیستم به‌روز می‌شود؛ دستی تغییر ندهید.' WHERE `key` = 'down_price'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'تاریخ آخرین به‌روزرسانی بیشترین/کمترین قیمت روز. توسط سیستم پر می‌شود.' WHERE `key` = 'price_extreme_date'; UPDATE `settings` SET `description` = 'شناسه عددی مشتری که از گزارش تراز و آمار تجمیعی حذف می‌شود (مثلاً حساب تست). چند id با کاما.' WHERE `key` = 'balance_report_exclude_customer_id'; UPDATE `settings` SET `description` = 'تنظیم legacy — از price_provider استفاده کنید. روشن بودن این گزینه دیگر توصیه نمی‌شود.' WHERE `key` = 'main_product_price'; UPDATE `settings` SET `description` = 'متن کامل قوانین و مقررات استفاده از اپ که در صفحه قوانین به کاربر نشان داده می‌شود. HTML ساده مجاز است.' WHERE `key` = 'text_rule'; UPDATE `settings` SET `description` = 'متن «درباره ما» شامل معرفی مجموعه، راه‌های ارتباطی و توضیح خدمات. در صفحه مربوطه در اپ کاربر نمایش داده می‌شود.' WHERE `key` = 'text_about'; +UPDATE `settings` SET `description` = 'متن معرفی نرم‌افزار — در تنظیمات پنل ذخیره می‌شود (HTML یا چند خط متن).' WHERE `key` = 'about_software'; +UPDATE `settings` SET `description` = 'لینک اعتماد اینماد (مثلاً trustseal.enamad.ir/?id=...&Code=...).' WHERE `key` = 'enamad_url'; UPDATE `settings` SET `description` = 'روشن: وارد کردن کد معرف در ثبت‌نام اجباری است. خاموش: کد معرف اختیاری است. اگر «نمایش فیلد کد معرف» خاموش باشد، اجباری بودن اعمال نمی‌شود.' WHERE `key` = 'referral_id'; UPDATE `settings` SET `description` = 'روشن: فیلد کد معرف در صفحه ثبت‌نام اپ کاربر نمایش داده می‌شود. خاموش: فیلد مخفی است (لینک دعوت با ?id= همچنان اعمال می‌شود). اگر خاموش است و اجباری روشن باشد، فقط ثبت‌نام از لینک دعوت ممکن است.' WHERE `key` = 'referral_show'; @@ -1563,26 +1696,34 @@ UPDATE `settings` SET `description` = 'روشن: اگر منبع قیمت montzar باشد، قبل از واریز پاداش معرف/معرف‌شونده همان وزن از همکار خرید می‌شود؛ شکست خرید = واریز نمی‌شود. خاموش: مثل قبل فقط به کیف واریز می‌شود بدون خرید از همکار.' WHERE `key` = 'referral_gift_buy_from_montzar'; UPDATE `settings` SET `description` = 'حداکثر تعداد دعوت‌های مجاز برای هر کاربر. خالی = بدون محدودیت.' WHERE `key` = 'referral_limit'; -UPDATE `settings` SET `description` = 'مبلغ یا مقدار پاداش معرف (متن آزاد — بسته به پیاده‌سازی پیامک/اعتبار). برای نمایش در پیام‌ها.' WHERE `key` = 'referral_bonus_amount'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'مبلغ یا مقدار پاداش معرف (متن آزاد — بسته به پیاده‌سازی پیامک/اعتبار). برای نمایش در پیام‌ها.' WHERE `key` = 'referral_bonus_amount'; UPDATE `settings` SET `description` = 'روشن: تطبیق شماره کارت بانکی کاربر با سرویس احراز هویت جیبیت هنگام ثبت/ویرایش کارت.' WHERE `key` = 'jibit_verification'; UPDATE `settings` SET `description` = 'روشن: تطبیق کد ملی و موبایل در فرآیند ثبت‌نام از طریق سرویس جیبیت.' WHERE `key` = 'register_jibit_verify'; -UPDATE `settings` SET `description` = 'روشن: منوی «کسب درآمد / دعوت دوستان» در اپ کاربر نمایش داده می‌شود.' WHERE `key` = 'has_page_earn_money'; -UPDATE `settings` SET `description` = 'روشن: منوی هشدار قیمت در اپ کاربر نمایش داده می‌شود. خاموش: منو و صفحه مخفی است. فقط از دیپلوی قابل تغییر است.' WHERE `key` = 'has_page_price_trigger'; -UPDATE `settings` SET `description` = 'روشن: زنگوله اعلان در اپ کاربر و منوی ثبت اعلان در ادمین فعال است. خاموش: مخفی است. فقط از دیپلوی قابل تغییر است.' WHERE `key` = 'has_page_notification'; -UPDATE `settings` SET `title_fa` = 'اعلان داخل اپ' WHERE `key` = 'has_page_notification'; -UPDATE `settings` SET - `title_fa` = 'دسترسی ارسال قیمت به کانال', - `type` = 'switch', - `can_edit` = 0, - `description` = 'روشن: گروه «ارسال قیمت به کانال» در تنظیمات عادی پنل دیده می‌شود. خاموش: مخفی است (فقط از تنظیمات پیشرفته).' -WHERE `key` = 'price_channel_access'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'روشن: منوی «کسب درآمد / دعوت دوستان» در اپ کاربر نمایش داده می‌شود.' WHERE `key` = 'has_page_earn_money'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'روشن: منوی هشدار قیمت در اپ کاربر نمایش داده می‌شود. خاموش: منو و صفحه مخفی است. فقط از دیپلوی قابل تغییر است.' WHERE `key` = 'has_page_price_trigger'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'روشن: زنگوله اعلان در اپ کاربر و منوی ثبت اعلان در ادمین فعال است. خاموش: مخفی است. فقط از دیپلوی قابل تغییر است.' WHERE `key` = 'has_page_notification'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'اعلان داخل اپ' WHERE `key` = 'has_page_notification'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'دسترسی ارسال قیمت به کانال', +-- `type` = 'switch', +-- `can_edit` = 0, +-- `description` = 'روشن: گروه «ارسال قیمت به کانال» در تنظیمات عادی پنل دیده می‌شود. خاموش: مخفی است (فقط از تنظیمات پیشرفته).' +-- WHERE `key` = 'price_channel_access'; -- محصول: اعلان داخل اپ پیش‌فرض روشن برای همه دیپلوی‌ها (can_edit=0؛ فقط از دیپلوی) -UPDATE `settings` SET `value` = 'true' WHERE `key` = 'has_page_notification'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `value` = 'true' WHERE `key` = 'has_page_notification'; UPDATE `settings` SET `description` = 'شماره موبایل حساب API سرویس همکار قیمت. برای دریافت توکن و لیست محصولات.' WHERE `key` = 'montzar_mobile'; UPDATE `settings` SET `description` = 'رمز عبور حساب API سرویس همکار قیمت. محرمانه نگه دارید.' WHERE `key` = 'montzar_password'; UPDATE `settings` SET `description` = 'شناسه محصول آبشده در API همکار. باید با محصول مرجع در سرویس خارجی یکسان باشد.' WHERE `key` = 'montzar_product_id'; -UPDATE `settings` SET `description` = 'آدرس پایه سرور API همکار (بدون اسلش انتهایی). مثال: https://example.com' WHERE `key` = 'montzar_base_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'آدرس پایه سرور API همکار (بدون اسلش انتهایی). مثال: https://example.com' WHERE `key` = 'montzar_base_url'; UPDATE `settings` SET `description` = 'توکن دسترسی API همکار. پس از ورود موفق توسط سیستم پر می‌شود؛ دستی ویرایش نکنید.' WHERE `key` = 'montzar_token'; UPDATE `settings` SET `description` = 'اختلاف قیمت دریافتی از همکار (ریال). توسط cron/همگام‌سازی پر می‌شود.' WHERE `key` = 'montzar_diff'; UPDATE `settings` SET `description` = 'آخرین قیمت لحظه‌ای دریافت‌شده از همکار (ریال). فقط خواندنی — توسط سیستم به‌روز می‌شود.' WHERE `key` = 'montzar_live_price'; @@ -1594,36 +1735,53 @@ UPDATE `settings` SET `description` = 'روشن: امکان ثبت سفارش ف UPDATE `settings` SET `description` = 'روشن: سرویس همکار در حال حاضر بسته/غیرفعال گزارش شده است.' WHERE `key` = 'montzar_closed'; UPDATE `settings` SET `description` = 'پاسخ JSON آخرین سفارش ارسالی به همکار. برای عیب‌یابی؛ توسط سیستم پر می‌شود.' WHERE `key` = 'montzar_order_response'; UPDATE `settings` SET `description` = 'لاگ JSON آخرین محصول دریافت‌شده از API همکار. توسط سیستم پر می‌شود.' WHERE `key` = 'montzar_last_product_log'; -UPDATE `settings` SET `description` = 'آدرس کامل فایل APK اندروید (https). اگر خالی باشد لینک دانلود در اپ نمایش داده نمی‌شود.' WHERE `key` = 'apk_download_link'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'آدرس کامل فایل APK اندروید (https). اگر خالی باشد لینک دانلود در اپ نمایش داده نمی‌شود.' WHERE `key` = 'apk_download_link'; UPDATE `settings` SET `description` = 'روشن: منوی «بنرها» در ادمین و اسلایدر صفحه اصلی اپ مشتری نمایش داده می‌شود. خاموش: مخفی است (محتوای بنر از همان منو مدیریت می‌شود).' WHERE `key` = 'banner_enabled'; -UPDATE `settings` SET `description` = 'روشن: آیتم «مجوز ها» در منوی تنظیمات اپ خانگی (تم جدید) نمایش داده می‌شود. خاموش: مخفی است.' WHERE `key` = 'permision__enabled'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'روشن: آیتم «مجوز ها» در منوی تنظیمات اپ خانگی (تم جدید) نمایش داده می‌شود. خاموش: مخفی است.' WHERE `key` = 'permision__enabled'; -UPDATE `settings` SET `description` = 'شناسه کلاینت برای API سفارش خارجی (هدر X-Client-Id). باید با مقدار تنظیم‌شده در سرویس مقصد یکسان باشد.' WHERE `key` = 'node_client_id'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'شناسه کلاینت برای API سفارش خارجی (هدر X-Client-Id). باید با مقدار تنظیم‌شده در سرویس مقصد یکسان باشد.' WHERE `key` = 'node_client_id'; UPDATE `settings` SET `description` = 'کلید مشترک امضای HMAC برای احراز درخواست‌های API سفارش خارجی. محرمانه نگه دارید.' WHERE `key` = 'node_shared_secret'; -UPDATE `settings` SET `description` = 'روشن: API دریافت کیف پول و ثبت سفارش از سرویس فروشگاه خارجی فعال است. نیاز به node_client_id و node_shared_secret دارد.' WHERE `key` = 'external_order_api_enabled'; -UPDATE `settings` SET `description` = 'روشن: اپ به SSE (sse_path) وصل می‌شود و last/list با payload می‌آید؛ خاموش: polling.' WHERE `key` = 'wss_enabled'; -UPDATE `settings` SET `description` = 'مسیر GET لاراول برای استریم قیمت — پیش‌فرض /api/price/stream' WHERE `key` = 'sse_path'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'روشن: API دریافت کیف پول و ثبت سفارش از سرویس فروشگاه خارجی فعال است. نیاز به node_client_id و node_shared_secret دارد.' WHERE `key` = 'external_order_api_enabled'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'روشن: اپ به SSE (sse_path) وصل می‌شود و last/list با payload می‌آید؛ خاموش: polling.' WHERE `key` = 'wss_enabled'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'مسیر GET لاراول برای استریم قیمت — پیش‌فرض /api/price/stream' WHERE `key` = 'sse_path'; UPDATE `settings` SET `description` = 'JSON لیست سایت‌های ری‌گیری — هر مورد: id، name، url. از منوی «سایت‌های ری‌گیری» ویرایش می‌شود.' WHERE `key` = 'tracking_systems'; UPDATE `settings` SET `description` = 'روشن: منوی «سایت‌های ری‌گیری» در ادمین و اپ مشتری نمایش داده می‌شود. خاموش: مخفی است.' WHERE `key` = 'tracking_systems_enabled'; -UPDATE `settings` SET `description` = 'نام فروشگاه که در درگاه پرداخت و رسید بانکی به کاربر نمایش داده می‌شود.' WHERE `key` = 'montify_name'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'نام فروشگاه که در درگاه پرداخت و رسید بانکی به کاربر نمایش داده می‌شود.' WHERE `key` = 'montify_name'; -UPDATE `settings` SET `description` = 'روشن: پس از واریز/برداشت، تراکنش به سامانه حسابداری fin همگام‌سازی می‌شود.' WHERE `key` = 'payping_fin_sync_enabled'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'روشن: پس از واریز/برداشت، تراکنش به سامانه حسابداری fin همگام‌سازی می‌شود.' WHERE `key` = 'payping_fin_sync_enabled'; UPDATE `settings` SET `description` = 'آدرس کامل endpoint ثبت تراکنش در سامانه fin (POST).' WHERE `key` = 'payping_fin_url'; UPDATE `settings` SET `description` = 'توکن احراز هویت برای API سامانه fin.' WHERE `key` = 'payping_fin_token'; -UPDATE `settings` SET `description` = 'شناسه مشتری/حساب در سامانه fin که تراکنش‌ها به نام آن ثبت می‌شوند.' WHERE `key` = 'payping_fin_customer_id'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'شناسه مشتری/حساب در سامانه fin که تراکنش‌ها به نام آن ثبت می‌شوند.' WHERE `key` = 'payping_fin_customer_id'; UPDATE `settings` SET `description` = 'آدرس API شروع پرداخت (redirect کاربر به درگاه).' WHERE `key` = 'payping_start_url'; UPDATE `settings` SET `description` = 'آدرس API تأیید و نهایی‌سازی پرداخت پس از بازگشت از درگاه.' WHERE `key` = 'payping_verify_url'; UPDATE `settings` SET `description` = 'نام درگاه پرداخت فعال که به سرویس واسط درگاه ارسال می‌شود|sepal,' WHERE `key` = 'payping_gateway_name'; -UPDATE `settings` SET `description` = 'لیست کدهای item درگاه (با کاما) برای چرخش بین چند merchant.' WHERE `key` = 'payping_gateway_items'; -UPDATE `settings` SET `description` = 'روشن: مبلغ پرداخت به نزدیک‌ترین تومان گرد می‌شود. خاموش: مبلغ دقیق ریالی.' WHERE `key` = 'payping_round_toman'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'لیست کدهای item درگاه (با کاما) برای چرخش بین چند merchant.' WHERE `key` = 'payping_gateway_items'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'روشن: مبلغ پرداخت به نزدیک‌ترین تومان گرد می‌شود. خاموش: مبلغ دقیق ریالی.' WHERE `key` = 'payping_round_toman'; UPDATE `settings` SET `description` = 'روشن: در صورت وجود برداشت ناموفق قبلی، تسویه جدید با احتیاط بیشتر انجام می‌شود.' WHERE `key` = 'payping_strict_failed_withdraw'; -UPDATE `settings` SET `description` = 'آدرس IP یا hostname سرور نرم‌افزار ته‌حساب روی شبکه داخلی.' WHERE `key` = 'tahesab_host'; -UPDATE `settings` SET `description` = 'شماره پورت اتصال به API ته‌حساب (معمولاً 8080 یا مقدار مستندات ته‌حساب).' WHERE `key` = 'tahesab_port'; -UPDATE `settings` SET `description` = 'توکن/API Key اتصال به ته‌حساب. از پنل ته‌حساب دریافت می‌شود.' WHERE `key` = 'tahesab_token'; -UPDATE `settings` SET `description` = 'نام دیتابیس یا شناسه پایگاه در ته‌حساب که سند به آن ارسال می‌شود.' WHERE `key` = 'tahesab_db'; -UPDATE `settings` SET `description` = 'نام یا کد حساب بانکی در سند واریز/برداشت ته‌حساب.' WHERE `key` = 'tahesab_bank_account'; -UPDATE `settings` SET `description` = 'روشن: واریز و برداشت مشتریان به‌صورت خودکار به ته‌حساب ارسال می‌شود.' WHERE `key` = 'send_to_tahesab'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'آدرس IP یا hostname سرور نرم‌افزار ته‌حساب روی شبکه داخلی.' WHERE `key` = 'tahesab_host'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'شماره پورت اتصال به API ته‌حساب (معمولاً 8080 یا مقدار مستندات ته‌حساب).' WHERE `key` = 'tahesab_port'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'توکن/API Key اتصال به ته‌حساب. از پنل ته‌حساب دریافت می‌شود.' WHERE `key` = 'tahesab_token'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'نام دیتابیس یا شناسه پایگاه در ته‌حساب که سند به آن ارسال می‌شود.' WHERE `key` = 'tahesab_db'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'نام یا کد حساب بانکی در سند واریز/برداشت ته‌حساب.' WHERE `key` = 'tahesab_bank_account'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'روشن: واریز و برداشت مشتریان به‌صورت خودکار به ته‌حساب ارسال می‌شود.' WHERE `key` = 'send_to_tahesab'; UPDATE `settings` SET `description` = 'نوع پیام‌رسان برای دکمه پشتیبانی در اپ کاربر|bale,telegram,whatsapp,rubika,eitaa,soroush' WHERE `key` = 'support_messenger'; UPDATE `settings` SET `description` = 'شناسه تماس پشتیبانی: یوزرنیم (تلگرام)، شماره (واتساپ/بله) یا آیدی بسته به پیام‌رسان انتخاب‌شده.' WHERE `key` = 'support_messenger_id'; @@ -1639,8 +1797,10 @@ WHERE `key` = 'price_channel_message_text'; UPDATE `settings` SET `description` = @invite_link_desc WHERE `key` = 'invite_link_text'; UPDATE `settings` SET `description` = 'شماره تماس پشتیبانی. اگر پر باشد، در منوی شناور پشتیبانی آیتم‌های «تماس» و «پیام» اضافه می‌شود؛ متن پیام از «متن پیام به پشتیبانی (واریز)» خوانده می‌شود.' WHERE `key` = 'deposit_sms_support_number'; -UPDATE `settings` SET `description` = 'توکن ربات تلگرام برای ارسال اعلان‌ها. از BotFather دریافت می‌شود. محرمانه.' WHERE `key` = 'telegram_bot_token'; -UPDATE `settings` SET `description` = 'توکن ربات بله برای ارسال اعلان‌ها. محرمانه.' WHERE `key` = 'bale_bot_token'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'توکن ربات تلگرام برای ارسال اعلان‌ها. از BotFather دریافت می‌شود. محرمانه.' WHERE `key` = 'telegram_bot_token'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'توکن ربات بله برای ارسال اعلان‌ها. محرمانه.' WHERE `key` = 'bale_bot_token'; UPDATE `settings` SET `description` = 'روشن: بعد از شارژ یا کسر کیف توسط ادمین، پیامک به مشتری و ادمین‌های دارای «ارسال پیامک» می‌رود. خاموش: هیچ‌کدام ارسال نمی‌شود.' WHERE `key` = 'charge_notif'; UPDATE `settings` SET `description` = 'روشن: بعد از خرید یا فروش موفق، پیامک خلاصه معامله به ادمین‌های دارای «ارسال پیامک» می‌رود. خاموش: ادمین پیامک معامله نمی‌گیرد.' WHERE `key` = 'sms_notif_order_admin'; @@ -1659,26 +1819,45 @@ UPDATE `settings` SET `description` = 'روشن: بعد از برداشت از UPDATE `settings` SET `description` = 'روشن: وقتی هشدار قیمت مشتری (اقدام=پیامک) فعال می‌شود، پیامک به مشتری می‌رود. خاموش: هشدار قیمت پیامک نمی‌فرستد.' WHERE `key` = 'sms_notif_price_trigger'; UPDATE `settings` SET `description` = 'روشن: وقتی اعتبار کیف پول پنل پیامک صفر یا منفی شود، هشدار به سوپرادمین و ادمین‌های دارای «ارسال پیامک» می‌رود. خاموش: این هشدار نمی‌رود.' WHERE `key` = 'sms_notif_wallet_alert'; UPDATE `settings` SET `description` = 'روشن: وقتی مشتری اولین پیام خوانده‌نشده را در چت پشتیبانی می‌فرستد و ادمین همان اتاق را باز و visible ندارد، پیامک به ادمین‌های دارای «ارسال پیامک» می‌رود. خاموش: اعلان پیامک چت نمی‌رود.' WHERE `key` = 'sms_notif_support_admin'; -UPDATE `settings` SET `description` = 'رمز مشترک بین لاراول و سرور چت برای اعلان پیام پشتیبانی. فقط سرور؛ در صورت خالی بودن به‌صورت خودکار ساخته می‌شود.' WHERE `key` = 'chat_webhook_secret'; -UPDATE `settings` SET `description` = 'اگر APP_URL فرانت است (مثلاً https://niazitala.ir) اینجا آدرس لاراول را بگذار (مثلاً https://niazitala.ir/server). خالی = همان APP_URL.' WHERE `key` = 'chat_webhook_base_url'; -UPDATE `settings` SET `title_fa` = 'آدرس پایه وب‌هوک چت' WHERE `key` = 'chat_webhook_base_url'; -UPDATE `settings` SET `description` = 'روشن: در لیست مشتریان دکمه ارسال پیامک تکی نمایش داده می‌شود و ادمین می‌تواند برای هر مشتری متن دلخواه بفرستد. خاموش: دکمه مخفی است. فقط از صفحه دیپلوی تغییر می‌کند.' WHERE `key` = 'customer_direct_sms'; -UPDATE `settings` SET `title_fa` = 'پیامک تکی به مشتری از لیست' WHERE `key` = 'customer_direct_sms'; -UPDATE `settings` SET `description` = 'روشن: سرویس احراز هویت جیبیت (تطبیق کد ملی/موبایل و کارت بانکی) فعال است. خاموش: هیچ فراخوانی به جیبیت انجام نمی‌شود و احراز هویت خودکار کار نمی‌کند. فقط از صفحه دیپلوی قابل تغییر است.' WHERE `key` = 'jibit_enabled'; -UPDATE `settings` SET `title_fa` = 'احراز هویت جیبیت' WHERE `key` = 'jibit_enabled'; -UPDATE `settings` SET `title_fa` = 'سفارش شرطی' WHERE `key` = 'enable_conditional_order'; -UPDATE `settings` SET `title_fa` = 'قلک محصول' WHERE `key` = 'enable_product_funds'; -UPDATE `settings` SET `description` = 'روشن: ساخت و مدیریت قلک per-product در اپ مشتری فعال است (یک محصول در هر قلک؛ انتقال بدون سند حسابداری). خاموش: منو و API ساخت قلک جدید در دسترس نیست. فقط از دیپلوی قابل تغییر است.' WHERE `key` = 'enable_product_funds'; -UPDATE `settings` SET `title_fa` = 'کارت هدیه' WHERE `key` = 'has_page_gift_card'; -UPDATE `settings` SET `description` = 'روشن: منوی «ثبت کارت هدیه» و صفحه ثبت کد در اپ کاربر فعال است. خاموش: منو و صفحه مخفی است و API استفاده از کد هدیه در دسترس نیست. فقط از دیپلوی قابل تغییر است.' WHERE `key` = 'has_page_gift_card'; -UPDATE `settings` SET `title_fa` = 'سود چندسطحی معرف' WHERE `key` = 'enable_customer_level_profit'; -UPDATE `settings` SET `description` = 'روشن: در لیست مشتریان آیکون تنظیم درصد سود هر سطح زیرمجموعه فعال است و پس از سفارش، سهم کارمزد طبق درصدهای هر معرف به کیف طلا واریز می‌شود. خاموش: آیکون و واریز سود چندسطحی غیرفعال است. فقط از دیپلوی قابل تغییر است.' WHERE `key` = 'enable_customer_level_profit'; -UPDATE `settings` SET `description` = 'روشن: دکمه ارسال پیامک گروهی در پنل ادمین فعال است (ارسال ۱۰تایی). خاموش: ارسال پیامک گروهی غیرفعال است. فقط از تنظیمات پیشرفته.' WHERE `key` = 'group_sms'; -UPDATE `settings` SET `description` = 'روشن: پنل پیامک و کیف پول billing فعال است. خاموش: پیامک‌ها مثل قبل ارسال می‌شوند بدون billing.' WHERE `key` = 'sms_panel'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'رمز مشترک بین لاراول و سرور چت برای اعلان پیام پشتیبانی. فقط سرور؛ در صورت خالی بودن به‌صورت خودکار ساخته می‌شود.' WHERE `key` = 'chat_webhook_secret'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'اگر APP_URL فرانت است (مثلاً https://niazitala.ir) اینجا آدرس لاراول را بگذار (مثلاً https://niazitala.ir/server). خالی = همان APP_URL.' WHERE `key` = 'chat_webhook_base_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'آدرس پایه وب‌هوک چت' WHERE `key` = 'chat_webhook_base_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'روشن: در لیست مشتریان دکمه ارسال پیامک تکی نمایش داده می‌شود و ادمین می‌تواند برای هر مشتری متن دلخواه بفرستد. خاموش: دکمه مخفی است. فقط از صفحه دیپلوی تغییر می‌کند.' WHERE `key` = 'customer_direct_sms'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'پیامک تکی به مشتری از لیست' WHERE `key` = 'customer_direct_sms'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'روشن: سرویس احراز هویت جیبیت (تطبیق کد ملی/موبایل و کارت بانکی) فعال است. خاموش: هیچ فراخوانی به جیبیت انجام نمی‌شود و احراز هویت خودکار کار نمی‌کند. فقط از صفحه دیپلوی قابل تغییر است.' WHERE `key` = 'jibit_enabled'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'احراز هویت جیبیت' WHERE `key` = 'jibit_enabled'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'سفارش شرطی' WHERE `key` = 'enable_conditional_order'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'قلک محصول' WHERE `key` = 'enable_product_funds'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'روشن: ساخت و مدیریت قلک per-product در اپ مشتری فعال است (یک محصول در هر قلک؛ انتقال بدون سند حسابداری). خاموش: منو و API ساخت قلک جدید در دسترس نیست. فقط از دیپلوی قابل تغییر است.' WHERE `key` = 'enable_product_funds'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'کارت هدیه' WHERE `key` = 'has_page_gift_card'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'روشن: منوی «ثبت کارت هدیه» و صفحه ثبت کد در اپ کاربر فعال است. خاموش: منو و صفحه مخفی است و API استفاده از کد هدیه در دسترس نیست. فقط از دیپلوی قابل تغییر است.' WHERE `key` = 'has_page_gift_card'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'سود چندسطحی معرف' WHERE `key` = 'enable_customer_level_profit'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'روشن: در لیست مشتریان آیکون تنظیم درصد سود هر سطح زیرمجموعه فعال است و پس از سفارش، سهم کارمزد طبق درصدهای هر معرف به کیف طلا واریز می‌شود. خاموش: آیکون و واریز سود چندسطحی غیرفعال است. فقط از دیپلوی قابل تغییر است.' WHERE `key` = 'enable_customer_level_profit'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'روشن: دکمه ارسال پیامک گروهی در پنل ادمین فعال است (ارسال ۱۰تایی). خاموش: ارسال پیامک گروهی غیرفعال است. فقط از تنظیمات پیشرفته.' WHERE `key` = 'group_sms'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'روشن: پنل پیامک و کیف پول billing فعال است. خاموش: پیامک‌ها مثل قبل ارسال می‌شوند بدون billing.' WHERE `key` = 'sms_panel'; -UPDATE `settings` SET `description` = 'محصولاتی که موجودی‌شان از کیف طلای اصلی خوانده می‌شود. چند محصول با کاما. پیش‌فرض: 13' WHERE `key` = 'main_wallet_products'; -UPDATE `settings` SET `value` = '13' WHERE `key` = 'main_wallet_products' AND TRIM(COALESCE(`value`, '')) = ''; -UPDATE `settings` SET `can_edit` = 0 WHERE `key` = 'main_wallet_products'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'محصولاتی که موجودی‌شان از کیف طلای اصلی خوانده می‌شود. چند محصول با کاما. پیش‌فرض: 13' WHERE `key` = 'main_wallet_products'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `value` = '13' WHERE `key` = 'main_wallet_products' AND TRIM(COALESCE(`value`, '')) = ''; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `can_edit` = 0 WHERE `key` = 'main_wallet_products'; UPDATE `settings` SET `title_fa` = 'الزام صفر بودن کیف اصلی قبل از خرید محصول دیگر', `type` = 'switch', @@ -1725,7 +1904,7 @@ WHERE `key` = 'price_channel_message_text'; UPDATE `settings` SET `type` = 'longtext' WHERE `key` IN ( - 'text_rule', 'text_about', 'support_messenger_text', 'invite_link_text', + 'text_rule', 'text_about', 'about_software', 'enamad_url', 'support_messenger_text', 'invite_link_text', 'deposit_support_message_text', 'price_channel_message_text', 'montzar_order_response', 'montzar_last_product_log' ); @@ -1734,13 +1913,16 @@ WHERE `key` IN ( -- title_fa — استاندارد مشترک (override؛ value / is_active دست نمی‌خورند) -- --------------------------------------------------------------------------- -UPDATE `settings` SET `title_fa` = 'آدرس پنل ادمین' WHERE `key` = 'admin_url'; -UPDATE `settings` SET `title_fa` = 'لینک دانلود اپ اندروید' WHERE `key` = 'apk_download_link'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'آدرس پنل ادمین' WHERE `key` = 'admin_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'لینک دانلود اپ اندروید' WHERE `key` = 'apk_download_link'; UPDATE `settings` SET `title_fa` = 'آدرس اپ (کاربر)' WHERE `key` = 'app_url'; UPDATE `settings` SET `title_fa` = 'فعال‌سازی خودکار پس از ثبت‌نام' WHERE `key` = 'auto_active_customer'; UPDATE `settings` SET `title_fa` = 'آدرس پایه' WHERE `key` = 'bace_url'; UPDATE `settings` SET `title_fa` = 'حذف مشتری از تراز' WHERE `key` = 'balance_report_exclude_customer_id'; -UPDATE `settings` SET `title_fa` = 'توکن بات بله' WHERE `key` = 'bale_bot_token'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'توکن بات بله' WHERE `key` = 'bale_bot_token'; UPDATE `settings` SET `title_fa` = 'نمایش بنرها' WHERE `key` = 'banner_enabled'; UPDATE `settings` SET `title_fa` = 'سود خرید نمایش' WHERE `key` = 'buy_fee'; UPDATE `settings` SET `title_fa` = 'پیامک شارژ ادمین' WHERE `key` = 'charge_notif'; @@ -1760,30 +1942,38 @@ UPDATE `settings` SET `title_fa` = 'پیامک برداشت قلک به مشتر UPDATE `settings` SET `title_fa` = 'پیامک هشدار قیمت' WHERE `key` = 'sms_notif_price_trigger'; UPDATE `settings` SET `title_fa` = 'پیامک هشدار اعتبار پنل پیامک' WHERE `key` = 'sms_notif_wallet_alert'; UPDATE `settings` SET `title_fa` = 'پیامک پیام پشتیبانی به ادمین' WHERE `key` = 'sms_notif_support_admin'; -UPDATE `settings` SET `title_fa` = 'رمز وب‌هوک چت' WHERE `key` = 'chat_webhook_secret'; -UPDATE `settings` SET `title_fa` = 'UUID نمودار Zaarbox' WHERE `key` = 'chart_id'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'رمز وب‌هوک چت' WHERE `key` = 'chat_webhook_secret'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'UUID نمودار Zaarbox' WHERE `key` = 'chart_id'; UPDATE `settings` SET `title_fa` = 'نمودار از داده خود سایت' WHERE `key` = 'chart_use_local_data'; UPDATE `settings` SET `title_fa` = 'بستن خودکار خارج از ساعت کاری' WHERE `key` = 'close_price'; UPDATE `settings` SET `title_fa` = 'رنگ اصلی' WHERE `key` = 'color_primary'; UPDATE `settings` SET `title_fa` = 'رنگ ثانویه' WHERE `key` = 'color_secondary'; UPDATE `settings` SET `title_fa` = 'شماره تماس پشتیبانی' WHERE `key` = 'deposit_sms_support_number'; -UPDATE `settings` SET `title_fa` = 'کمترین قیمت امروز' WHERE `key` = 'down_price'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'کمترین قیمت امروز' WHERE `key` = 'down_price'; UPDATE `settings` SET `title_fa` = 'ساعت پایان' WHERE `key` = 'endDay'; -UPDATE `settings` SET `title_fa` = 'فعال‌سازی API سفارش خارجی (get_wallet / order)' WHERE `key` = 'external_order_api_enabled'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'فعال‌سازی API سفارش خارجی (get_wallet / order)' WHERE `key` = 'external_order_api_enabled'; UPDATE `settings` SET `title_fa` = 'کارمزد (قدیمی — درصد)' WHERE `key` = 'fee'; UPDATE `settings` SET `title_fa` = 'تعداد سفارش اول بدون کارمزد' WHERE `key` = 'fee_free'; UPDATE `settings` SET `title_fa` = 'درصد کارمزد سفارش' WHERE `key` = 'fee_service_charge_percentage'; -UPDATE `settings` SET `title_fa` = 'اعمال مبلغ دقیق در معامله مشتری' WHERE `key` = 'fee_deduct_from_gold'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'اعمال مبلغ دقیق در معامله مشتری' WHERE `key` = 'fee_deduct_from_gold'; UPDATE `settings` SET `title_fa` = 'پاداش معرف‌شونده' WHERE `key` = 'gift_for_referral'; UPDATE `settings` SET `title_fa` = 'پاداش معرف' WHERE `key` = 'gift_for_referrer'; -UPDATE `settings` SET `title_fa` = 'پیامک گروهی' WHERE `key` = 'group_sms'; -UPDATE `settings` SET - `title_fa` = 'قیمت ویژه مشتری', - `type` = 'switch', - `can_edit` = 0, - `description` = 'روشن: زیرمنوی قیمت ویژه در مشتریان و اعمال سود خرید/فروش پکیج روی مظنه و سفارش برای کاربران انتخاب‌شده. خاموش: غیرفعال. فقط از دیپلوی قابل تغییر است.' -WHERE `key` = 'customer_special_pricing'; -UPDATE `settings` SET `title_fa` = 'پنل پیامک (کیف پول)' WHERE `key` = 'sms_panel'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'پیامک گروهی' WHERE `key` = 'group_sms'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'قیمت ویژه مشتری', +-- `type` = 'switch', +-- `can_edit` = 0, +-- `description` = 'روشن: زیرمنوی قیمت ویژه در مشتریان و اعمال سود خرید/فروش پکیج روی مظنه و سفارش برای کاربران انتخاب‌شده. خاموش: غیرفعال. فقط از دیپلوی قابل تغییر است.' +-- WHERE `key` = 'customer_special_pricing'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'پنل پیامک (کیف پول)' WHERE `key` = 'sms_panel'; UPDATE `settings` SET `title_fa` = 'چت پشتیبانی', `type` = 'switch', @@ -1791,45 +1981,61 @@ UPDATE `settings` SET `description` = 'روشن: چت پشتیبانی در اپ مشتری نمایش داده می‌شود (فقط وقتی show_to_users_chat هم روشن باشد). خاموش: دکمه و صفحه چت برای کاربر مخفی است.' WHERE `key` = 'has_chat'; -UPDATE `settings` SET - `title_fa` = 'نمایش چت به کاربران', - `type` = 'switch', - `description` = 'روشن: قابلیت چت پشتیبانی برای این دیپلوی فعال است (منوی ادمین و پیش‌نیاز نمایش به کاربر). خاموش: چت در ادمین و اپ کاربر مخفی است و سوییچ «چت پشتیبانی» (has_chat) از تنظیمات عادی هم برداشته می‌شود.', - `can_edit` = 0 -WHERE `key` = 'show_to_users_chat'; -UPDATE `settings` SET `title_fa` = 'API چت', `type` = 'text', `can_edit` = 0 -WHERE `key` = 'chat_api'; -UPDATE `settings` SET `title_fa` = 'کلید API چت', `type` = 'text', `can_edit` = 0 -WHERE `key` = 'chat_api_key'; -UPDATE `settings` SET `title_fa` = 'آدرس آپلود فایل چت', `type` = 'text', `can_edit` = 0 -WHERE `key` = 'chat_upload_url'; -UPDATE `settings` SET `title_fa` = 'آدرس دانلود فایل چت', `type` = 'text', `can_edit` = 0 -WHERE `key` = 'chat_download_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'نمایش چت به کاربران', +-- `type` = 'switch', +-- `description` = 'روشن: قابلیت چت پشتیبانی برای این دیپلوی فعال است (منوی ادمین و پیش‌نیاز نمایش به کاربر). خاموش: چت در ادمین و اپ کاربر مخفی است و سوییچ «چت پشتیبانی» (has_chat) از تنظیمات عادی هم برداشته می‌شود.', +-- `can_edit` = 0 +-- WHERE `key` = 'show_to_users_chat'; +-- [super-admin can_edit=0 sync] +-- UPDATE `settings` SET `title_fa` = 'API چت', `type` = 'text', `can_edit` = 0 +-- WHERE `key` = 'chat_api'; +-- [super-admin can_edit=0 sync] +-- UPDATE `settings` SET `title_fa` = 'کلید API چت', `type` = 'text', `can_edit` = 0 +-- WHERE `key` = 'chat_api_key'; +-- [super-admin can_edit=0 sync] +-- UPDATE `settings` SET `title_fa` = 'آدرس آپلود فایل چت', `type` = 'text', `can_edit` = 0 +-- WHERE `key` = 'chat_upload_url'; +-- [super-admin can_edit=0 sync] +-- UPDATE `settings` SET `title_fa` = 'آدرس دانلود فایل چت', `type` = 'text', `can_edit` = 0 +-- WHERE `key` = 'chat_download_url'; -UPDATE `settings` SET `title_fa` = 'صفحه کسب درآمد' WHERE `key` = 'has_page_earn_money'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'صفحه کسب درآمد' WHERE `key` = 'has_page_earn_money'; UPDATE `settings` SET `title_fa` = 'صفحه صندوق' WHERE `key` = 'has_page_fund'; UPDATE `settings` SET `title_fa` = 'صفحه مجوزها' WHERE `key` = 'has_page_permission'; UPDATE `settings` SET `title_fa` = 'صفحه طلای فیزیکی' WHERE `key` = 'has_page_physical_gold'; -UPDATE `settings` SET `title_fa` = 'هشدار قیمت' WHERE `key` = 'has_page_price_trigger'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'هشدار قیمت' WHERE `key` = 'has_page_price_trigger'; UPDATE `settings` SET `title_fa` = 'متن دعوتنامه اشتراک‌گذاری' WHERE `key` = 'invite_link_text'; -UPDATE `settings` SET `title_fa` = 'حالت فروشگاهی' WHERE `key` = 'is_store'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'حالت فروشگاهی' WHERE `key` = 'is_store'; UPDATE `settings` SET `title_fa` = 'تأیید کارت بانکی با جیبیت' WHERE `key` = 'jibit_verification'; UPDATE `settings` SET `title_fa` = 'کلید داخلی اپ' WHERE `key` = 'key'; -UPDATE `settings` SET `title_fa` = 'لوگوی صفحه ورود' WHERE `key` = 'logo_login'; -UPDATE `settings` SET `title_fa` = 'لوگوی ثبت‌نام' WHERE `key` = 'logo_register'; -UPDATE `settings` SET `title_fa` = 'نام فلز اصلی (ادمین)' WHERE `key` = 'main_metal'; -UPDATE `settings` SET `title_fa` = 'محصول آبشده' WHERE `key` = 'main_product'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'لوگوی صفحه ورود' WHERE `key` = 'logo_login'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'لوگوی ثبت‌نام' WHERE `key` = 'logo_register'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'نام فلز اصلی (ادمین)' WHERE `key` = 'main_metal'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'محصول آبشده' WHERE `key` = 'main_product'; UPDATE `settings` SET `title_fa` = 'قیمت از محصول (legacy)' WHERE `key` = 'main_product_price'; -UPDATE `settings` SET `title_fa` = 'محصولات متصل به کیف اصلی' WHERE `key` = 'main_wallet_products'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'محصولات متصل به کیف اصلی' WHERE `key` = 'main_wallet_products'; UPDATE `settings` SET `title_fa` = 'الزام صفر بودن کیف اصلی قبل از خرید محصول دیگر' WHERE `key` = 'require_zero_main_gold_before_other_buy'; -UPDATE `settings` SET `title_fa` = 'عنوان فلز در UI' WHERE `key` = 'metal_type'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'عنوان فلز در UI' WHERE `key` = 'metal_type'; UPDATE `settings` SET `title_fa` = 'حداقل اولین خرید (ریال)' WHERE `key` = 'min_first_buy'; UPDATE `settings` SET `title_fa` = 'حداقل برداشت (ریال)' WHERE `key` = 'min_withdraw'; UPDATE `settings` SET `title_fa` = 'حداقل واریز کیف پول (ریال)' WHERE `key` = 'min_deposit'; UPDATE `settings` SET `can_edit` = 1 WHERE `key` = 'min_deposit'; UPDATE `settings` SET `title_fa` = 'حداقل فروش' WHERE `key` = 'minimum_sell'; -UPDATE `settings` SET `title_fa` = 'نام فروشگاه در درگاه' WHERE `key` = 'montify_name'; -UPDATE `settings` SET `title_fa` = 'آدرس سرور همکار' WHERE `key` = 'montzar_base_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'نام فروشگاه در درگاه' WHERE `key` = 'montify_name'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'آدرس سرور همکار' WHERE `key` = 'montzar_base_url'; UPDATE `settings` SET `title_fa` = 'بسته بودن همکار' WHERE `key` = 'montzar_closed'; UPDATE `settings` SET `title_fa` = 'اختلاف قیمت همکار' WHERE `key` = 'montzar_diff'; UPDATE `settings` SET `title_fa` = 'لاگ محصول همکار' WHERE `key` = 'montzar_last_product_log'; @@ -1846,23 +2052,31 @@ UPDATE `settings` SET `title_fa` = 'مظنه خرید همکار' WHERE `key` = UPDATE `settings` SET `title_fa` = 'مظنه فروش همکار' WHERE `key` = 'montzar_truly_sell_mazaneh'; UPDATE `settings` SET `title_fa` = 'نام انگلیسی اپ' WHERE `key` = 'name_en'; UPDATE `settings` SET `title_fa` = 'نام فارسی اپ' WHERE `key` = 'name_fa'; -UPDATE `settings` SET `title_fa` = 'شناسه کلاینت API خارجی (X-Client-Id)' WHERE `key` = 'node_client_id'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'شناسه کلاینت API خارجی (X-Client-Id)' WHERE `key` = 'node_client_id'; UPDATE `settings` SET `title_fa` = 'کلید امضای HMAC API خارجی' WHERE `key` = 'node_shared_secret'; UPDATE `settings` SET `title_fa` = 'ثبت‌نام باز' WHERE `key` = 'open_register'; -UPDATE `settings` SET `title_fa` = 'customer_id fin' WHERE `key` = 'payping_fin_customer_id'; -UPDATE `settings` SET `title_fa` = 'همگام‌سازی fin' WHERE `key` = 'payping_fin_sync_enabled'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'customer_id fin' WHERE `key` = 'payping_fin_customer_id'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'همگام‌سازی fin' WHERE `key` = 'payping_fin_sync_enabled'; UPDATE `settings` SET `title_fa` = 'توکن fin' WHERE `key` = 'payping_fin_token'; UPDATE `settings` SET `title_fa` = 'URL fin' WHERE `key` = 'payping_fin_url'; -UPDATE `settings` SET `title_fa` = 'لیست item (چرخشی)' WHERE `key` = 'payping_gateway_items'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'لیست item (چرخشی)' WHERE `key` = 'payping_gateway_items'; UPDATE `settings` SET `title_fa` = 'نام gateway درگاه' WHERE `key` = 'payping_gateway_name'; -UPDATE `settings` SET `title_fa` = 'گرد کردن مبلغ به تومان' WHERE `key` = 'payping_round_toman'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'گرد کردن مبلغ به تومان' WHERE `key` = 'payping_round_toman'; UPDATE `settings` SET `title_fa` = 'آدرس شروع درگاه' WHERE `key` = 'payping_start_url'; UPDATE `settings` SET `title_fa` = 'برداشت ناموفق سخت‌گیرانه' WHERE `key` = 'payping_strict_failed_withdraw'; UPDATE `settings` SET `title_fa` = 'آدرس تأیید درگاه' WHERE `key` = 'payping_verify_url'; -UPDATE `settings` SET `title_fa` = 'تاریخ min/max روز' WHERE `key` = 'price_extreme_date'; -UPDATE `settings` SET `title_fa` = 'منبع قیمت' WHERE `key` = 'price_provider'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'تاریخ min/max روز' WHERE `key` = 'price_extreme_date'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'منبع قیمت' WHERE `key` = 'price_provider'; UPDATE `settings` SET `title_fa` = 'API سود طلا' WHERE `key` = 'profit_gold_api_enabled'; -UPDATE `settings` SET `title_fa` = 'مقدار پاداش معرف' WHERE `key` = 'referral_bonus_amount'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'مقدار پاداش معرف' WHERE `key` = 'referral_bonus_amount'; UPDATE `settings` SET `title_fa` = 'تعداد معرف برای هدیه' WHERE `key` = 'referral_count_for_gift'; UPDATE `settings` SET `title_fa` = 'کد معرف اجباری' WHERE `key` = 'referral_id'; UPDATE `settings` SET `title_fa` = 'نمایش فیلد کد معرف' WHERE `key` = 'referral_show'; @@ -1873,7 +2087,8 @@ UPDATE `settings` SET `title_fa` = 'SMS به معرف هنگام ثبت‌نام UPDATE `settings` SET `title_fa` = 'پاداش معرف پس از اولین سفارش' WHERE `key` = 'referral_gift_on_first_order'; UPDATE `settings` SET `title_fa` = 'خرید پاداش معرفی از همکار' WHERE `key` = 'referral_gift_buy_from_montzar'; UPDATE `settings` SET `title_fa` = 'سود فروش نمایش' WHERE `key` = 'sell_fee'; -UPDATE `settings` SET `title_fa` = 'ارسال به ته‌حساب' WHERE `key` = 'send_to_tahesab'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'ارسال به ته‌حساب' WHERE `key` = 'send_to_tahesab'; UPDATE `settings` SET `title_fa` = 'آدرس API سرور' WHERE `key` = 'server_url'; UPDATE `settings` SET `title_fa` = 'نمایش آخرین قیمت ذخیره‌شده' WHERE `key` = 'show_last_price'; UPDATE `settings` SET `title_fa` = 'نمایش قیمت انس طلا' WHERE `key` = 'show_gold_ounce_price'; @@ -1884,7 +2099,8 @@ UPDATE `settings` SET `title_fa` = 'آدرس لینک دکمه خرید/فروش UPDATE `settings` SET `title_fa` = 'متن دکمه لینک خرید/فروش' WHERE `key` = 'products_site_link_text'; UPDATE `settings` SET `title_fa` = 'نمایش خرید/فروش باز روی کارت محصول' WHERE `key` = 'show_product_trade_status'; UPDATE `settings` SET `title_fa` = 'نمایش دسته و تحویل و مقدار روی کارت محصول' WHERE `key` = 'show_product_card_meta'; -UPDATE `settings` SET `title_fa` = 'مسیر SSE قیمت' WHERE `key` = 'sse_path'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'مسیر SSE قیمت' WHERE `key` = 'sse_path'; UPDATE `settings` SET `title_fa` = 'ساعت شروع' WHERE `key` = 'startDay'; UPDATE `settings` SET `title_fa` = 'وضعیت فروشگاه' WHERE `key` = 'store_status'; UPDATE `settings` SET `title_fa` = 'پیام‌رسان پشتیبانی' WHERE `key` = 'support_messenger'; @@ -1899,23 +2115,37 @@ UPDATE `settings` SET `title_fa` = 'فعال‌سازی کارت به کارت' UPDATE `settings` SET `title_fa` = 'فعال‌سازی درگاه پرداخت' WHERE `key` = 'deposit_method_gateway'; UPDATE `settings` SET `title_fa` = 'فعال‌سازی شناسه واریز' WHERE `key` = 'deposit_method_identified'; UPDATE `settings` SET `title_fa` = 'فعال‌سازی شبکه شتابی' WHERE `key` = 'deposit_method_shetab'; -UPDATE `settings` SET `title_fa` = 'حساب بانکی ته‌حساب' WHERE `key` = 'tahesab_bank_account'; -UPDATE `settings` SET `title_fa` = 'نام دیتابیس ته‌حساب' WHERE `key` = 'tahesab_db'; -UPDATE `settings` SET `title_fa` = 'آدرس IP سرور ته‌حساب' WHERE `key` = 'tahesab_host'; -UPDATE `settings` SET `title_fa` = 'پورت سرور ته‌حساب' WHERE `key` = 'tahesab_port'; -UPDATE `settings` SET `title_fa` = 'توکن ته‌حساب' WHERE `key` = 'tahesab_token'; -UPDATE `settings` SET `title_fa` = 'توکن بات تلگرام' WHERE `key` = 'telegram_bot_token'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'حساب بانکی ته‌حساب' WHERE `key` = 'tahesab_bank_account'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'نام دیتابیس ته‌حساب' WHERE `key` = 'tahesab_db'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'آدرس IP سرور ته‌حساب' WHERE `key` = 'tahesab_host'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'پورت سرور ته‌حساب' WHERE `key` = 'tahesab_port'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'توکن ته‌حساب' WHERE `key` = 'tahesab_token'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'توکن بات تلگرام' WHERE `key` = 'telegram_bot_token'; UPDATE `settings` SET `title_fa` = 'متن درباره ما' WHERE `key` = 'text_about'; +UPDATE `settings` SET `title_fa` = 'متن درباره نرم‌افزار' WHERE `key` = 'about_software'; +UPDATE `settings` SET `title_fa` = 'آدرس اینماد' WHERE `key` = 'enamad_url'; UPDATE `settings` SET `title_fa` = 'متن قوانین' WHERE `key` = 'text_rule'; -UPDATE `settings` SET `title_fa` = 'عنوان favicon' WHERE `key` = 'title_fav'; -UPDATE `settings` SET `title_fa` = 'عنوان PWA' WHERE `key` = 'title_pwa'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'عنوان favicon' WHERE `key` = 'title_fav'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'عنوان PWA' WHERE `key` = 'title_pwa'; UPDATE `settings` SET `title_fa` = 'واحد وزن دارایی و معاملات' WHERE `key` = 'unit'; -UPDATE `settings` SET `title_fa` = 'بیشترین قیمت امروز' WHERE `key` = 'up_price'; -UPDATE `settings` SET `title_fa` = 'قیمت لحظه‌ای (SSE)' WHERE `key` = 'wss_enabled'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'بیشترین قیمت امروز' WHERE `key` = 'up_price'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'قیمت لحظه‌ای (SSE)' WHERE `key` = 'wss_enabled'; UPDATE `settings` SET `title_fa` = 'سایت‌های ری‌گیری' WHERE `key` = 'tracking_systems'; UPDATE `settings` SET `title_fa` = 'نمایش سایت‌های ری‌گیری' WHERE `key` = 'tracking_systems_enabled'; -UPDATE `settings` SET `title_fa` = 'نمایش منوی مجوزها' WHERE `key` = 'permision__enabled'; -UPDATE `settings` SET `title_fa` = 'آدرس API تابلو Zaarbox' WHERE `key` = 'zaarbox_api_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'نمایش منوی مجوزها' WHERE `key` = 'permision__enabled'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'آدرس API تابلو Zaarbox' WHERE `key` = 'zaarbox_api_url'; UPDATE `settings` SET `title_fa` = 'شناسه ردیف تابلو (key یا UUID)' WHERE `key` = 'zaarbox_price_key'; -- --------------------------------------------------------------------------- @@ -1923,55 +2153,56 @@ UPDATE `settings` SET `title_fa` = 'شناسه ردیف تابلو (key یا UUI -- --------------------------------------------------------------------------- -- غیرقابل ویرایش در پنل (can_edit = 0) -UPDATE `settings` SET `can_edit` = 0 WHERE `key` IN ( - 'admin_url', 'apk_download_link', 'app_url', - 'bale_bot_token', - 'chart_id', 'chart_use_local_data', - 'external_order_api_enabled', - 'external_payment_enabled', - 'external_payment_base_url', - 'external_payment_client_id', - 'external_payment_client_secret', - 'external_payment_gateway', - 'external_payment_return_url', - 'external_payment_webhook_url', - 'wallet_payment_provider', - 'fee_deduct_from_gold', - 'referral_bonus_amount', - 'group_sms', - 'customer_special_pricing', - 'customer_direct_sms', - 'enable_conditional_order', - 'enable_product_funds', - 'has_page_price_trigger', - 'has_page_notification', - 'has_page_gift_card', - 'enable_customer_level_profit', - 'jibit_enabled', - 'has_page_earn_money', - 'is_store', - 'sms_panel', - 'logo_login', 'logo_register', 'title_pwa', 'title_fav', - 'main_product', 'main_wallet_products', 'metal_type', 'main_metal', - 'montify_name', - 'montzar_base_url', - 'node_client_id', 'node_shared_secret', - 'payping_fin_customer_id', 'payping_fin_sync_enabled', 'payping_fin_token', 'payping_fin_url', - 'payping_gateway_items', 'payping_gateway_name', - 'payping_round_toman', 'payping_start_url', 'payping_strict_failed_withdraw', 'payping_verify_url', - 'permision__enabled', - 'price_provider', 'profit_gold_api_enabled', - 'send_to_tahesab', - 'sse_path', - 'tahesab_bank_account', 'tahesab_db', 'tahesab_host', 'tahesab_port', 'tahesab_token', - 'telegram_bot_token', 'rubika_bot_token', - 'price_channel_access', - 'price_channel_bale_to', 'price_channel_telegram_to', 'price_channel_rubika_to', - 'unit', - 'wss_enabled', - 'zaarbox_api_url', - 'show_to_users_chat', 'chat_api', 'chat_api_key', 'chat_upload_url', 'chat_download_url', 'chat_webhook_secret', 'chat_webhook_base_url' -); +-- [super-admin can_edit=0 sync] +-- UPDATE `settings` SET `can_edit` = 0 WHERE `key` IN ( +-- 'admin_url', 'apk_download_link', 'app_url', +-- 'bale_bot_token', +-- 'chart_id', 'chart_use_local_data', +-- 'external_order_api_enabled', +-- 'external_payment_enabled', +-- 'external_payment_base_url', +-- 'external_payment_client_id', +-- 'external_payment_client_secret', +-- 'external_payment_gateway', +-- 'external_payment_return_url', +-- 'external_payment_webhook_url', +-- 'wallet_payment_provider', +-- 'fee_deduct_from_gold', +-- 'referral_bonus_amount', +-- 'group_sms', +-- 'customer_special_pricing', +-- 'customer_direct_sms', +-- 'enable_conditional_order', +-- 'enable_product_funds', +-- 'has_page_price_trigger', +-- 'has_page_notification', +-- 'has_page_gift_card', +-- 'enable_customer_level_profit', +-- 'jibit_enabled', +-- 'has_page_earn_money', +-- 'is_store', +-- 'sms_panel', +-- 'logo_login', 'logo_register', 'title_pwa', 'title_fav', +-- 'main_product', 'main_wallet_products', 'metal_type', 'main_metal', +-- 'montify_name', +-- 'montzar_base_url', +-- 'node_client_id', 'node_shared_secret', +-- 'payping_fin_customer_id', 'payping_fin_sync_enabled', 'payping_fin_token', 'payping_fin_url', +-- 'payping_gateway_items', 'payping_gateway_name', +-- 'payping_round_toman', 'payping_start_url', 'payping_strict_failed_withdraw', 'payping_verify_url', +-- 'permision__enabled', +-- 'price_provider', 'profit_gold_api_enabled', +-- 'send_to_tahesab', +-- 'sse_path', +-- 'tahesab_bank_account', 'tahesab_db', 'tahesab_host', 'tahesab_port', 'tahesab_token', +-- 'telegram_bot_token', 'rubika_bot_token', +-- 'price_channel_access', +-- 'price_channel_bale_to', 'price_channel_telegram_to', 'price_channel_rubika_to', +-- 'unit', +-- 'wss_enabled', +-- 'zaarbox_api_url', +-- 'show_to_users_chat', 'chat_api', 'chat_api_key', 'chat_upload_url', 'chat_download_url', 'chat_webhook_secret', 'chat_webhook_base_url' +-- ); -- قابل ویرایش در پنل (can_edit = 1) UPDATE `settings` SET `can_edit` = 1 WHERE `key` IN ( @@ -2012,7 +2243,7 @@ UPDATE `settings` SET `can_edit` = 1 WHERE `key` IN ( 'has_chat', 'deposit_support_message_text', 'deposit_account_holder', 'deposit_card_number', 'deposit_account_number', 'deposit_sheba', 'deposit_method_card_to_card', 'deposit_method_gateway', 'deposit_method_identified', 'deposit_method_shetab', - 'text_about', 'text_rule', + 'text_about', 'text_rule', 'about_software', 'enamad_url', 'price_channel_enabled', 'price_channel_messengers', 'price_channel_diff', 'price_channel_min_seconds', 'price_channel_message_text', 'price_channel_footer_id', 'price_channel_footer_phone', @@ -2063,101 +2294,129 @@ WHERE `key` = 'deposit_method_shetab'; -- تثبیت نهایی fee_deduct_from_gold — آخرین override قبل از COMMIT -- (title_fa / description / type / can_edit — value و is_active دست نمی‌خورند) -- --------------------------------------------------------------------------- -UPDATE `settings` SET - `title_fa` = 'اعمال مبلغ دقیق در معامله مشتری', - `type` = 'switch', - `can_edit` = 0, - `description` = 'روشن: مشتری دقیقاً همان مبلغ یا وزنی را که وارد کرده دریافت می‌کند. در فروش، مثلاً ۱۰۰ میلیون ریال درخواست → همان ۱۰۰ میلیون واریز و کارمزد از طلای کیف کسر می‌شود. در خرید، مثلاً ۱۰ گرم درخواست → همان ۱۰ گرم واریز و کارمزد به ریال قابل پرداخت اضافه می‌شود. خاموش (پیش‌فرض): در فروش کارمزد از مبلغ ریالی واریزی کم می‌شود (مشتری مبلغ کمتری می‌گیرد). در خرید کارمزد از وزن طلای واریزی کم می‌شود (مشتری طلای کمتری می‌گیرد).' -WHERE `key` = 'fee_deduct_from_gold'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'اعمال مبلغ دقیق در معامله مشتری', +-- `type` = 'switch', +-- `can_edit` = 0, +-- `description` = 'روشن: مشتری دقیقاً همان مبلغ یا وزنی را که وارد کرده دریافت می‌کند. در فروش، مثلاً ۱۰۰ میلیون ریال درخواست → همان ۱۰۰ میلیون واریز و کارمزد از طلای کیف کسر می‌شود. در خرید، مثلاً ۱۰ گرم درخواست → همان ۱۰ گرم واریز و کارمزد به ریال قابل پرداخت اضافه می‌شود. خاموش (پیش‌فرض): در فروش کارمزد از مبلغ ریالی واریزی کم می‌شود (مشتری مبلغ کمتری می‌گیرد). در خرید کارمزد از وزن طلای واریزی کم می‌شود (مشتری طلای کمتری می‌گیرد).' +-- WHERE `key` = 'fee_deduct_from_gold'; -- حسابداری: یک select مرکزی + can_edit=0 -UPDATE `settings` SET `can_edit` = 0, `is_active` = 0 WHERE `key` IN ('send_to_tahesab', 'send_to_pargar'); -UPDATE `settings` SET `can_edit` = 0 WHERE `key` IN ( - 'accounting_provider', - 'tahesab_host', 'tahesab_port', 'tahesab_token', 'tahesab_db', 'tahesab_bank_account', - 'zarin_api', 'zarin_token', 'zarin_noe_kar', 'zarin_noe_kar_tedadi', 'zarin_gorohe_kar', 'zarin_name_g', 'zarin_uid_prefix', - 'pargar_username', 'pargar_password', 'pargar_api_token', - 'pargar_item_id_rial', 'pargar_item_id_gold' -); -UPDATE `settings` SET `can_edit` = 0, `is_active` = 1 WHERE `key` LIKE 'zarin_%'; -UPDATE `settings` SET `type` = 'text', `can_edit` = 0 WHERE `key` IN ('zarin_api', 'zarin_token', 'zarin_name_g', 'zarin_uid_prefix'); -UPDATE `settings` SET `type` = 'number', `can_edit` = 0 WHERE `key` IN ('zarin_noe_kar', 'zarin_noe_kar_tedadi', 'zarin_gorohe_kar'); +-- [super-admin can_edit=0 sync] +-- UPDATE `settings` SET `can_edit` = 0, `is_active` = 0 WHERE `key` IN ('send_to_tahesab', 'send_to_pargar'); +-- [super-admin can_edit=0 sync] +-- UPDATE `settings` SET `can_edit` = 0 WHERE `key` IN ( +-- 'accounting_provider', +-- 'tahesab_host', 'tahesab_port', 'tahesab_token', 'tahesab_db', 'tahesab_bank_account', +-- 'zarin_api', 'zarin_token', 'zarin_noe_kar', 'zarin_noe_kar_tedadi', 'zarin_gorohe_kar', 'zarin_name_g', 'zarin_uid_prefix', +-- 'pargar_username', 'pargar_password', 'pargar_api_token', +-- 'pargar_item_id_rial', 'pargar_item_id_gold' +-- ); +-- [super-admin can_edit=0 sync] +-- UPDATE `settings` SET `can_edit` = 0, `is_active` = 1 WHERE `key` LIKE 'zarin_%'; +-- [super-admin can_edit=0 sync] +-- UPDATE `settings` SET `type` = 'text', `can_edit` = 0 WHERE `key` IN ('zarin_api', 'zarin_token', 'zarin_name_g', 'zarin_uid_prefix'); +-- [super-admin can_edit=0 sync] +-- UPDATE `settings` SET `type` = 'number', `can_edit` = 0 WHERE `key` IN ('zarin_noe_kar', 'zarin_noe_kar_tedadi', 'zarin_gorohe_kar'); -- درگاه شارژ آنلاین (Montify) — متادیتا + can_edit=0 (value دست نخورده) -UPDATE `settings` SET - `title_fa` = 'فعال‌سازی شارژ آنلاین', - `type` = 'switch', - `can_edit` = 0, - `description` = 'روشن: در صورت کامل بودن BASE_URL و client_id و client_secret و gateway، دکمه پرداخت آنلاین در اپ نمایش داده می‌شود. خاموش: فقط واریز دستی.' -WHERE `key` = 'external_payment_enabled'; -UPDATE `settings` SET - `title_fa` = 'نوع درگاه شارژ آنلاین', - `type` = 'select', - `can_edit` = 0, - `description` = 'none=خاموش، montify=پارتنر Montify|none,montify' -WHERE `key` = 'wallet_payment_provider'; -UPDATE `settings` SET - `title_fa` = 'آدرس API درگاه (BASE_URL)', - `type` = 'text', - `can_edit` = 0, - `description` = 'آدرس پایه API سرویس Montify (بدون اسلش انتهایی)، مثلاً https://node.example.com — فقط سرور؛ در اپ کاربر ارسال نمی‌شود.' -WHERE `key` = 'external_payment_base_url'; -UPDATE `settings` SET - `title_fa` = 'شناسه کلاینت (client_id)', - `type` = 'text', - `can_edit` = 0, - `description` = 'شناسه partner (client_id) — فقط سرور؛ در اپ کاربر یا پاسخ get_settings عمومی نیست.' -WHERE `key` = 'external_payment_client_id'; -UPDATE `settings` SET - `title_fa` = 'رمز کلاینت (client_secret)', - `type` = 'text', - `can_edit` = 0, - `description` = 'رمز مخفی partner (client_secret) — فقط سرور. در فرانت و Network تب کاربر دیده نمی‌شود.' -WHERE `key` = 'external_payment_client_secret'; -UPDATE `settings` SET - `title_fa` = 'نام درگاه داخل Montify', - `type` = 'select', - `can_edit` = 0, - `description` = 'نام درگاه فعال داخل Montify: zarinpall، zibal، payping یا sepal|zarinpall,zibal,payping,sepal' -WHERE `key` = 'external_payment_gateway'; -UPDATE `settings` SET - `title_fa` = 'آدرس برگشت (return_url)', - `type` = 'text', - `can_edit` = 0, - `description` = 'آدرس صفحه فرانت بعد از پرداخت. خالی = دامنه سایت + /wallet/payment-result' -WHERE `key` = 'external_payment_return_url'; -UPDATE `settings` SET - `title_fa` = 'آدرس Webhook', - `type` = 'text', - `can_edit` = 0, - `description` = 'آدرس بک‌اند برای webhook (شارژ قطعی کیف). خالی = مسیر پیش‌فرض سرور.' -WHERE `key` = 'external_payment_webhook_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'فعال‌سازی شارژ آنلاین', +-- `type` = 'switch', +-- `can_edit` = 0, +-- `description` = 'روشن: در صورت کامل بودن BASE_URL و client_id و client_secret و gateway، دکمه پرداخت آنلاین در اپ نمایش داده می‌شود. خاموش: فقط واریز دستی.' +-- WHERE `key` = 'external_payment_enabled'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'نوع درگاه شارژ آنلاین', +-- `type` = 'select', +-- `can_edit` = 0, +-- `description` = 'none=خاموش، montify=پارتنر Montify|none,montify' +-- WHERE `key` = 'wallet_payment_provider'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'آدرس API درگاه (BASE_URL)', +-- `type` = 'text', +-- `can_edit` = 0, +-- `description` = 'آدرس پایه API سرویس Montify (بدون اسلش انتهایی)، مثلاً https://node.example.com — فقط سرور؛ در اپ کاربر ارسال نمی‌شود.' +-- WHERE `key` = 'external_payment_base_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'شناسه کلاینت (client_id)', +-- `type` = 'text', +-- `can_edit` = 0, +-- `description` = 'شناسه partner (client_id) — فقط سرور؛ در اپ کاربر یا پاسخ get_settings عمومی نیست.' +-- WHERE `key` = 'external_payment_client_id'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'رمز کلاینت (client_secret)', +-- `type` = 'text', +-- `can_edit` = 0, +-- `description` = 'رمز مخفی partner (client_secret) — فقط سرور. در فرانت و Network تب کاربر دیده نمی‌شود.' +-- WHERE `key` = 'external_payment_client_secret'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'نام درگاه داخل Montify', +-- `type` = 'select', +-- `can_edit` = 0, +-- `description` = 'نام درگاه فعال داخل Montify: zarinpall، zibal، payping یا sepal|zarinpall,zibal,payping,sepal' +-- WHERE `key` = 'external_payment_gateway'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'آدرس برگشت (return_url)', +-- `type` = 'text', +-- `can_edit` = 0, +-- `description` = 'آدرس صفحه فرانت بعد از پرداخت. خالی = دامنه سایت + /wallet/payment-result' +-- WHERE `key` = 'external_payment_return_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'آدرس Webhook', +-- `type` = 'text', +-- `can_edit` = 0, +-- `description` = 'آدرس بک‌اند برای webhook (شارژ قطعی کیف). خالی = مسیر پیش‌فرض سرور.' +-- WHERE `key` = 'external_payment_webhook_url'; -- فقط برای ردیف تازه/خالی: پیش‌فرض خاموش (value موجود ادمین حفظ می‌شود) -UPDATE `settings` SET `value` = 'false' -WHERE `key` = 'external_payment_enabled' AND (`value` IS NULL OR TRIM(`value`) = ''); -UPDATE `settings` SET `value` = 'none' -WHERE `key` = 'wallet_payment_provider' AND (`value` IS NULL OR TRIM(`value`) = ''); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `value` = 'false' +-- WHERE `key` = 'external_payment_enabled' AND (`value` IS NULL OR TRIM(`value`) = ''); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `value` = 'none' +-- WHERE `key` = 'wallet_payment_provider' AND (`value` IS NULL OR TRIM(`value`) = ''); -UPDATE `settings` SET `title_fa` = 'سیستم حسابداری', `type` = 'select', `description` = 'none,pargar,tahesab,zarin' -WHERE `key` = 'accounting_provider'; -UPDATE `settings` SET `description` = 'سیستم حسابداری: none=هیچکدام، pargar=API پرگار، tahesab=ارسال خودکار ته‌حساب، zarin=ارسال خودکار زرین.' WHERE `key` = 'accounting_provider'; -UPDATE `settings` SET `title_fa` = 'آدرس API زرین', `description` = 'آدرس پایه وب‌سرویس زرین (بدون /ZarrinService/accounting).' WHERE `key` = 'zarin_api'; -UPDATE `settings` SET `title_fa` = 'توکن زرین', `description` = 'توکن مکمل API زرین که در نرم‌افزار زرین تعریف می‌شود.' WHERE `key` = 'zarin_token'; -UPDATE `settings` SET `title_fa` = 'نوع کار پیش‌فرض زرین', `type` = 'number', `description` = 'noeKar عمومی. مقدار ۱۶ معمولاً گرمی است و برای sabtSanadTedadi مناسب نیست؛ سند تعدادی از zarin_noe_kar_tedadi استفاده می‌کند.' WHERE `key` = 'zarin_noe_kar'; -UPDATE `settings` SET `title_fa` = 'نوع کار تعدادی زرین', `type` = 'number', `description` = 'noeKar برای سند تعدادی (سکه/شمش/گوی/مکعب). معمولاً ۱۷=سکه-تعدادی یا ۱۸=اجرت تعدادی.' WHERE `key` = 'zarin_noe_kar_tedadi'; -UPDATE `settings` SET `title_fa` = 'گروه کار پیش‌فرض زرین', `type` = 'number', `description` = 'کد gorooheKar هنگام ساخت/جستجوی کار در زرین. برای جداسازی چند پنل روی یک زرین، برای هر پنل مقدار متفاوت بگذارید.' WHERE `key` = 'zarin_gorohe_kar'; -UPDATE `settings` SET `title_fa` = 'نام گروه حساب مشتریان زرین', `type` = 'text', `description` = 'پارامتر nameG در addhesab — گروه حساب زرین. برای اپ خانگی: مشتری نقدی (خریدار) = گروه ۶. گروه همکار استفاده نشود (مظنه متفاوت است).' WHERE `key` = 'zarin_name_g'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'سیستم حسابداری', `type` = 'select', `description` = 'none,pargar,tahesab,zarin' +-- WHERE `key` = 'accounting_provider'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'سیستم حسابداری: none=هیچکدام، pargar=API پرگار، tahesab=ارسال خودکار ته‌حساب، zarin=ارسال خودکار زرین.' WHERE `key` = 'accounting_provider'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'آدرس API زرین', `description` = 'آدرس پایه وب‌سرویس زرین (بدون /ZarrinService/accounting).' WHERE `key` = 'zarin_api'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'توکن زرین', `description` = 'توکن مکمل API زرین که در نرم‌افزار زرین تعریف می‌شود.' WHERE `key` = 'zarin_token'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'نوع کار پیش‌فرض زرین', `type` = 'number', `description` = 'noeKar عمومی. مقدار ۱۶ معمولاً گرمی است و برای sabtSanadTedadi مناسب نیست؛ سند تعدادی از zarin_noe_kar_tedadi استفاده می‌کند.' WHERE `key` = 'zarin_noe_kar'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'نوع کار تعدادی زرین', `type` = 'number', `description` = 'noeKar برای سند تعدادی (سکه/شمش/گوی/مکعب). معمولاً ۱۷=سکه-تعدادی یا ۱۸=اجرت تعدادی.' WHERE `key` = 'zarin_noe_kar_tedadi'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'گروه کار پیش‌فرض زرین', `type` = 'number', `description` = 'کد gorooheKar هنگام ساخت/جستجوی کار در زرین. برای جداسازی چند پنل روی یک زرین، برای هر پنل مقدار متفاوت بگذارید.' WHERE `key` = 'zarin_gorohe_kar'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'نام گروه حساب مشتریان زرین', `type` = 'text', `description` = 'پارامتر nameG در addhesab — گروه حساب زرین. برای اپ خانگی: مشتری نقدی (خریدار) = گروه ۶. گروه همکار استفاده نشود (مظنه متفاوت است).' WHERE `key` = 'zarin_name_g'; -- فقط اگر خالی است، پیش‌فرض گروه ۶ را بگذار (value موجود دست نخورده) -UPDATE `settings` SET `value` = 'مشتری نقدی (خریدار)' WHERE `key` = 'zarin_name_g' AND (`value` IS NULL OR TRIM(`value`) = ''); -UPDATE `settings` SET `title_fa` = 'پیشوند عددی uid زرین', `type` = 'text', `description` = 'فقط عدد. وقتی چند پنل یک زرین دارند باید متفاوت باشد تا uid تکراری نشود.' WHERE `key` = 'zarin_uid_prefix'; -UPDATE `settings` SET `value` = 'pargar' -WHERE `key` = 'accounting_provider' - AND TRIM(COALESCE(`value`, '')) IN ('', 'none') - AND EXISTS (SELECT 1 FROM (SELECT `value` FROM `settings` WHERE `key` = 'send_to_pargar') AS s WHERE s.`value` IN ('true', '1', 'yes')); -UPDATE `settings` SET `value` = 'tahesab' -WHERE `key` = 'accounting_provider' - AND TRIM(COALESCE(`value`, '')) IN ('', 'none') - AND EXISTS (SELECT 1 FROM (SELECT `value` FROM `settings` WHERE `key` = 'send_to_tahesab') AS s WHERE s.`value` IN ('true', '1', 'yes')); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `value` = 'مشتری نقدی (خریدار)' WHERE `key` = 'zarin_name_g' AND (`value` IS NULL OR TRIM(`value`) = ''); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'پیشوند عددی uid زرین', `type` = 'text', `description` = 'فقط عدد. وقتی چند پنل یک زرین دارند باید متفاوت باشد تا uid تکراری نشود.' WHERE `key` = 'zarin_uid_prefix'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `value` = 'pargar' +-- WHERE `key` = 'accounting_provider' +-- AND TRIM(COALESCE(`value`, '')) IN ('', 'none') +-- AND EXISTS (SELECT 1 FROM (SELECT `value` FROM `settings` WHERE `key` = 'send_to_pargar') AS s WHERE s.`value` IN ('true', '1', 'yes')); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `value` = 'tahesab' +-- WHERE `key` = 'accounting_provider' +-- AND TRIM(COALESCE(`value`, '')) IN ('', 'none') +-- AND EXISTS (SELECT 1 FROM (SELECT `value` FROM `settings` WHERE `key` = 'send_to_tahesab') AS s WHERE s.`value` IN ('true', '1', 'yes')); -- آخرین override: کلیدهای runtime همیشه can_edit=1 (tenant-only) UPDATE `settings` SET `can_edit` = 1 WHERE `key` IN ( diff --git a/database/sql/deploy_settings_const_preserve_value_sync_can_edit.sql b/database/sql/deploy_settings_const_preserve_value_sync_can_edit.sql index 59c774a..82ae880 100644 --- a/database/sql/deploy_settings_const_preserve_value_sync_can_edit.sql +++ b/database/sql/deploy_settings_const_preserve_value_sync_can_edit.sql @@ -136,13 +136,15 @@ INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `de SELECT 'admin_url', '', 'آدرس پنل ادمین', 1, 1, NULL, 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'admin_url' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'logo_login', '', 'لوگوی صفحه ورود', 0, 0, NULL, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'logo_login' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'logo_login', '', 'لوگوی صفحه ورود', 0, 0, NULL, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'logo_login' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'logo_register', '', 'لوگوی ثبت‌نام', 0, 0, NULL, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'logo_register' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'logo_register', '', 'لوگوی ثبت‌نام', 0, 0, NULL, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'logo_register' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'has_page_earn_money', 'false', 'صفحه کسب درآمد', 1, 1, NULL, 'switch' @@ -277,36 +279,42 @@ SELECT 'external_order_api_enabled', 'true', 'فعال‌سازی API سفارش WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'external_order_api_enabled' LIMIT 1); -- SSE قیمت (last/list از لاراول) -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'wss_enabled', 'true', 'قیمت لحظه‌ای (SSE)', 0, 1, 'روشن: اپ به sse_path وصل می‌شود؛ خاموش: polling /api/price/last و /customer/product/list', 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'wss_enabled' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'wss_enabled', 'true', 'قیمت لحظه‌ای (SSE)', 0, 1, 'روشن: اپ به sse_path وصل می‌شود؛ خاموش: polling /api/price/last و /customer/product/list', 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'wss_enabled' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'sse_path', '/api/price/stream', 'مسیر SSE قیمت', 0, 1, 'GET لاراول — استریم event:last و event:list با payload کامل', 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'sse_path' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'sse_path', '/api/price/stream', 'مسیر SSE قیمت', 0, 1, 'GET لاراول — استریم event:last و event:list با payload کامل', 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'sse_path' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'tracking_systems', '[]', 'سامانه‌های ردیابی', 0, 1, - 'JSON لیست آنالیتیکس — type: gtag|gtm|clarity|custom؛ id شناسه/کد؛ enabled روشن/خاموش', 'longtext' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tracking_systems' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'tracking_systems', '[]', 'سامانه‌های ردیابی', 0, 1, +-- 'JSON لیست آنالیتیکس — type: gtag|gtm|clarity|custom؛ id شناسه/کد؛ enabled روشن/خاموش', 'longtext' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tracking_systems' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'tracking_systems_enabled', 'false', 'نمایش سامانه‌های ردیابی', 0, 1, - 'روشن: اسکریپت‌های tracking_systems در اپ مشتری بارگذاری می‌شوند؛ خاموش: هیچ ردیابی فعال نیست', 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tracking_systems_enabled' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'tracking_systems_enabled', 'false', 'نمایش سامانه‌های ردیابی', 0, 1, +-- 'روشن: اسکریپت‌های tracking_systems در اپ مشتری بارگذاری می‌شوند؛ خاموش: هیچ ردیابی فعال نیست', 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tracking_systems_enabled' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'permision__enabled', 'false', 'نمایش منوی مجوزها', 0, 1, - 'روشن: آیتم «مجوز ها» در منوی تنظیمات اپ خانگی (تم جدید) نمایش داده می‌شود. خاموش: مخفی است.', 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'permision__enabled' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'permision__enabled', 'false', 'نمایش منوی مجوزها', 0, 1, +-- 'روشن: آیتم «مجوز ها» در منوی تنظیمات اپ خانگی (تم جدید) نمایش داده می‌شود. خاموش: مخفی است.', 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'permision__enabled' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'montify_name', '', 'نام فروشگاه در درگاه', 1, 1, NULL, 'text' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montify_name' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'is_store', 'false', 'حالت فروشگاهی', 0, 1, 'فعال = سبد خرید، دسته‌بندی، حواله، تخفیف', 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'is_store' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'is_store', 'false', 'حالت فروشگاهی', 0, 1, 'فعال = سبد خرید، دسته‌بندی، حواله، تخفیف', 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'is_store' LIMIT 1); -- Jibit INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) @@ -343,41 +351,47 @@ INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `de SELECT 'charge_notif', 'true', 'پیامک شارژ ادمین', 1, 1, NULL WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'charge_notif' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'customer_direct_sms', 'false', 'پیامک تکی به مشتری از لیست', 0, 1, - 'روشن: در لیست مشتریان دکمه ارسال پیامک تکی نمایش داده می‌شود. خاموش: مخفی است. فقط از صفحه دیپلوی قابل تغییر است.', - 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'customer_direct_sms' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'customer_direct_sms', 'false', 'پیامک تکی به مشتری از لیست', 0, 1, +-- 'روشن: در لیست مشتریان دکمه ارسال پیامک تکی نمایش داده می‌شود. خاموش: مخفی است. فقط از صفحه دیپلوی قابل تغییر است.', +-- 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'customer_direct_sms' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'enable_conditional_order', 'false', 'سفارش شرطی', 0, 1, - 'روشن: قابلیت سفارش شرطی سراسری فعال است. خاموش: منو و ارزیابی اجرا نمی‌شود. فقط از دیپلوی قابل تغییر است.', - 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'enable_conditional_order' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'enable_conditional_order', 'false', 'سفارش شرطی', 0, 1, +-- 'روشن: قابلیت سفارش شرطی سراسری فعال است. خاموش: منو و ارزیابی اجرا نمی‌شود. فقط از دیپلوی قابل تغییر است.', +-- 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'enable_conditional_order' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'enable_product_funds', 'false', 'قلک محصول', 0, 1, - 'روشن: ساخت و مدیریت قلک per-product در اپ مشتری فعال است (یک محصول در هر قلک؛ انتقال بدون سند حسابداری). خاموش: منو و API ساخت قلک جدید در دسترس نیست. فقط از دیپلوی قابل تغییر است.', - 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'enable_product_funds' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'enable_product_funds', 'false', 'قلک محصول', 0, 1, +-- 'روشن: ساخت و مدیریت قلک per-product در اپ مشتری فعال است (یک محصول در هر قلک؛ انتقال بدون سند حسابداری). خاموش: منو و API ساخت قلک جدید در دسترس نیست. فقط از دیپلوی قابل تغییر است.', +-- 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'enable_product_funds' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'has_page_price_trigger', 'true', 'هشدار قیمت', 0, 1, - 'روشن: منوی هشدار قیمت در اپ کاربر نمایش داده می‌شود. خاموش: منو و صفحه مخفی است. فقط از دیپلوی قابل تغییر است.', - 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'has_page_price_trigger' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'has_page_price_trigger', 'true', 'هشدار قیمت', 0, 1, +-- 'روشن: منوی هشدار قیمت در اپ کاربر نمایش داده می‌شود. خاموش: منو و صفحه مخفی است. فقط از دیپلوی قابل تغییر است.', +-- 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'has_page_price_trigger' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'has_page_notification', 'true', 'اعلان داخل اپ', 0, 1, - 'روشن: زنگوله اعلان در اپ کاربر و منوی ثبت اعلان در ادمین فعال است. خاموش: مخفی است. فقط از دیپلوی قابل تغییر است.', - 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'has_page_notification' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'has_page_notification', 'true', 'اعلان داخل اپ', 0, 1, +-- 'روشن: زنگوله اعلان در اپ کاربر و منوی ثبت اعلان در ادمین فعال است. خاموش: مخفی است. فقط از دیپلوی قابل تغییر است.', +-- 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'has_page_notification' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'jibit_enabled', 'true', 'احراز هویت جیبیت', 0, 1, - 'روشن: سرویس احراز هویت جیبیت (تطبیق کد ملی/موبایل و کارت بانکی) فعال است. خاموش: هیچ فراخوانی به جیبیت انجام نمی‌شود و احراز هویت خودکار کار نمی‌کند. فقط از صفحه دیپلوی قابل تغییر است.', - 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'jibit_enabled' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'jibit_enabled', 'true', 'احراز هویت جیبیت', 0, 1, +-- 'روشن: سرویس احراز هویت جیبیت (تطبیق کد ملی/موبایل و کارت بانکی) فعال است. خاموش: هیچ فراخوانی به جیبیت انجام نمی‌شود و احراز هویت خودکار کار نمی‌کند. فقط از صفحه دیپلوی قابل تغییر است.', +-- 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'jibit_enabled' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'fee_conditional_order', '0', 'کارمزد سفارش شرطی', 1, 1, @@ -450,15 +464,17 @@ SELECT 'sms_notif_support_admin', 'true', 'پیامک پیام پشتیبانی 'روشن: وقتی مشتری اولین پیام خوانده‌نشده را در چت پشتیبانی می‌فرستد و ادمین همان اتاق را باز و visible ندارد، پیامک به ادمین‌های دارای «ارسال پیامک» می‌رود. خاموش: اعلان پیامک چت نمی‌رود.' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'sms_notif_support_admin' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'chat_webhook_secret', '', 'رمز وب‌هوک چت', 0, 1, - 'رمز مشترک بین لاراول و سرور چت برای اعلان پیام پشتیبانی. فقط سرور؛ در صورت خالی بودن به‌صورت خودکار ساخته می‌شود.', 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'chat_webhook_secret' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'chat_webhook_secret', '', 'رمز وب‌هوک چت', 0, 1, +-- 'رمز مشترک بین لاراول و سرور چت برای اعلان پیام پشتیبانی. فقط سرور؛ در صورت خالی بودن به‌صورت خودکار ساخته می‌شود.', 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'chat_webhook_secret' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'chat_webhook_base_url', '', 'آدرس پایه وب‌هوک چت', 0, 1, - 'اگر APP_URL فرانت است (مثلاً https://niazitala.ir) اینجا آدرس لاراول را بگذار (مثلاً https://niazitala.ir/server). خالی = همان APP_URL.', 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'chat_webhook_base_url' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'chat_webhook_base_url', '', 'آدرس پایه وب‌هوک چت', 0, 1, +-- 'اگر APP_URL فرانت است (مثلاً https://niazitala.ir) اینجا آدرس لاراول را بگذار (مثلاً https://niazitala.ir/server). خالی = همان APP_URL.', 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'chat_webhook_base_url' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) SELECT 'gift_for_referrer', '0.005', 'پاداش معرف', 1, 1, NULL @@ -492,97 +508,119 @@ INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `de SELECT 'referral_limit', '', 'محدودیت دعوت', 1, 1, NULL WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'referral_limit' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'group_sms', 'false', 'پیامک گروهی', 0, 1, - 'روشن: دکمه ارسال پیامک گروهی در پنل ادمین فعال است (ارسال ۱۰تایی). خاموش: ارسال پیامک گروهی غیرفعال است. فقط از تنظیمات پیشرفته.', - 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'group_sms' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'group_sms', 'false', 'پیامک گروهی', 0, 1, +-- 'روشن: دکمه ارسال پیامک گروهی در پنل ادمین فعال است (ارسال ۱۰تایی). خاموش: ارسال پیامک گروهی غیرفعال است. فقط از تنظیمات پیشرفته.', +-- 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'group_sms' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'customer_special_pricing', 'false', 'قیمت ویژه مشتری', 0, 1, - 'روشن: زیرمنوی قیمت ویژه در مشتریان و اعمال سود خرید/فروش پکیج روی مظنه و سفارش برای کاربران انتخاب‌شده. خاموش: غیرفعال. فقط از دیپلوی قابل تغییر است.', - 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'customer_special_pricing' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'customer_special_pricing', 'false', 'قیمت ویژه مشتری', 0, 1, +-- 'روشن: زیرمنوی قیمت ویژه در مشتریان و اعمال سود خرید/فروش پکیج روی مظنه و سفارش برای کاربران انتخاب‌شده. خاموش: غیرفعال. فقط از دیپلوی قابل تغییر است.', +-- 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'customer_special_pricing' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'sms_panel', 'true', 'پنل پیامک (کیف پول)', 0, 1, 'روشن: پنل پیامک و کیف پول billing فعال است. خاموش: پیامک‌ها مثل قبل ارسال می‌شوند بدون billing.', 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'sms_panel' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'sms_panel', 'true', 'پنل پیامک (کیف پول)', 0, 1, 'روشن: پنل پیامک و کیف پول billing فعال است. خاموش: پیامک‌ها مثل قبل ارسال می‌شوند بدون billing.', 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'sms_panel' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'tahesab_host', '', 'آدرس IP سرور ته‌حساب', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tahesab_host' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'tahesab_host', '', 'آدرس IP سرور ته‌حساب', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tahesab_host' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'tahesab_port', '', 'پورت سرور ته‌حساب', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tahesab_port' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'tahesab_port', '', 'پورت سرور ته‌حساب', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tahesab_port' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'tahesab_token', '', 'توکن ته‌حساب', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tahesab_token' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'tahesab_token', '', 'توکن ته‌حساب', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tahesab_token' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'tahesab_db', '', 'دیتابیس ته‌حساب', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tahesab_db' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'tahesab_db', '', 'دیتابیس ته‌حساب', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tahesab_db' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'tahesab_bank_account', '', 'حساب بانکی ته‌حساب', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tahesab_bank_account' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'tahesab_bank_account', '', 'حساب بانکی ته‌حساب', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tahesab_bank_account' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'send_to_tahesab', 'false', 'ارسال به ته‌حساب (قدیمی)', 0, 0, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'send_to_tahesab' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'send_to_tahesab', 'false', 'ارسال به ته‌حساب (قدیمی)', 0, 0, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'send_to_tahesab' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'accounting_provider', 'none', 'سیستم حسابداری', 0, 1, 'none,pargar,tahesab,zarin' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'accounting_provider' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'accounting_provider', 'none', 'سیستم حسابداری', 0, 1, 'none,pargar,tahesab,zarin' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'accounting_provider' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'zarin_api', '', 'آدرس API زرین', 0, 1, 'آدرس پایه وب‌سرویس زرین (بدون /ZarrinService/accounting).', 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'zarin_api' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'zarin_api', '', 'آدرس API زرین', 0, 1, 'آدرس پایه وب‌سرویس زرین (بدون /ZarrinService/accounting).', 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'zarin_api' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'zarin_token', '', 'توکن زرین', 0, 1, 'توکن مکمل API زرین که در نرم‌افزار زرین تعریف می‌شود.', 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'zarin_token' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'zarin_token', '', 'توکن زرین', 0, 1, 'توکن مکمل API زرین که در نرم‌افزار زرین تعریف می‌شود.', 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'zarin_token' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'zarin_noe_kar', '16', 'نوع کار پیش‌فرض زرین', 0, 1, 'کد noeKar هنگام ساخت کار ساخته در زرین.', 'number' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'zarin_noe_kar' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'zarin_noe_kar', '16', 'نوع کار پیش‌فرض زرین', 0, 1, 'کد noeKar هنگام ساخت کار ساخته در زرین.', 'number' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'zarin_noe_kar' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'zarin_gorohe_kar', '52', 'گروه کار پیش‌فرض زرین', 0, 1, 'کد gorooheKar هنگام ساخت/جستجوی کار در زرین. برای جداسازی چند پنل روی یک زرین، برای هر پنل مقدار متفاوت بگذارید.', 'number' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'zarin_gorohe_kar' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'zarin_gorohe_kar', '52', 'گروه کار پیش‌فرض زرین', 0, 1, 'کد gorooheKar هنگام ساخت/جستجوی کار در زرین. برای جداسازی چند پنل روی یک زرین، برای هر پنل مقدار متفاوت بگذارید.', 'number' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'zarin_gorohe_kar' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'zarin_name_g', 'مشتری نقدی (خریدار)', 'نام گروه حساب مشتریان زرین', 0, 1, 'پارامتر nameG در addhesab — گروه حساب زرین. برای اپ خانگی: مشتری نقدی (خریدار) = گروه ۶. گروه همکار استفاده نشود (مظنه متفاوت است).', 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'zarin_name_g' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'zarin_name_g', 'مشتری نقدی (خریدار)', 'نام گروه حساب مشتریان زرین', 0, 1, 'پارامتر nameG در addhesab — گروه حساب زرین. برای اپ خانگی: مشتری نقدی (خریدار) = گروه ۶. گروه همکار استفاده نشود (مظنه متفاوت است).', 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'zarin_name_g' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'zarin_uid_prefix', '', 'پیشوند عددی uid زرین', 0, 1, 'فقط عدد. وقتی چند پنل یک زرین دارند باید متفاوت باشد تا uid تکراری نشود.', 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'zarin_uid_prefix' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'zarin_uid_prefix', '', 'پیشوند عددی uid زرین', 0, 1, 'فقط عدد. وقتی چند پنل یک زرین دارند باید متفاوت باشد تا uid تکراری نشود.', 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'zarin_uid_prefix' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'send_to_pargar', 'false', 'ارسال به پرگار (قدیمی)', 0, 0, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'send_to_pargar' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'send_to_pargar', 'false', 'ارسال به پرگار (قدیمی)', 0, 0, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'send_to_pargar' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'pargar_username', '', 'نام کاربری API پرگار', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'pargar_username' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'pargar_username', '', 'نام کاربری API پرگار', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'pargar_username' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'pargar_password', '', 'رمز عبور API پرگار', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'pargar_password' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'pargar_password', '', 'رمز عبور API پرگار', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'pargar_password' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'pargar_api_token', '', 'توکن ثابت API پرگار', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'pargar_api_token' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'pargar_api_token', '', 'توکن ثابت API پرگار', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'pargar_api_token' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'telegram_bot_token', '', 'توکن بات تلگرام', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'telegram_bot_token' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'telegram_bot_token', '', 'توکن بات تلگرام', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'telegram_bot_token' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'bale_bot_token', '', 'توکن بات بله', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'bale_bot_token' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'bale_bot_token', '', 'توکن بات بله', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'bale_bot_token' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) SELECT 'support_messenger_id', '', 'شناسه پشتیبانی پیام‌رسان', 1, 0, 'یوزرنیم یا شماره تماس بسته به پیام‌رسان انتخاب‌شده' @@ -625,25 +663,30 @@ SELECT 'deposit_support_message_text', 'شماره حساب', 'متن پیام WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'deposit_support_message_text' LIMIT 1); -- min/max قیمت روز (سیستم) -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'up_price', '0', 'بیشترین قیمت امروز', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'up_price' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'up_price', '0', 'بیشترین قیمت امروز', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'up_price' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'down_price', '0', 'کمترین قیمت امروز', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'down_price' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'down_price', '0', 'کمترین قیمت امروز', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'down_price' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'price_extreme_date', '', 'تاریخ min/max روز', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_extreme_date' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'price_extreme_date', '', 'تاریخ min/max روز', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_extreme_date' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'metal_type', 'طلای آبشده', 'عنوان فلز در UI', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'metal_type' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'metal_type', 'طلای آبشده', 'عنوان فلز در UI', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'metal_type' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'main_metal', 'طلا', 'نام فلز اصلی (ادمین)', 0, 1, NULL, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'main_metal' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'main_metal', 'طلا', 'نام فلز اصلی (ادمین)', 0, 1, NULL, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'main_metal' LIMIT 1); -- درگاه — کلیدهای اختیاری payping INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) @@ -715,11 +758,12 @@ SELECT 'fee_service_charge_percentage', '0.005', 'درصد کارمزد سفار WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'fee_service_charge_percentage' LIMIT 1); -- fee_deduct_from_gold: value پیش‌فرض false فقط در INSERT اولیه؛ اجرای مجدد value/is_active را overwrite نمی‌کند -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'fee_deduct_from_gold', 'false', 'اعمال مبلغ دقیق در معامله مشتری', 0, 1, - 'روشن: مشتری دقیقاً همان مبلغ یا وزنی را که وارد کرده دریافت می‌کند. در فروش، مثلاً ۱۰۰ میلیون ریال درخواست → همان ۱۰۰ میلیون واریز و کارمزد از طلای کیف کسر می‌شود. در خرید، مثلاً ۱۰ گرم درخواست → همان ۱۰ گرم واریز و کارمزد به ریال قابل پرداخت اضافه می‌شود. خاموش (پیش‌فرض): در فروش کارمزد از مبلغ ریالی واریزی کم می‌شود (مشتری مبلغ کمتری می‌گیرد). در خرید کارمزد از وزن طلای واریزی کم می‌شود (مشتری طلای کمتری می‌گیرد).', - 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'fee_deduct_from_gold' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'fee_deduct_from_gold', 'false', 'اعمال مبلغ دقیق در معامله مشتری', 0, 1, +-- 'روشن: مشتری دقیقاً همان مبلغ یا وزنی را که وارد کرده دریافت می‌کند. در فروش، مثلاً ۱۰۰ میلیون ریال درخواست → همان ۱۰۰ میلیون واریز و کارمزد از طلای کیف کسر می‌شود. در خرید، مثلاً ۱۰ گرم درخواست → همان ۱۰ گرم واریز و کارمزد به ریال قابل پرداخت اضافه می‌شود. خاموش (پیش‌فرض): در فروش کارمزد از مبلغ ریالی واریزی کم می‌شود (مشتری مبلغ کمتری می‌گیرد). در خرید کارمزد از وزن طلای واریزی کم می‌شود (مشتری طلای کمتری می‌گیرد).', +-- 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'fee_deduct_from_gold' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'min_withdraw', '', 'حداقل برداشت (ریال)', 1, 1, NULL, 'price' @@ -739,9 +783,10 @@ INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `de SELECT 'minimum_sell', '', 'حداقل فروش', 1, 1, NULL, 'price' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'minimum_sell' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'referral_bonus_amount', '', 'مقدار پاداش معرف', 0, 1, NULL, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'referral_bonus_amount' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'referral_bonus_amount', '', 'مقدار پاداش معرف', 0, 1, NULL, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'referral_bonus_amount' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) SELECT 'balance_report_exclude_customer_id', '', 'حذف مشتری از تراز', 1, 1, NULL, 'text' @@ -760,17 +805,24 @@ UPDATE `settings` SET `title_fa` = 'نام فارسی اپ' WHERE `key` = 'name_ UPDATE `settings` SET `title_fa` = 'نام انگلیسی اپ' WHERE `key` = 'name_en' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'آدرس اپ (کاربر)' WHERE `key` = 'app_url' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'آدرس پایه' WHERE `key` = 'bace_url' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); -UPDATE `settings` SET `title_fa` = 'لوگوی صفحه ورود' WHERE `key` = 'logo_login' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); -UPDATE `settings` SET `title_fa` = 'لوگوی ثبت‌نام' WHERE `key` = 'logo_register' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); -UPDATE `settings` SET `title_fa` = 'آدرس پنل ادمین' WHERE `key` = 'admin_url' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); -UPDATE `settings` SET `title_fa` = 'عنوان PWA' WHERE `key` = 'title_pwa' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); -UPDATE `settings` SET `title_fa` = 'عنوان favicon' WHERE `key` = 'title_fav' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'لوگوی صفحه ورود' WHERE `key` = 'logo_login' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'لوگوی ثبت‌نام' WHERE `key` = 'logo_register' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'آدرس پنل ادمین' WHERE `key` = 'admin_url' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'عنوان PWA' WHERE `key` = 'title_pwa' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'عنوان favicon' WHERE `key` = 'title_fav' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'متن قوانین' WHERE `key` = 'text_rule' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'متن درباره ما' WHERE `key` = 'text_about' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); -UPDATE `settings` SET `title_fa` = 'صفحه کسب درآمد' WHERE `key` = 'has_page_earn_money' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'صفحه کسب درآمد' WHERE `key` = 'has_page_earn_money' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'صفحه صندوق' WHERE `key` = 'has_page_fund' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'صفحه مجوزها' WHERE `key` = 'has_page_permission' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); -UPDATE `settings` SET `title_fa` = 'هشدار قیمت' WHERE `key` = 'has_page_price_trigger' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'هشدار قیمت' WHERE `key` = 'has_page_price_trigger' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'صفحه طلای فیزیکی' WHERE `key` = 'has_page_physical_gold' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'رنگ اصلی' WHERE `key` = 'color_primary' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'رنگ ثانویه' WHERE `key` = 'color_secondary' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); @@ -779,31 +831,39 @@ UPDATE `settings` SET `title_fa` = 'چت پشتیبانی' WHERE `key` = 'has_ch UPDATE `settings` SET `title_fa` = 'آدرس API سرور' WHERE `key` = 'server_url' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'کلید داخلی اپ' WHERE `key` = 'key' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'تعداد معرف برای هدیه' WHERE `key` = 'referral_count_for_gift' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); -UPDATE `settings` SET `title_fa` = 'مقدار پاداش معرف' WHERE `key` = 'referral_bonus_amount' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = '' OR `title_fa` = 'مبلغ پاداش معرف'); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'مقدار پاداش معرف' WHERE `key` = 'referral_bonus_amount' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = '' OR `title_fa` = 'مبلغ پاداش معرف'); UPDATE `settings` SET `title_fa` = 'حداقل برداشت (ریال)' WHERE `key` = 'min_withdraw' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'حداقل واریز کیف پول (ریال)' WHERE `key` = 'min_deposit' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'حداقل اولین خرید (ریال)' WHERE `key` = 'min_first_buy' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `value` = '1000000' WHERE `key` = 'min_deposit' AND (`value` IS NULL OR TRIM(`value`) = ''); UPDATE `settings` SET `title_fa` = 'حداقل فروش' WHERE `key` = 'minimum_sell' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'ثبت‌نام باز' WHERE `key` = 'open_register' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); -UPDATE `settings` SET `title_fa` = 'ارسال به ته‌حساب' WHERE `key` = 'send_to_tahesab' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); -UPDATE `settings` SET `title_fa` = 'گرد کردن تومان پی‌پینگ' WHERE `key` = 'payping_round_toman' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'ارسال به ته‌حساب' WHERE `key` = 'send_to_tahesab' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'گرد کردن تومان پی‌پینگ' WHERE `key` = 'payping_round_toman' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'برداشت ناموفق سخت‌گیرانه' WHERE `key` = 'payping_strict_failed_withdraw' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'وضعیت فروشگاه' WHERE `key` = 'store_status' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); -UPDATE `settings` SET `title_fa` = 'حالت فروشگاهی' WHERE `key` = 'is_store' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); -UPDATE `settings` SET `title_fa` = 'محصولات متصل به کیف اصلی' WHERE `key` = 'main_wallet_products' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'حالت فروشگاهی' WHERE `key` = 'is_store' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'محصولات متصل به کیف اصلی' WHERE `key` = 'main_wallet_products' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'واحد وزن' WHERE `key` = 'unit' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'حذف مشتری از تراز' WHERE `key` = 'balance_report_exclude_customer_id' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); -UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'منبع قیمت'), - `description` = 'منبع فعال قیمت|montzar,zaarbox,main_product' -WHERE `key` = 'price_provider'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'منبع قیمت'), +-- `description` = 'منبع فعال قیمت|montzar,zaarbox,main_product' +-- WHERE `key` = 'price_provider'; -UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'محصول / UUID تابلو') -WHERE `key` = 'main_product'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'محصول / UUID تابلو') +-- WHERE `key` = 'main_product'; -UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'آدرس API Zaarbox') -WHERE `key` = 'zaarbox_api_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'آدرس API Zaarbox') +-- WHERE `key` = 'zaarbox_api_url'; UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'شناسه ردیف Zaarbox') WHERE `key` = 'zaarbox_price_key'; @@ -826,26 +886,31 @@ WHERE `key` = 'jibit_verification'; UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'تأیید ثبت‌نام جیبیت') WHERE `key` = 'register_jibit_verify'; -UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'شناسه کلاینت API خارجی') -WHERE `key` = 'node_client_id'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'شناسه کلاینت API خارجی') +-- WHERE `key` = 'node_client_id'; UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'کلید HMAC API خارجی') WHERE `key` = 'node_shared_secret'; -UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'API سفارش خارجی') -WHERE `key` = 'external_order_api_enabled'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'API سفارش خارجی') +-- WHERE `key` = 'external_order_api_enabled'; -UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'قیمت لحظه‌ای (SSE)') -WHERE `key` = 'wss_enabled'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'قیمت لحظه‌ای (SSE)') +-- WHERE `key` = 'wss_enabled'; -UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'مسیر SSE قیمت') -WHERE `key` = 'sse_path'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'مسیر SSE قیمت') +-- WHERE `key` = 'sse_path'; UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'بسته بودن همکار') WHERE `key` = 'montzar_closed'; -UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'نام فروشگاه در درگاه') -WHERE `key` = 'montify_name'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'نام فروشگاه در درگاه') +-- WHERE `key` = 'montify_name'; -- ============================================================================= -- CONST — کلیدهای مورد استفاده کد @@ -888,7 +953,8 @@ WHERE `key` = 'main_product'; UPDATE `settings` SET `type` = 'longtext' WHERE `key` IN ('text_rule', 'text_about', 'support_messenger_text', 'invite_link_text', 'deposit_support_message_text', 'montzar_order_response', 'tracking_systems'); -- select (+ گزینه‌ها در description) -UPDATE `settings` SET `type` = 'select', `description` = 'منبع فعال قیمت|montzar,zaarbox,main_product' WHERE `key` = 'price_provider'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `type` = 'select', `description` = 'منبع فعال قیمت|montzar,zaarbox,main_product' WHERE `key` = 'price_provider'; UPDATE `settings` SET `type` = 'switch', `title_fa` = 'کد معرف اجباری', `description` = 'روشن = اجباری در ثبت‌نام | خاموش = اختیاری' WHERE `key` = 'referral_id'; UPDATE `settings` SET `type` = 'switch', `title_fa` = 'نمایش فیلد کد معرف', `description` = 'روشن: فیلد کد معرف در صفحه ثبت‌نام اپ کاربر نمایش داده می‌شود. خاموش: فیلد مخفی است (لینک دعوت با ?id= همچنان اعمال می‌شود).' WHERE `key` = 'referral_show'; UPDATE `settings` SET `type` = 'select', `description` = 'sepal,' WHERE `key` = 'payping_gateway_name'; @@ -966,13 +1032,15 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_provider' LIMIT -- حذف alias قدیمی؛ منبع واحد: fee_service_charge_percentage DELETE FROM `settings` WHERE `key` = 'service_charge_percentage'; -INSERT INTO `settings` (`key`, `title_fa`, `value`, `can_edit`, `is_exist`, `is_active`, `type`) -SELECT 'title_pwa', 'عنوان PWA', '', 0, 0, 0, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'title_pwa' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `title_fa`, `value`, `can_edit`, `is_exist`, `is_active`, `type`) +-- SELECT 'title_pwa', 'عنوان PWA', '', 0, 0, 0, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'title_pwa' LIMIT 1); -INSERT INTO `settings` (`key`, `title_fa`, `value`, `can_edit`, `is_exist`, `is_active`, `type`) -SELECT 'title_fav', 'عنوان favicon', '', 0, 0, 0, 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'title_fav' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `title_fa`, `value`, `can_edit`, `is_exist`, `is_active`, `type`) +-- SELECT 'title_fav', 'عنوان favicon', '', 0, 0, 0, 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'title_fav' LIMIT 1); INSERT INTO `settings` (`key`, `title_fa`, `value`, `can_edit`, `is_exist`, `is_active`, `type`) SELECT 'text_rule', 'متن قوانین', '', 1, 0, 1, 'longtext' @@ -1003,10 +1071,11 @@ SELECT 'unit', '', 'واحد وزن دارایی و معاملات', 1, 1, 'واحد نمایش وزن فلز در دارایی‌ها، کیف پول و تراکنش‌ها|گرم,کیلوگرم', 'select' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'unit' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'main_wallet_products', '13', 'محصولات متصل به کیف اصلی', 0, 1, - 'محصولاتی که موجودی‌شان از کیف طلای اصلی خوانده می‌شود. چند محصول با کاما. پیش‌فرض: 13' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'main_wallet_products' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'main_wallet_products', '13', 'محصولات متصل به کیف اصلی', 0, 1, +-- 'محصولاتی که موجودی‌شان از کیف طلای اصلی خوانده می‌شود. چند محصول با کاما. پیش‌فرض: 13' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'main_wallet_products' LIMIT 1); -- --------------------------------------------------------------------------- -- const — کلیدهای اضافی @@ -1074,8 +1143,9 @@ UPDATE `settings` SET `description` = NULL WHERE LOWER(TRIM(COALESCE(`description`, ''))) IN ('true', 'false', '0', '1', 'yes', 'no', 'in server') OR TRIM(COALESCE(`description`, '')) LIKE 'count of%'; -UPDATE `settings` SET `description` = 'منبع فعال قیمت. montzar = همکار|montzar,zaarbox,main_product' -WHERE `key` = 'price_provider'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'منبع فعال قیمت. montzar = همکار|montzar,zaarbox,main_product' +-- WHERE `key` = 'price_provider'; UPDATE `settings` SET `type` = 'switch', @@ -1102,7 +1172,8 @@ UPDATE `settings` SET `type` = 'number', `title_fa` = 'تعداد سفارش ا WHERE `key` = 'fee_free'; UPDATE `settings` SET `description` = 'تعداد سفارش اول بدون کارمزد' WHERE `key` = 'fee_free'; -UPDATE `settings` SET `description` = 'id یا reading_method محصول آبشده' WHERE `key` = 'main_product'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'id یا reading_method محصول آبشده' WHERE `key` = 'main_product'; UPDATE `settings` SET `title_fa` = 'شناسه پشتیبانی پیام‌رسان', @@ -1163,29 +1234,33 @@ UPDATE `settings` SET `description` = 'bale,telegram,whatsapp,rubika,eitaa,soroush' WHERE `key` = 'support_messenger'; -UPDATE `settings` SET - `title_fa` = 'آدرس IP سرور ته‌حساب', - `type` = 'text', - `description` = NULL -WHERE `key` = 'tahesab_host'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'آدرس IP سرور ته‌حساب', +-- `type` = 'text', +-- `description` = NULL +-- WHERE `key` = 'tahesab_host'; -UPDATE `settings` SET - `title_fa` = 'پورت سرور ته‌حساب', - `type` = 'number', - `description` = NULL -WHERE `key` = 'tahesab_port'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'پورت سرور ته‌حساب', +-- `type` = 'number', +-- `description` = NULL +-- WHERE `key` = 'tahesab_port'; -UPDATE `settings` SET - `title_fa` = 'نام دیتابیس ته‌حساب', - `type` = 'text', - `description` = 'مثال: TahesabDB' -WHERE `key` = 'tahesab_db'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'نام دیتابیس ته‌حساب', +-- `type` = 'text', +-- `description` = 'مثال: TahesabDB' +-- WHERE `key` = 'tahesab_db'; -UPDATE `settings` SET - `title_fa` = 'حساب بانکی ته‌حساب', - `type` = 'text', - `description` = 'نام حساب بانکی در سند واریز' -WHERE `key` = 'tahesab_bank_account'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'حساب بانکی ته‌حساب', +-- `type` = 'text', +-- `description` = 'نام حساب بانکی در سند واریز' +-- WHERE `key` = 'tahesab_bank_account'; -- ته‌حساب: فقط can_edit طبق ساختار SQL؛ value موجود دست نخورده UPDATE `settings` SET `can_edit` = 1 @@ -1197,38 +1272,47 @@ WHERE `key` IN ('tahesab_host', 'tahesab_port', 'tahesab_token', 'tahesab_db', ' */ /* DISABLED: value رکورد موجود نباید در deploy تغییر کند؛ default فقط هنگام INSERT کلید جدید اعمال می‌شود. -UPDATE `settings` SET `value` = 'false' -WHERE `key` = 'send_to_tahesab' AND TRIM(COALESCE(`value`, '')) = ''; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `value` = 'false' +-- WHERE `key` = 'send_to_tahesab' AND TRIM(COALESCE(`value`, '')) = ''; */ -- is_store فقط از دیتابیس/دیپلوی — در پنل قابل ویرایش نیست -UPDATE `settings` SET `can_edit` = 0 WHERE `key` = 'is_store'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `can_edit` = 0 WHERE `key` = 'is_store'; -- metal_type فقط از دیپلوی/SQL (مثلاً «کاتد مس» برای بورس مس) -UPDATE `settings` SET `can_edit` = 0 WHERE `key` = 'metal_type'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `can_edit` = 0 WHERE `key` = 'metal_type'; -- SSE قیمت — فقط دیپلوی/SQL -UPDATE `settings` SET `can_edit` = 0 WHERE `key` IN ( - 'wss_enabled', 'sse_path', 'tahesab_port' -); +-- [super-admin can_edit=0 sync] +-- UPDATE `settings` SET `can_edit` = 0 WHERE `key` IN ( +-- 'wss_enabled', 'sse_path', 'tahesab_port' +-- ); -- لوگو / PWA / favicon — فقط از دیپلوی؛ در پنل نمایش داده نمی‌شوند -UPDATE `settings` SET `can_edit` = 0, `is_active` = 0 -WHERE `key` IN ('logo_login', 'logo_register', 'title_pwa', 'title_fav'); +-- [super-admin can_edit=0 sync] +-- UPDATE `settings` SET `can_edit` = 0, `is_active` = 0 +-- WHERE `key` IN ('logo_login', 'logo_register', 'title_pwa', 'title_fav'); -UPDATE `settings` SET `title_fa` = 'مقدار پاداش معرف' WHERE `key` = 'referral_bonus_amount'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'مقدار پاداش معرف' WHERE `key` = 'referral_bonus_amount'; UPDATE `settings` SET `type` = 'text' WHERE `key` = 'balance_report_exclude_customer_id'; -- پاکسازی title_fa / description از نام پروژه یا ارجاع کد -UPDATE `settings` SET `title_fa` = 'حالت فروشگاهی' -WHERE `key` = 'is_store' AND (`title_fa` LIKE '%قطره%' OR `title_fa` LIKE '%کشکول%'); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'حالت فروشگاهی' +-- WHERE `key` = 'is_store' AND (`title_fa` LIKE '%قطره%' OR `title_fa` LIKE '%کشکول%'); -UPDATE `settings` SET `title_fa` = 'همگام‌سازی fin' -WHERE `key` = 'payping_fin_sync_enabled' AND `title_fa` LIKE '%لیمان%'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'همگام‌سازی fin' +-- WHERE `key` = 'payping_fin_sync_enabled' AND `title_fa` LIKE '%لیمان%'; -UPDATE `settings` SET `title_fa` = 'نام فروشگاه در درگاه', `description` = 'نام فروشگاه که در درگاه پرداخت و رسید بانکی به کاربر نمایش داده می‌شود.' -WHERE `key` = 'montify_name'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'نام فروشگاه در درگاه', `description` = 'نام فروشگاه که در درگاه پرداخت و رسید بانکی به کاربر نمایش داده می‌شود.' +-- WHERE `key` = 'montify_name'; -- descriptionهای قدیمی که عمداً NULL می‌شدند — در بلوک پایانی بازنویسی می‌شوند @@ -1244,24 +1328,36 @@ UPDATE `const` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'لاگ -- --------------------------------------------------------------------------- UPDATE `settings` SET `description` = 'نام فارسی برند که در پیامک‌ها، عنوان صفحات و بخش‌های عمومی اپ کاربر نمایش داده می‌شود.' WHERE `key` = 'name_fa'; UPDATE `settings` SET `description` = 'آدرس کامل وب‌اپ کاربر (با https). در لینک‌های پیامک، بازگشت از درگاه و ارجاعات داخلی استفاده می‌شود.' WHERE `key` = 'app_url'; -UPDATE `settings` SET `description` = 'آدرس کامل پنل مدیریت (با https). برای لینک‌های ادمین و تنظیمات CORS در صورت نیاز.' WHERE `key` = 'admin_url'; -UPDATE `settings` SET `description` = 'آدرس تصویر لوگو در صفحه ورود. معمولاً از طریق دیپلوی یا آپلود فایل تنظیم می‌شود؛ در پنل قابل ویرایش نیست.' WHERE `key` = 'logo_login'; -UPDATE `settings` SET `description` = 'آدرس تصویر لوگو در صفحه ثبت‌نام. معمولاً از طریق دیپلوی تنظیم می‌شود؛ در پنل قابل ویرایش نیست.' WHERE `key` = 'logo_register'; -UPDATE `settings` SET `description` = 'عنوان کوتاه برای نصب PWA روی موبایل. از دیپلوی مدیریت می‌شود.' WHERE `key` = 'title_pwa'; -UPDATE `settings` SET `description` = 'عنوان نمایش‌داده‌شده در تب مرورگر (favicon). از دیپلوی مدیریت می‌شود.' WHERE `key` = 'title_fav'; -UPDATE `settings` SET `description` = 'عنوان فلز اصلی در رابط کاربر (مثلاً «طلای آبشده» یا «کاتد مس»). در دارایی، کیف پول و برچسب‌های معامله دیده می‌شود. فقط از دیپلوی/SQL تغییر می‌کند.' WHERE `key` = 'metal_type'; -UPDATE `settings` SET `title_fa` = 'نام فلز اصلی (ادمین)', `description` = 'نام کوتاه فلز برای برچسب‌های پنل ادمین (مثلاً «مس» یا «طلا»). «تراز طلایی» می‌شود «تراز مس» — نه «تراز مسی». فقط از دیپلوی/SQL تغییر می‌کند.' WHERE `key` = 'main_metal'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'آدرس کامل پنل مدیریت (با https). برای لینک‌های ادمین و تنظیمات CORS در صورت نیاز.' WHERE `key` = 'admin_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'آدرس تصویر لوگو در صفحه ورود. معمولاً از طریق دیپلوی یا آپلود فایل تنظیم می‌شود؛ در پنل قابل ویرایش نیست.' WHERE `key` = 'logo_login'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'آدرس تصویر لوگو در صفحه ثبت‌نام. معمولاً از طریق دیپلوی تنظیم می‌شود؛ در پنل قابل ویرایش نیست.' WHERE `key` = 'logo_register'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'عنوان کوتاه برای نصب PWA روی موبایل. از دیپلوی مدیریت می‌شود.' WHERE `key` = 'title_pwa'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'عنوان نمایش‌داده‌شده در تب مرورگر (favicon). از دیپلوی مدیریت می‌شود.' WHERE `key` = 'title_fav'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'عنوان فلز اصلی در رابط کاربر (مثلاً «طلای آبشده» یا «کاتد مس»). در دارایی، کیف پول و برچسب‌های معامله دیده می‌شود. فقط از دیپلوی/SQL تغییر می‌کند.' WHERE `key` = 'metal_type'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'نام فلز اصلی (ادمین)', `description` = 'نام کوتاه فلز برای برچسب‌های پنل ادمین (مثلاً «مس» یا «طلا»). «تراز طلایی» می‌شود «تراز مس» — نه «تراز مسی». فقط از دیپلوی/SQL تغییر می‌کند.' WHERE `key` = 'main_metal'; UPDATE `settings` SET `description` = 'واحد نمایش وزن در دارایی‌ها، کیف پول و جزئیات معاملات|گرم,کیلوگرم' WHERE `key` = 'unit'; UPDATE `settings` SET `description` = 'روشن: کاربران جدید می‌توانند ثبت‌نام کنند. خاموش: فقط ورود کاربران موجود مجاز است.' WHERE `key` = 'open_register'; UPDATE `settings` SET `description` = 'روشن: بعد از ثبت‌نام کاربر می‌تواند وارد اپ شود (بدون تأیید دستی ادمین). خاموش: ورود فقط بعد از فعال‌سازی دستی در پنل. این سوییچ اجازهٔ خرید/فروش نمی‌دهد — معامله فقط بعد از احراز هویت ممکن است.' WHERE `key` = 'auto_active_customer'; -UPDATE `settings` SET `description` = 'نوع چیدمان اپ: روشن = حالت فروشگاهی (سبد، دسته‌بندی، حواله و …). خاموش = حالت معامله آبشده/محصولات کلاسیک. فقط از دیپلوی تغییر می‌کند.' WHERE `key` = 'is_store'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'نوع چیدمان اپ: روشن = حالت فروشگاهی (سبد، دسته‌بندی، حواله و …). خاموش = حالت معامله آبشده/محصولات کلاسیک. فقط از دیپلوی تغییر می‌کند.' WHERE `key` = 'is_store'; UPDATE `settings` SET `description` = 'روشن: نمودار قیمت از تاریخچه ذخیره‌شده در دیتابیس خودتان. خاموش: از سرویس تابلو آنلاین (با شناسه chart_id) استفاده می‌شود.' WHERE `key` = 'chart_use_local_data'; -UPDATE `settings` SET `description` = 'شناسه یکتا (UUID) نمودار در سرویس تابلو. اگر خالی باشد از شناسه پیش‌فرض سرویس استفاده می‌شود.' WHERE `key` = 'chart_id'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'شناسه یکتا (UUID) نمودار در سرویس تابلو. اگر خالی باشد از شناسه پیش‌فرض سرویس استفاده می‌شود.' WHERE `key` = 'chart_id'; -UPDATE `settings` SET `description` = 'منبع دریافت قیمت لحظه‌ای برای اپ کاربر و همگام‌سازی محصولات. مقدار montzar = قیمت از همکار (Montzar).|montzar,zaarbox,main_product' WHERE `key` = 'price_provider'; -UPDATE `settings` SET `description` = 'شناسه عددی یا نام reading_method محصول آبشده مرجع. وقتی منبع قیمت روی main_product باشد برای محاسبه استفاده می‌شود.' WHERE `key` = 'main_product'; -UPDATE `settings` SET `description` = 'آدرس پایه API سرویس تابلو آنلاین (بدون مسیر انتهایی). مثال: https://example.com/api' WHERE `key` = 'zaarbox_api_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'منبع دریافت قیمت لحظه‌ای برای اپ کاربر و همگام‌سازی محصولات. مقدار montzar = قیمت از همکار (Montzar).|montzar,zaarbox,main_product' WHERE `key` = 'price_provider'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'شناسه عددی یا نام reading_method محصول آبشده مرجع. وقتی منبع قیمت روی main_product باشد برای محاسبه استفاده می‌شود.' WHERE `key` = 'main_product'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'آدرس پایه API سرویس تابلو آنلاین (بدون مسیر انتهایی). مثال: https://example.com/api' WHERE `key` = 'zaarbox_api_url'; UPDATE `settings` SET `description` = 'کلید یا UUID ردیف قیمت در پاسخ API تابلو. باید با محصول/ردیف موردنظر در سرویس خارجی یکسان باشد.' WHERE `key` = 'zaarbox_price_key'; UPDATE `settings` SET `description` = 'روشن: اگر API قیمت در دسترس نباشد، آخرین قیمت ذخیره‌شده در دیتابیس به کاربر نشان داده می‌شود. خاموش: در قطعی API ممکن است قیمت صفر نمایش داده شود.' WHERE `key` = 'show_last_price'; UPDATE `settings` SET `description` = 'روشن: وقتی فروشگاه خارج از ساعت کاری است، قیمت صفحه اصلی اپ همچنان نمایش داده می‌شود و پیام «فروشگاه بسته است» نشان داده نمی‌شود. خرید/فروش همچنان بسته می‌ماند. خاموش: مثل قبل، خارج از ساعت پیام بسته بودن و قیمت صفر نشان داده می‌شود.' WHERE `key` = 'show_home_price_when_closed'; @@ -1286,19 +1382,23 @@ UPDATE `settings` SET `description` = 'ساعت پایان فعالیت روزا UPDATE `settings` SET `description` = 'مبلغ اضافه (ریال) روی قیمت پایه برای سمت خرید. خالی یا صفر = بدون اختلاف.' WHERE `key` = 'buy_fee'; UPDATE `settings` SET `description` = 'مبلغ کسر (ریال) از قیمت پایه برای سمت فروش. خالی یا صفر = بدون اختلاف.' WHERE `key` = 'sell_fee'; UPDATE `settings` SET `description` = 'درصد کارمزد هر سفارش از مبلغ معامله (اعشاری؛ مثلاً ۰٫۰۰۵ یعنی نیم در هزار).' WHERE `key` = 'fee_service_charge_percentage'; -UPDATE `settings` SET - `title_fa` = 'اعمال مبلغ دقیق در معامله مشتری', - `type` = 'switch', - `description` = 'روشن: مشتری دقیقاً همان مبلغ یا وزنی را که وارد کرده دریافت می‌کند. در فروش، مثلاً ۱۰۰ میلیون ریال درخواست → همان ۱۰۰ میلیون واریز و کارمزد از طلای کیف کسر می‌شود. در خرید، مثلاً ۱۰ گرم درخواست → همان ۱۰ گرم واریز و کارمزد به ریال قابل پرداخت اضافه می‌شود. خاموش (پیش‌فرض): در فروش کارمزد از مبلغ ریالی واریزی کم می‌شود (مشتری مبلغ کمتری می‌گیرد). در خرید کارمزد از وزن طلای واریزی کم می‌شود (مشتری طلای کمتری می‌گیرد).' -WHERE `key` = 'fee_deduct_from_gold'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'اعمال مبلغ دقیق در معامله مشتری', +-- `type` = 'switch', +-- `description` = 'روشن: مشتری دقیقاً همان مبلغ یا وزنی را که وارد کرده دریافت می‌کند. در فروش، مثلاً ۱۰۰ میلیون ریال درخواست → همان ۱۰۰ میلیون واریز و کارمزد از طلای کیف کسر می‌شود. در خرید، مثلاً ۱۰ گرم درخواست → همان ۱۰ گرم واریز و کارمزد به ریال قابل پرداخت اضافه می‌شود. خاموش (پیش‌فرض): در فروش کارمزد از مبلغ ریالی واریزی کم می‌شود (مشتری مبلغ کمتری می‌گیرد). در خرید کارمزد از وزن طلای واریزی کم می‌شود (مشتری طلای کمتری می‌گیرد).' +-- WHERE `key` = 'fee_deduct_from_gold'; UPDATE `settings` SET `description` = 'تعداد اولین سفارش‌های هر کاربر که از کارمزد معاف می‌شوند. ۰ = غیرفعال.' WHERE `key` = 'fee_free'; UPDATE `settings` SET `description` = 'حداقل مبلغ درخواست برداشت وجه (ریال). درخواست‌های کمتر رد می‌شوند.' WHERE `key` = 'min_withdraw'; UPDATE `settings` SET `description` = 'حداقل مبلغ واریز به کیف پول (ریال). مبالغ کمتر در اپ و درگاه پذیرفته نمی‌شوند.' WHERE `key` = 'min_deposit'; UPDATE `settings` SET `description` = 'حداقل مبلغ اولین خرید هر کاربر (ریال). برای فعال‌سازی کیف یا احراز سطح اول استفاده می‌شود.' WHERE `key` = 'min_first_buy'; UPDATE `settings` SET `description` = 'حداقل مقدار/مبلغ مجاز برای ثبت سفارش فروش. بسته به نوع محصول می‌تواند وزن یا ریال باشد.' WHERE `key` = 'minimum_sell'; -UPDATE `settings` SET `description` = 'بیشترین قیمت ثبت‌شده در روز جاری (ریال). توسط سیستم به‌روز می‌شود؛ دستی تغییر ندهید.' WHERE `key` = 'up_price'; -UPDATE `settings` SET `description` = 'کمترین قیمت ثبت‌شده در روز جاری (ریال). توسط سیستم به‌روز می‌شود؛ دستی تغییر ندهید.' WHERE `key` = 'down_price'; -UPDATE `settings` SET `description` = 'تاریخ آخرین به‌روزرسانی بیشترین/کمترین قیمت روز. توسط سیستم پر می‌شود.' WHERE `key` = 'price_extreme_date'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'بیشترین قیمت ثبت‌شده در روز جاری (ریال). توسط سیستم به‌روز می‌شود؛ دستی تغییر ندهید.' WHERE `key` = 'up_price'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'کمترین قیمت ثبت‌شده در روز جاری (ریال). توسط سیستم به‌روز می‌شود؛ دستی تغییر ندهید.' WHERE `key` = 'down_price'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'تاریخ آخرین به‌روزرسانی بیشترین/کمترین قیمت روز. توسط سیستم پر می‌شود.' WHERE `key` = 'price_extreme_date'; UPDATE `settings` SET `description` = 'شناسه عددی مشتری که از گزارش تراز و آمار تجمیعی حذف می‌شود (مثلاً حساب تست). چند id با کاما.' WHERE `key` = 'balance_report_exclude_customer_id'; UPDATE `settings` SET `description` = 'تنظیم legacy — از price_provider استفاده کنید. روشن بودن این گزینه دیگر توصیه نمی‌شود.' WHERE `key` = 'main_product_price'; @@ -1319,20 +1419,27 @@ UPDATE `settings` SET `description` = 'روشن: اگر منبع قیمت montzar باشد، قبل از واریز پاداش معرف/معرف‌شونده همان وزن از همکار خرید می‌شود؛ شکست خرید = واریز نمی‌شود. خاموش: مثل قبل فقط به کیف واریز می‌شود بدون خرید از همکار.' WHERE `key` = 'referral_gift_buy_from_montzar'; UPDATE `settings` SET `description` = 'حداکثر تعداد دعوت‌های مجاز برای هر کاربر. خالی = بدون محدودیت.' WHERE `key` = 'referral_limit'; -UPDATE `settings` SET `description` = 'مبلغ یا مقدار پاداش معرف (متن آزاد — بسته به پیاده‌سازی پیامک/اعتبار). برای نمایش در پیام‌ها.' WHERE `key` = 'referral_bonus_amount'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'مبلغ یا مقدار پاداش معرف (متن آزاد — بسته به پیاده‌سازی پیامک/اعتبار). برای نمایش در پیام‌ها.' WHERE `key` = 'referral_bonus_amount'; UPDATE `settings` SET `description` = 'روشن: تطبیق شماره کارت بانکی کاربر با سرویس احراز هویت جیبیت هنگام ثبت/ویرایش کارت.' WHERE `key` = 'jibit_verification'; UPDATE `settings` SET `description` = 'روشن: تطبیق کد ملی و موبایل در فرآیند ثبت‌نام از طریق سرویس جیبیت.' WHERE `key` = 'register_jibit_verify'; -UPDATE `settings` SET `description` = 'روشن: منوی «کسب درآمد / دعوت دوستان» در اپ کاربر نمایش داده می‌شود.' WHERE `key` = 'has_page_earn_money'; -UPDATE `settings` SET `description` = 'روشن: منوی هشدار قیمت در اپ کاربر نمایش داده می‌شود. خاموش: منو و صفحه مخفی است. فقط از دیپلوی قابل تغییر است.' WHERE `key` = 'has_page_price_trigger'; -UPDATE `settings` SET `description` = 'روشن: زنگوله اعلان در اپ کاربر و منوی ثبت اعلان در ادمین فعال است. خاموش: مخفی است. فقط از دیپلوی قابل تغییر است.' WHERE `key` = 'has_page_notification'; -UPDATE `settings` SET `title_fa` = 'اعلان داخل اپ' WHERE `key` = 'has_page_notification'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'روشن: منوی «کسب درآمد / دعوت دوستان» در اپ کاربر نمایش داده می‌شود.' WHERE `key` = 'has_page_earn_money'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'روشن: منوی هشدار قیمت در اپ کاربر نمایش داده می‌شود. خاموش: منو و صفحه مخفی است. فقط از دیپلوی قابل تغییر است.' WHERE `key` = 'has_page_price_trigger'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'روشن: زنگوله اعلان در اپ کاربر و منوی ثبت اعلان در ادمین فعال است. خاموش: مخفی است. فقط از دیپلوی قابل تغییر است.' WHERE `key` = 'has_page_notification'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'اعلان داخل اپ' WHERE `key` = 'has_page_notification'; -- محصول: اعلان داخل اپ پیش‌فرض روشن برای همه دیپلوی‌ها (can_edit=0؛ فقط از دیپلوی) -UPDATE `settings` SET `value` = 'true' WHERE `key` = 'has_page_notification'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `value` = 'true' WHERE `key` = 'has_page_notification'; UPDATE `settings` SET `description` = 'شماره موبایل حساب API سرویس همکار قیمت. برای دریافت توکن و لیست محصولات.' WHERE `key` = 'montzar_mobile'; UPDATE `settings` SET `description` = 'رمز عبور حساب API سرویس همکار قیمت. محرمانه نگه دارید.' WHERE `key` = 'montzar_password'; UPDATE `settings` SET `description` = 'شناسه محصول آبشده در API همکار. باید با محصول مرجع در سرویس خارجی یکسان باشد.' WHERE `key` = 'montzar_product_id'; -UPDATE `settings` SET `description` = 'آدرس پایه سرور API همکار (بدون اسلش انتهایی). مثال: https://example.com' WHERE `key` = 'montzar_base_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'آدرس پایه سرور API همکار (بدون اسلش انتهایی). مثال: https://example.com' WHERE `key` = 'montzar_base_url'; UPDATE `settings` SET `description` = 'توکن دسترسی API همکار. پس از ورود موفق توسط سیستم پر می‌شود؛ دستی ویرایش نکنید.' WHERE `key` = 'montzar_token'; UPDATE `settings` SET `description` = 'اختلاف قیمت دریافتی از همکار (ریال). توسط cron/همگام‌سازی پر می‌شود.' WHERE `key` = 'montzar_diff'; UPDATE `settings` SET `description` = 'آخرین قیمت لحظه‌ای دریافت‌شده از همکار (ریال). فقط خواندنی — توسط سیستم به‌روز می‌شود.' WHERE `key` = 'montzar_live_price'; @@ -1344,33 +1451,51 @@ UPDATE `settings` SET `description` = 'روشن: امکان ثبت سفارش ف UPDATE `settings` SET `description` = 'روشن: سرویس همکار در حال حاضر بسته/غیرفعال گزارش شده است.' WHERE `key` = 'montzar_closed'; UPDATE `settings` SET `description` = 'پاسخ JSON آخرین سفارش ارسالی به همکار. برای عیب‌یابی؛ توسط سیستم پر می‌شود.' WHERE `key` = 'montzar_order_response'; -UPDATE `settings` SET `description` = 'شناسه کلاینت برای API سفارش خارجی (هدر X-Client-Id). باید با مقدار تنظیم‌شده در سرویس مقصد یکسان باشد.' WHERE `key` = 'node_client_id'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'شناسه کلاینت برای API سفارش خارجی (هدر X-Client-Id). باید با مقدار تنظیم‌شده در سرویس مقصد یکسان باشد.' WHERE `key` = 'node_client_id'; UPDATE `settings` SET `description` = 'کلید مشترک امضای HMAC برای احراز درخواست‌های API سفارش خارجی. محرمانه نگه دارید.' WHERE `key` = 'node_shared_secret'; -UPDATE `settings` SET `description` = 'روشن: API دریافت کیف پول و ثبت سفارش از سرویس فروشگاه خارجی فعال است. نیاز به node_client_id و node_shared_secret دارد.' WHERE `key` = 'external_order_api_enabled'; -UPDATE `settings` SET `description` = 'روشن: اپ به SSE (sse_path) وصل می‌شود و last/list با payload می‌آید؛ خاموش: polling.' WHERE `key` = 'wss_enabled'; -UPDATE `settings` SET `description` = 'مسیر GET لاراول برای استریم قیمت — پیش‌فرض /api/price/stream' WHERE `key` = 'sse_path'; -UPDATE `settings` SET `description` = 'JSON لیست سامانه‌های آنالیتیکس — هر مورد: type (gtag|gtm|clarity|custom)، id، enabled. فقط دیپلوی.' WHERE `key` = 'tracking_systems'; -UPDATE `settings` SET `description` = 'روشن: اسکریپت‌های JSON در tracking_systems در اپ مشتری بارگذاری می‌شوند؛ خاموش: هیچ سامانه ردیابی فعال نیست.' WHERE `key` = 'tracking_systems_enabled'; -UPDATE `settings` SET `description` = 'روشن: آیتم «مجوز ها» در منوی تنظیمات اپ خانگی (تم جدید) نمایش داده می‌شود. خاموش: مخفی است.' WHERE `key` = 'permision__enabled'; -UPDATE `settings` SET `description` = 'نام فروشگاه که در درگاه پرداخت و رسید بانکی به کاربر نمایش داده می‌شود.' WHERE `key` = 'montify_name'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'روشن: API دریافت کیف پول و ثبت سفارش از سرویس فروشگاه خارجی فعال است. نیاز به node_client_id و node_shared_secret دارد.' WHERE `key` = 'external_order_api_enabled'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'روشن: اپ به SSE (sse_path) وصل می‌شود و last/list با payload می‌آید؛ خاموش: polling.' WHERE `key` = 'wss_enabled'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'مسیر GET لاراول برای استریم قیمت — پیش‌فرض /api/price/stream' WHERE `key` = 'sse_path'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'JSON لیست سامانه‌های آنالیتیکس — هر مورد: type (gtag|gtm|clarity|custom)، id، enabled. فقط دیپلوی.' WHERE `key` = 'tracking_systems'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'روشن: اسکریپت‌های JSON در tracking_systems در اپ مشتری بارگذاری می‌شوند؛ خاموش: هیچ سامانه ردیابی فعال نیست.' WHERE `key` = 'tracking_systems_enabled'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'روشن: آیتم «مجوز ها» در منوی تنظیمات اپ خانگی (تم جدید) نمایش داده می‌شود. خاموش: مخفی است.' WHERE `key` = 'permision__enabled'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'نام فروشگاه که در درگاه پرداخت و رسید بانکی به کاربر نمایش داده می‌شود.' WHERE `key` = 'montify_name'; -UPDATE `settings` SET `description` = 'روشن: پس از واریز/برداشت، تراکنش به سامانه حسابداری fin همگام‌سازی می‌شود.' WHERE `key` = 'payping_fin_sync_enabled'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'روشن: پس از واریز/برداشت، تراکنش به سامانه حسابداری fin همگام‌سازی می‌شود.' WHERE `key` = 'payping_fin_sync_enabled'; UPDATE `settings` SET `description` = 'آدرس کامل endpoint ثبت تراکنش در سامانه fin (POST).' WHERE `key` = 'payping_fin_url'; UPDATE `settings` SET `description` = 'توکن احراز هویت برای API سامانه fin.' WHERE `key` = 'payping_fin_token'; -UPDATE `settings` SET `description` = 'شناسه مشتری/حساب در سامانه fin که تراکنش‌ها به نام آن ثبت می‌شوند.' WHERE `key` = 'payping_fin_customer_id'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'شناسه مشتری/حساب در سامانه fin که تراکنش‌ها به نام آن ثبت می‌شوند.' WHERE `key` = 'payping_fin_customer_id'; UPDATE `settings` SET `description` = 'آدرس API شروع پرداخت (redirect کاربر به درگاه).' WHERE `key` = 'payping_start_url'; UPDATE `settings` SET `description` = 'آدرس API تأیید و نهایی‌سازی پرداخت پس از بازگشت از درگاه.' WHERE `key` = 'payping_verify_url'; UPDATE `settings` SET `description` = 'نام درگاه پرداخت فعال که به سرویس واسط درگاه ارسال می‌شود|sepal,' WHERE `key` = 'payping_gateway_name'; -UPDATE `settings` SET `description` = 'لیست کدهای item درگاه (با کاما) برای چرخش بین چند merchant.' WHERE `key` = 'payping_gateway_items'; -UPDATE `settings` SET `description` = 'روشن: مبلغ پرداخت به نزدیک‌ترین تومان گرد می‌شود. خاموش: مبلغ دقیق ریالی.' WHERE `key` = 'payping_round_toman'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'لیست کدهای item درگاه (با کاما) برای چرخش بین چند merchant.' WHERE `key` = 'payping_gateway_items'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'روشن: مبلغ پرداخت به نزدیک‌ترین تومان گرد می‌شود. خاموش: مبلغ دقیق ریالی.' WHERE `key` = 'payping_round_toman'; UPDATE `settings` SET `description` = 'روشن: در صورت وجود برداشت ناموفق قبلی، تسویه جدید با احتیاط بیشتر انجام می‌شود.' WHERE `key` = 'payping_strict_failed_withdraw'; -UPDATE `settings` SET `description` = 'آدرس IP یا hostname سرور نرم‌افزار ته‌حساب روی شبکه داخلی.' WHERE `key` = 'tahesab_host'; -UPDATE `settings` SET `description` = 'شماره پورت اتصال به API ته‌حساب (معمولاً 8080 یا مقدار مستندات ته‌حساب).' WHERE `key` = 'tahesab_port'; -UPDATE `settings` SET `description` = 'توکن/API Key اتصال به ته‌حساب. از پنل ته‌حساب دریافت می‌شود.' WHERE `key` = 'tahesab_token'; -UPDATE `settings` SET `description` = 'نام دیتابیس یا شناسه پایگاه در ته‌حساب که سند به آن ارسال می‌شود.' WHERE `key` = 'tahesab_db'; -UPDATE `settings` SET `description` = 'نام یا کد حساب بانکی در سند واریز/برداشت ته‌حساب.' WHERE `key` = 'tahesab_bank_account'; -UPDATE `settings` SET `description` = 'روشن: واریز و برداشت مشتریان به‌صورت خودکار به ته‌حساب ارسال می‌شود.' WHERE `key` = 'send_to_tahesab'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'آدرس IP یا hostname سرور نرم‌افزار ته‌حساب روی شبکه داخلی.' WHERE `key` = 'tahesab_host'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'شماره پورت اتصال به API ته‌حساب (معمولاً 8080 یا مقدار مستندات ته‌حساب).' WHERE `key` = 'tahesab_port'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'توکن/API Key اتصال به ته‌حساب. از پنل ته‌حساب دریافت می‌شود.' WHERE `key` = 'tahesab_token'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'نام دیتابیس یا شناسه پایگاه در ته‌حساب که سند به آن ارسال می‌شود.' WHERE `key` = 'tahesab_db'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'نام یا کد حساب بانکی در سند واریز/برداشت ته‌حساب.' WHERE `key` = 'tahesab_bank_account'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'روشن: واریز و برداشت مشتریان به‌صورت خودکار به ته‌حساب ارسال می‌شود.' WHERE `key` = 'send_to_tahesab'; UPDATE `settings` SET `description` = 'نوع پیام‌رسان برای دکمه پشتیبانی در اپ کاربر|bale,telegram,whatsapp,rubika,eitaa,soroush' WHERE `key` = 'support_messenger'; UPDATE `settings` SET `description` = 'شناسه تماس پشتیبانی: یوزرنیم (تلگرام)، شماره (واتساپ/بله) یا آیدی بسته به پیام‌رسان انتخاب‌شده.' WHERE `key` = 'support_messenger_id'; @@ -1379,17 +1504,27 @@ UPDATE `settings` SET `description` = @deposit_support_msg_desc WHERE `key` = 'd UPDATE `settings` SET `description` = 'متن پیام اشتراک‌گذاری دعوت در اپ کاربر (دکمه «اشتراک با دوستان» در صفحه اصلی، بخش معرف در پروفایل، صفحه کسب درآمد و مودال اشتراک). متغیرهای جایگزین: ٪نام یا %نام = نام کامل کاربر دعوت‌کننده؛ ٪لینک یا %لینک = آدرس کامل صفحه ثبت‌نام همراه با کد معرف (بر اساس تنظیم app_url یا دامنه فعلی مرورگر). فاصله اختیاری بعد از ٪ یا % مجاز است (مثلاً ٪ نام). اگر این فیلد خالی باشد، اپ از متن پیش‌فرض داخلی استفاده می‌کند.' WHERE `key` = 'invite_link_text'; UPDATE `settings` SET `description` = 'شماره تماس پشتیبانی؛ در صفحه واریز، درباره ما و قوانین نمایش داده می‌شود. متن پیامک/پشتیبانی از «متن پیام به پشتیبانی (واریز)» خوانده می‌شود.' WHERE `key` = 'deposit_sms_support_number'; -UPDATE `settings` SET `description` = 'توکن ربات تلگرام برای ارسال اعلان‌ها. از BotFather دریافت می‌شود. محرمانه.' WHERE `key` = 'telegram_bot_token'; -UPDATE `settings` SET `description` = 'توکن ربات بله برای ارسال اعلان‌ها. محرمانه.' WHERE `key` = 'bale_bot_token'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'توکن ربات تلگرام برای ارسال اعلان‌ها. از BotFather دریافت می‌شود. محرمانه.' WHERE `key` = 'telegram_bot_token'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'توکن ربات بله برای ارسال اعلان‌ها. محرمانه.' WHERE `key` = 'bale_bot_token'; -UPDATE `settings` SET `description` = 'روشن: در لیست مشتریان دکمه ارسال پیامک تکی نمایش داده می‌شود و ادمین می‌تواند برای هر مشتری متن دلخواه بفرستد. خاموش: دکمه مخفی است. فقط از صفحه دیپلوی تغییر می‌کند.' WHERE `key` = 'customer_direct_sms'; -UPDATE `settings` SET `title_fa` = 'پیامک تکی به مشتری از لیست' WHERE `key` = 'customer_direct_sms'; -UPDATE `settings` SET `description` = 'روشن: سرویس احراز هویت جیبیت (تطبیق کد ملی/موبایل و کارت بانکی) فعال است. خاموش: هیچ فراخوانی به جیبیت انجام نمی‌شود و احراز هویت خودکار کار نمی‌کند. فقط از صفحه دیپلوی قابل تغییر است.' WHERE `key` = 'jibit_enabled'; -UPDATE `settings` SET `title_fa` = 'احراز هویت جیبیت' WHERE `key` = 'jibit_enabled'; -UPDATE `settings` SET `title_fa` = 'سفارش شرطی' WHERE `key` = 'enable_conditional_order'; -UPDATE `settings` SET `title_fa` = 'قلک محصول' WHERE `key` = 'enable_product_funds'; -UPDATE `settings` SET `description` = 'روشن: ساخت و مدیریت قلک per-product در اپ مشتری فعال است (یک محصول در هر قلک؛ انتقال بدون سند حسابداری). خاموش: منو و API ساخت قلک جدید در دسترس نیست. فقط از دیپلوی قابل تغییر است.' WHERE `key` = 'enable_product_funds'; -UPDATE `settings` SET `can_edit` = 0 WHERE `key` = 'enable_product_funds'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'روشن: در لیست مشتریان دکمه ارسال پیامک تکی نمایش داده می‌شود و ادمین می‌تواند برای هر مشتری متن دلخواه بفرستد. خاموش: دکمه مخفی است. فقط از صفحه دیپلوی تغییر می‌کند.' WHERE `key` = 'customer_direct_sms'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'پیامک تکی به مشتری از لیست' WHERE `key` = 'customer_direct_sms'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'روشن: سرویس احراز هویت جیبیت (تطبیق کد ملی/موبایل و کارت بانکی) فعال است. خاموش: هیچ فراخوانی به جیبیت انجام نمی‌شود و احراز هویت خودکار کار نمی‌کند. فقط از صفحه دیپلوی قابل تغییر است.' WHERE `key` = 'jibit_enabled'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'احراز هویت جیبیت' WHERE `key` = 'jibit_enabled'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'سفارش شرطی' WHERE `key` = 'enable_conditional_order'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'قلک محصول' WHERE `key` = 'enable_product_funds'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'روشن: ساخت و مدیریت قلک per-product در اپ مشتری فعال است (یک محصول در هر قلک؛ انتقال بدون سند حسابداری). خاموش: منو و API ساخت قلک جدید در دسترس نیست. فقط از دیپلوی قابل تغییر است.' WHERE `key` = 'enable_product_funds'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `can_edit` = 0 WHERE `key` = 'enable_product_funds'; UPDATE `settings` SET `description` = 'روشن: بعد از شارژ یا کسر کیف توسط ادمین، پیامک به مشتری و ادمین‌های دارای «ارسال پیامک» می‌رود. خاموش: هیچ‌کدام ارسال نمی‌شود.' WHERE `key` = 'charge_notif'; UPDATE `settings` SET `description` = 'روشن: بعد از خرید یا فروش موفق، پیامک خلاصه معامله به ادمین‌های دارای «ارسال پیامک» می‌رود. خاموش: ادمین پیامک معامله نمی‌گیرد.' WHERE `key` = 'sms_notif_order_admin'; UPDATE `settings` SET `description` = 'روشن: بعد از خرید یا فروش موفق، پیامک رسید به مشتری می‌رود. خاموش: مشتری پیامک معامله نمی‌گیرد.' WHERE `key` = 'sms_notif_order_customer'; @@ -1407,21 +1542,29 @@ UPDATE `settings` SET `description` = 'روشن: رسید برداشت قلک ب UPDATE `settings` SET `description` = 'روشن: هشدار قیمت مشتری (اقدام=پیامک) پیامک می‌شود.' WHERE `key` = 'sms_notif_price_trigger'; UPDATE `settings` SET `description` = 'روشن: هشدار اتمام اعتبار پنل پیامک ارسال می‌شود.' WHERE `key` = 'sms_notif_wallet_alert'; UPDATE `settings` SET `description` = 'روشن: وقتی مشتری اولین پیام خوانده‌نشده را در چت پشتیبانی می‌فرستد و ادمین همان اتاق را باز و visible ندارد، پیامک به ادمین‌های دارای «ارسال پیامک» می‌رود. خاموش: اعلان پیامک چت نمی‌رود.' WHERE `key` = 'sms_notif_support_admin'; -UPDATE `settings` SET `description` = 'رمز مشترک بین لاراول و سرور چت برای اعلان پیام پشتیبانی. فقط سرور؛ در صورت خالی بودن به‌صورت خودکار ساخته می‌شود.' WHERE `key` = 'chat_webhook_secret'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'رمز مشترک بین لاراول و سرور چت برای اعلان پیام پشتیبانی. فقط سرور؛ در صورت خالی بودن به‌صورت خودکار ساخته می‌شود.' WHERE `key` = 'chat_webhook_secret'; UPDATE `settings` SET `title_fa` = 'پیامک پیام پشتیبانی به ادمین' WHERE `key` = 'sms_notif_support_admin'; -UPDATE `settings` SET `title_fa` = 'رمز وب‌هوک چت' WHERE `key` = 'chat_webhook_secret'; -UPDATE `settings` SET `description` = 'روشن: دکمه ارسال پیامک گروهی در پنل ادمین فعال است (ارسال ۱۰تایی). خاموش: ارسال پیامک گروهی غیرفعال است. فقط از تنظیمات پیشرفته.' WHERE `key` = 'group_sms'; -UPDATE `settings` SET - `title_fa` = 'قیمت ویژه مشتری', - `type` = 'switch', - `can_edit` = 0, - `description` = 'روشن: زیرمنوی قیمت ویژه در مشتریان و اعمال سود خرید/فروش پکیج روی مظنه و سفارش برای کاربران انتخاب‌شده. خاموش: غیرفعال. فقط از دیپلوی قابل تغییر است.' -WHERE `key` = 'customer_special_pricing'; -UPDATE `settings` SET `description` = 'روشن: پنل پیامک و کیف پول billing فعال است. خاموش: پیامک‌ها مثل قبل ارسال می‌شوند بدون billing.' WHERE `key` = 'sms_panel'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'رمز وب‌هوک چت' WHERE `key` = 'chat_webhook_secret'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'روشن: دکمه ارسال پیامک گروهی در پنل ادمین فعال است (ارسال ۱۰تایی). خاموش: ارسال پیامک گروهی غیرفعال است. فقط از تنظیمات پیشرفته.' WHERE `key` = 'group_sms'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'قیمت ویژه مشتری', +-- `type` = 'switch', +-- `can_edit` = 0, +-- `description` = 'روشن: زیرمنوی قیمت ویژه در مشتریان و اعمال سود خرید/فروش پکیج روی مظنه و سفارش برای کاربران انتخاب‌شده. خاموش: غیرفعال. فقط از دیپلوی قابل تغییر است.' +-- WHERE `key` = 'customer_special_pricing'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'روشن: پنل پیامک و کیف پول billing فعال است. خاموش: پیامک‌ها مثل قبل ارسال می‌شوند بدون billing.' WHERE `key` = 'sms_panel'; -UPDATE `settings` SET `description` = 'محصولاتی که موجودی‌شان از کیف طلای اصلی خوانده می‌شود. چند محصول با کاما. پیش‌فرض: 13' WHERE `key` = 'main_wallet_products'; -UPDATE `settings` SET `value` = '13' WHERE `key` = 'main_wallet_products' AND TRIM(COALESCE(`value`, '')) = ''; -UPDATE `settings` SET `can_edit` = 0 WHERE `key` = 'main_wallet_products'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'محصولاتی که موجودی‌شان از کیف طلای اصلی خوانده می‌شود. چند محصول با کاما. پیش‌فرض: 13' WHERE `key` = 'main_wallet_products'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `value` = '13' WHERE `key` = 'main_wallet_products' AND TRIM(COALESCE(`value`, '')) = ''; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `can_edit` = 0 WHERE `key` = 'main_wallet_products'; UPDATE `settings` SET `description` = 'روشن: API محاسبه سود طلا فعال است. در اکثر نصب‌ها خاموش می‌ماند.' WHERE `key` = 'profit_gold_api_enabled'; -- --------------------------------------------------------------------------- @@ -1459,43 +1602,45 @@ WHERE `key` IN ('text_rule', 'text_about', 'support_messenger_text', 'invite_lin -- نکته: value اینجا عمداً آپدیت نمی‌شود؛ مقدار موجود کارفرما/پنل حفظ می‌شود. -- --------------------------------------------------------------------------- -UPDATE `settings` SET `can_edit` = 0 WHERE `key` IN ( - 'admin_url', 'apk_download_link', 'app_url', - 'bale_bot_token', - 'chart_id', 'chart_use_local_data', - 'external_order_api_enabled', - 'referral_bonus_amount', - 'group_sms', - 'customer_special_pricing', - 'customer_direct_sms', - 'enable_conditional_order', - 'enable_product_funds', - 'has_page_price_trigger', - 'has_page_notification', - 'jibit_enabled', - 'has_page_earn_money', - 'is_store', - 'sms_panel', - 'logo_login', 'logo_register', 'title_pwa', 'title_fav', - 'main_product', 'main_wallet_products', 'metal_type', 'main_metal', - 'montify_name', - 'montzar_base_url', - 'node_client_id', 'node_shared_secret', - 'payping_fin_customer_id', 'payping_fin_sync_enabled', 'payping_fin_token', 'payping_fin_url', - 'payping_gateway_items', 'payping_gateway_name', - 'payping_round_toman', 'payping_start_url', 'payping_strict_failed_withdraw', 'payping_verify_url', - 'permision__enabled', - 'price_provider', 'profit_gold_api_enabled', - 'send_to_tahesab', - 'sse_path', - 'tahesab_bank_account', 'tahesab_db', 'tahesab_host', 'tahesab_port', 'tahesab_token', - 'telegram_bot_token', - 'unit', - 'wss_enabled', - 'zaarbox_api_url' -); +-- [super-admin can_edit=0 sync] +-- UPDATE `settings` SET `can_edit` = 0 WHERE `key` IN ( +-- 'admin_url', 'apk_download_link', 'app_url', +-- 'bale_bot_token', +-- 'chart_id', 'chart_use_local_data', +-- 'external_order_api_enabled', +-- 'referral_bonus_amount', +-- 'group_sms', +-- 'customer_special_pricing', +-- 'customer_direct_sms', +-- 'enable_conditional_order', +-- 'enable_product_funds', +-- 'has_page_price_trigger', +-- 'has_page_notification', +-- 'jibit_enabled', +-- 'has_page_earn_money', +-- 'is_store', +-- 'sms_panel', +-- 'logo_login', 'logo_register', 'title_pwa', 'title_fav', +-- 'main_product', 'main_wallet_products', 'metal_type', 'main_metal', +-- 'montify_name', +-- 'montzar_base_url', +-- 'node_client_id', 'node_shared_secret', +-- 'payping_fin_customer_id', 'payping_fin_sync_enabled', 'payping_fin_token', 'payping_fin_url', +-- 'payping_gateway_items', 'payping_gateway_name', +-- 'payping_round_toman', 'payping_start_url', 'payping_strict_failed_withdraw', 'payping_verify_url', +-- 'permision__enabled', +-- 'price_provider', 'profit_gold_api_enabled', +-- 'send_to_tahesab', +-- 'sse_path', +-- 'tahesab_bank_account', 'tahesab_db', 'tahesab_host', 'tahesab_port', 'tahesab_token', +-- 'telegram_bot_token', +-- 'unit', +-- 'wss_enabled', +-- 'zaarbox_api_url' +-- ); -UPDATE `settings` SET `can_edit` = 0 WHERE `key` IN ('chat_webhook_secret', 'chat_webhook_base_url'); +-- [super-admin can_edit=0 sync] +-- UPDATE `settings` SET `can_edit` = 0 WHERE `key` IN ('chat_webhook_secret', 'chat_webhook_base_url'); UPDATE `settings` SET `can_edit` = 1 WHERE `key` IN ( 'name_fa', @@ -1563,35 +1708,51 @@ UPDATE `settings` SET `type` = 'number' WHERE `key` IN ( ); -- حسابداری: یک select مرکزی + can_edit=0 -UPDATE `settings` SET `can_edit` = 0, `is_active` = 0 WHERE `key` IN ('send_to_tahesab', 'send_to_pargar'); -UPDATE `settings` SET `can_edit` = 0 WHERE `key` IN ( - 'accounting_provider', - 'tahesab_host', 'tahesab_port', 'tahesab_token', 'tahesab_db', 'tahesab_bank_account', - 'zarin_api', 'zarin_token', 'zarin_noe_kar', 'zarin_gorohe_kar', 'zarin_name_g', 'zarin_uid_prefix', - 'pargar_username', 'pargar_password', 'pargar_api_token' -); -UPDATE `settings` SET `can_edit` = 0, `is_active` = 1 WHERE `key` LIKE 'zarin_%'; -UPDATE `settings` SET `type` = 'text', `can_edit` = 0 WHERE `key` IN ('zarin_api', 'zarin_token', 'zarin_name_g', 'zarin_uid_prefix'); -UPDATE `settings` SET `type` = 'number', `can_edit` = 0 WHERE `key` IN ('zarin_noe_kar', 'zarin_gorohe_kar'); -UPDATE `settings` SET `title_fa` = 'سیستم حسابداری', `type` = 'select', `description` = 'none,pargar,tahesab,zarin' -WHERE `key` = 'accounting_provider'; -UPDATE `settings` SET `description` = 'سیستم حسابداری: none=هیچکدام، pargar=API پرگار، tahesab=ارسال خودکار ته‌حساب، zarin=ارسال خودکار زرین.' WHERE `key` = 'accounting_provider'; -UPDATE `settings` SET `title_fa` = 'آدرس API زرین', `description` = 'آدرس پایه وب‌سرویس زرین (بدون /ZarrinService/accounting).' WHERE `key` = 'zarin_api'; -UPDATE `settings` SET `title_fa` = 'توکن زرین', `description` = 'توکن مکمل API زرین که در نرم‌افزار زرین تعریف می‌شود.' WHERE `key` = 'zarin_token'; -UPDATE `settings` SET `title_fa` = 'نوع کار پیش‌فرض زرین', `type` = 'number', `description` = 'کد noeKar هنگام ساخت کار ساخته در زرین.' WHERE `key` = 'zarin_noe_kar'; -UPDATE `settings` SET `title_fa` = 'گروه کار پیش‌فرض زرین', `type` = 'number', `description` = 'کد gorooheKar هنگام ساخت/جستجوی کار در زرین. برای جداسازی چند پنل روی یک زرین، برای هر پنل مقدار متفاوت بگذارید.' WHERE `key` = 'zarin_gorohe_kar'; -UPDATE `settings` SET `title_fa` = 'نام گروه حساب مشتریان زرین', `type` = 'text', `description` = 'پارامتر nameG در addhesab — گروه حساب زرین. برای اپ خانگی: مشتری نقدی (خریدار) = گروه ۶. گروه همکار استفاده نشود (مظنه متفاوت است).' WHERE `key` = 'zarin_name_g'; +-- [super-admin can_edit=0 sync] +-- UPDATE `settings` SET `can_edit` = 0, `is_active` = 0 WHERE `key` IN ('send_to_tahesab', 'send_to_pargar'); +-- [super-admin can_edit=0 sync] +-- UPDATE `settings` SET `can_edit` = 0 WHERE `key` IN ( +-- 'accounting_provider', +-- 'tahesab_host', 'tahesab_port', 'tahesab_token', 'tahesab_db', 'tahesab_bank_account', +-- 'zarin_api', 'zarin_token', 'zarin_noe_kar', 'zarin_gorohe_kar', 'zarin_name_g', 'zarin_uid_prefix', +-- 'pargar_username', 'pargar_password', 'pargar_api_token' +-- ); +-- [super-admin can_edit=0 sync] +-- UPDATE `settings` SET `can_edit` = 0, `is_active` = 1 WHERE `key` LIKE 'zarin_%'; +-- [super-admin can_edit=0 sync] +-- UPDATE `settings` SET `type` = 'text', `can_edit` = 0 WHERE `key` IN ('zarin_api', 'zarin_token', 'zarin_name_g', 'zarin_uid_prefix'); +-- [super-admin can_edit=0 sync] +-- UPDATE `settings` SET `type` = 'number', `can_edit` = 0 WHERE `key` IN ('zarin_noe_kar', 'zarin_gorohe_kar'); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'سیستم حسابداری', `type` = 'select', `description` = 'none,pargar,tahesab,zarin' +-- WHERE `key` = 'accounting_provider'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'سیستم حسابداری: none=هیچکدام، pargar=API پرگار، tahesab=ارسال خودکار ته‌حساب، zarin=ارسال خودکار زرین.' WHERE `key` = 'accounting_provider'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'آدرس API زرین', `description` = 'آدرس پایه وب‌سرویس زرین (بدون /ZarrinService/accounting).' WHERE `key` = 'zarin_api'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'توکن زرین', `description` = 'توکن مکمل API زرین که در نرم‌افزار زرین تعریف می‌شود.' WHERE `key` = 'zarin_token'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'نوع کار پیش‌فرض زرین', `type` = 'number', `description` = 'کد noeKar هنگام ساخت کار ساخته در زرین.' WHERE `key` = 'zarin_noe_kar'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'گروه کار پیش‌فرض زرین', `type` = 'number', `description` = 'کد gorooheKar هنگام ساخت/جستجوی کار در زرین. برای جداسازی چند پنل روی یک زرین، برای هر پنل مقدار متفاوت بگذارید.' WHERE `key` = 'zarin_gorohe_kar'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'نام گروه حساب مشتریان زرین', `type` = 'text', `description` = 'پارامتر nameG در addhesab — گروه حساب زرین. برای اپ خانگی: مشتری نقدی (خریدار) = گروه ۶. گروه همکار استفاده نشود (مظنه متفاوت است).' WHERE `key` = 'zarin_name_g'; -- فقط اگر خالی است، پیش‌فرض گروه ۶ را بگذار (value موجود دست نخورده) -UPDATE `settings` SET `value` = 'مشتری نقدی (خریدار)' WHERE `key` = 'zarin_name_g' AND (`value` IS NULL OR TRIM(`value`) = ''); -UPDATE `settings` SET `title_fa` = 'پیشوند عددی uid زرین', `type` = 'text', `description` = 'فقط عدد. وقتی چند پنل یک زرین دارند باید متفاوت باشد تا uid تکراری نشود.' WHERE `key` = 'zarin_uid_prefix'; -UPDATE `settings` SET `value` = 'pargar' -WHERE `key` = 'accounting_provider' - AND TRIM(COALESCE(`value`, '')) IN ('', 'none') - AND EXISTS (SELECT 1 FROM (SELECT `value` FROM `settings` WHERE `key` = 'send_to_pargar') AS s WHERE s.`value` IN ('true', '1', 'yes')); -UPDATE `settings` SET `value` = 'tahesab' -WHERE `key` = 'accounting_provider' - AND TRIM(COALESCE(`value`, '')) IN ('', 'none') - AND EXISTS (SELECT 1 FROM (SELECT `value` FROM `settings` WHERE `key` = 'send_to_tahesab') AS s WHERE s.`value` IN ('true', '1', 'yes')); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `value` = 'مشتری نقدی (خریدار)' WHERE `key` = 'zarin_name_g' AND (`value` IS NULL OR TRIM(`value`) = ''); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'پیشوند عددی uid زرین', `type` = 'text', `description` = 'فقط عدد. وقتی چند پنل یک زرین دارند باید متفاوت باشد تا uid تکراری نشود.' WHERE `key` = 'zarin_uid_prefix'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `value` = 'pargar' +-- WHERE `key` = 'accounting_provider' +-- AND TRIM(COALESCE(`value`, '')) IN ('', 'none') +-- AND EXISTS (SELECT 1 FROM (SELECT `value` FROM `settings` WHERE `key` = 'send_to_pargar') AS s WHERE s.`value` IN ('true', '1', 'yes')); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `value` = 'tahesab' +-- WHERE `key` = 'accounting_provider' +-- AND TRIM(COALESCE(`value`, '')) IN ('', 'none') +-- AND EXISTS (SELECT 1 FROM (SELECT `value` FROM `settings` WHERE `key` = 'send_to_tahesab') AS s WHERE s.`value` IN ('true', '1', 'yes')); -- آخرین override: کلیدهای runtime همیشه can_edit=1 (tenant-only) UPDATE `settings` SET `can_edit` = 1 WHERE `key` IN ( diff --git a/database/sql/fee_deduct_from_gold_patch.sql b/database/sql/fee_deduct_from_gold_patch.sql index e2d22f7..3cfe1d9 100644 --- a/database/sql/fee_deduct_from_gold_patch.sql +++ b/database/sql/fee_deduct_from_gold_patch.sql @@ -5,18 +5,20 @@ START TRANSACTION; -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'fee_deduct_from_gold', 'false', 'اعمال مبلغ دقیق در معامله مشتری', 0, 1, - 'روشن: مشتری دقیقاً همان مبلغ یا وزنی را که وارد کرده دریافت می‌کند. در فروش، مثلاً ۱۰۰ میلیون ریال درخواست → همان ۱۰۰ میلیون واریز و کارمزد از طلای کیف کسر می‌شود. در خرید، مثلاً ۱۰ گرم درخواست → همان ۱۰ گرم واریز و کارمزد به ریال قابل پرداخت اضافه می‌شود. خاموش (پیش‌فرض): در فروش کارمزد از مبلغ ریالی واریزی کم می‌شود (مشتری مبلغ کمتری می‌گیرد). در خرید کارمزد از وزن طلای واریزی کم می‌شود (مشتری طلای کمتری می‌گیرد).', - 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'fee_deduct_from_gold' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'fee_deduct_from_gold', 'false', 'اعمال مبلغ دقیق در معامله مشتری', 0, 1, +-- 'روشن: مشتری دقیقاً همان مبلغ یا وزنی را که وارد کرده دریافت می‌کند. در فروش، مثلاً ۱۰۰ میلیون ریال درخواست → همان ۱۰۰ میلیون واریز و کارمزد از طلای کیف کسر می‌شود. در خرید، مثلاً ۱۰ گرم درخواست → همان ۱۰ گرم واریز و کارمزد به ریال قابل پرداخت اضافه می‌شود. خاموش (پیش‌فرض): در فروش کارمزد از مبلغ ریالی واریزی کم می‌شود (مشتری مبلغ کمتری می‌گیرد). در خرید کارمزد از وزن طلای واریزی کم می‌شود (مشتری طلای کمتری می‌گیرد).', +-- 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'fee_deduct_from_gold' LIMIT 1); -UPDATE `settings` -SET `title_fa` = 'اعمال مبلغ دقیق در معامله مشتری', - `description` = 'روشن: مشتری دقیقاً همان مبلغ یا وزنی را که وارد کرده دریافت می‌کند. در فروش، مثلاً ۱۰۰ میلیون ریال درخواست → همان ۱۰۰ میلیون واریز و کارمزد از طلای کیف کسر می‌شود. در خرید، مثلاً ۱۰ گرم درخواست → همان ۱۰ گرم واریز و کارمزد به ریال قابل پرداخت اضافه می‌شود. خاموش (پیش‌فرض): در فروش کارمزد از مبلغ ریالی واریزی کم می‌شود (مشتری مبلغ کمتری می‌گیرد). در خرید کارمزد از وزن طلای واریزی کم می‌شود (مشتری طلای کمتری می‌گیرد).', - `type` = 'switch', - `can_edit` = 0 -WHERE `key` = 'fee_deduct_from_gold'; +-- [super-admin can_edit=0] +-- UPDATE `settings` +-- SET `title_fa` = 'اعمال مبلغ دقیق در معامله مشتری', +-- `description` = 'روشن: مشتری دقیقاً همان مبلغ یا وزنی را که وارد کرده دریافت می‌کند. در فروش، مثلاً ۱۰۰ میلیون ریال درخواست → همان ۱۰۰ میلیون واریز و کارمزد از طلای کیف کسر می‌شود. در خرید، مثلاً ۱۰ گرم درخواست → همان ۱۰ گرم واریز و کارمزد به ریال قابل پرداخت اضافه می‌شود. خاموش (پیش‌فرض): در فروش کارمزد از مبلغ ریالی واریزی کم می‌شود (مشتری مبلغ کمتری می‌گیرد). در خرید کارمزد از وزن طلای واریزی کم می‌شود (مشتری طلای کمتری می‌گیرد).', +-- `type` = 'switch', +-- `can_edit` = 0 +-- WHERE `key` = 'fee_deduct_from_gold'; COMMIT; diff --git a/database/sql/garoosi_gold_settings_finish.sql b/database/sql/garoosi_gold_settings_finish.sql index 474b850..1df8b9c 100644 --- a/database/sql/garoosi_gold_settings_finish.sql +++ b/database/sql/garoosi_gold_settings_finish.sql @@ -106,29 +106,32 @@ UPDATE `settings` SET `description` = 'required = اجباری|required,' WHERE `key` = 'referral_id'; -UPDATE `settings` SET - `title_fa` = 'منبع قیمت', - `type` = 'select', - `is_active` = 1, - `description` = 'منبع فعال قیمت|montzar,zaarbox,main_product,taban_gohar' -WHERE `key` = 'price_provider'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'منبع قیمت', +-- `type` = 'select', +-- `is_active` = 1, +-- `description` = 'منبع فعال قیمت|montzar,zaarbox,main_product,taban_gohar' +-- WHERE `key` = 'price_provider'; -UPDATE `settings` SET - `title_fa` = 'UUID نمودار Zaarbox', - `type` = 'text', - `is_active` = 1, - `can_edit` = 1, - `description` = 'خالی = ca3800a0-1f57-3528-b963-178f9168e04f', - `value` = CASE - WHEN TRIM(COALESCE(`value`, '')) = '' THEN '8c19e06a-446e-3d56-9cc0-750f7c6cd767' - ELSE `value` - END -WHERE `key` = 'chart_id'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'UUID نمودار Zaarbox', +-- `type` = 'text', +-- `is_active` = 1, +-- `can_edit` = 1, +-- `description` = 'خالی = ca3800a0-1f57-3528-b963-178f9168e04f', +-- `value` = CASE +-- WHEN TRIM(COALESCE(`value`, '')) = '' THEN '8c19e06a-446e-3d56-9cc0-750f7c6cd767' +-- ELSE `value` +-- END +-- WHERE `key` = 'chart_id'; UPDATE `settings` SET `description` = 'جایگزین: price_provider=main_product' WHERE `key` = 'main_product_price'; UPDATE `settings` SET `description` = 'true یا price_provider=montzar' WHERE `key` = 'montzar_price'; UPDATE `settings` SET `description` = 'تعداد سفارش اول بدون کارمزد' WHERE `key` = 'fee_free'; -UPDATE `settings` SET `description` = 'id یا reading_method محصول آبشده' WHERE `key` = 'main_product'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'id یا reading_method محصول آبشده' WHERE `key` = 'main_product'; UPDATE `settings` SET `type` = 'switch' WHERE `key` IN ( 'group_sms', 'bale_bot_token', 'jibit_verification', 'register_jibit_verify', diff --git a/database/sql/garoosi_gold_settings_update.sql b/database/sql/garoosi_gold_settings_update.sql index 930a1aa..9ae5e85 100644 --- a/database/sql/garoosi_gold_settings_update.sql +++ b/database/sql/garoosi_gold_settings_update.sql @@ -66,15 +66,22 @@ UPDATE `settings` SET `title_fa` = 'نام فارسی', `type` = 'text UPDATE `settings` SET `title_fa` = 'نام انگلیسی', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'name_en'; UPDATE `settings` SET `title_fa` = 'آدرس اپ (کاربر)', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'app_url'; UPDATE `settings` SET `title_fa` = 'آدرس پایه سرور', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'bace_url'; -UPDATE `settings` SET `title_fa` = 'لوگوی ورود', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'logo_login'; -UPDATE `settings` SET `title_fa` = 'لوگوی ثبت‌نام', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'logo_register'; -UPDATE `settings` SET `title_fa` = 'آدرس پنل ادمین', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'admin_url'; -UPDATE `settings` SET `title_fa` = 'توکن ته‌حساب', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'tahesab_token'; -UPDATE `settings` SET `title_fa` = 'دیتابیس ته‌حساب', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'tahesab_db'; -UPDATE `settings` SET `title_fa` = 'صفحه کسب درآمد', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'has_page_earn_money'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'لوگوی ورود', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'logo_login'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'لوگوی ثبت‌نام', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'logo_register'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'آدرس پنل ادمین', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'admin_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'توکن ته‌حساب', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'tahesab_token'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'دیتابیس ته‌حساب', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'tahesab_db'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'صفحه کسب درآمد', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'has_page_earn_money'; UPDATE `settings` SET `title_fa` = 'صفحه صندوق', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'has_page_fund'; UPDATE `settings` SET `title_fa` = 'صفحه مجوزها', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'has_page_permission'; -UPDATE `settings` SET `title_fa` = 'صفحه هشدار قیمت', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'has_page_price_trigger'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'صفحه هشدار قیمت', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'has_page_price_trigger'; UPDATE `settings` SET `title_fa` = 'صفحه طلای فیزیکی', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'has_page_physical_gold'; UPDATE `settings` SET `title_fa` = 'رنگ اصلی', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'color_primary'; UPDATE `settings` SET `title_fa` = 'رنگ ثانویه', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'color_secondary'; @@ -82,20 +89,26 @@ UPDATE `settings` SET `title_fa` = 'کارمزد درصدی', `type` = ' UPDATE `settings` SET `title_fa` = 'چت', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'has_chat'; UPDATE `settings` SET `title_fa` = 'آدرس API', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'server_url'; UPDATE `settings` SET `title_fa` = 'کلید اپ', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'key'; -UPDATE `settings` SET `title_fa` = 'توکن بات تلگرام', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'telegram_bot_token'; -UPDATE `settings` SET `title_fa` = 'کارمزد ریالی', `type` = 'number', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'fee_cash'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'توکن بات تلگرام', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'telegram_bot_token'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'کارمزد ریالی', `type` = 'number', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'fee_cash'; UPDATE `settings` SET `title_fa` = 'اختلاف با قیمت واقعی', `type` = 'number', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'fee_single'; -UPDATE `settings` SET `title_fa` = 'ارسال اسناد به ته‌حساب', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'send_to_tahesab'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'ارسال اسناد به ته‌حساب', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'send_to_tahesab'; UPDATE `settings` SET `title_fa` = 'تعداد سفارش اول بدون کارمزد', `type` = 'number', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'fee_free'; UPDATE `settings` SET `title_fa` = 'پیامک شارژ ادمین', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'charge_notif'; UPDATE `settings` SET `title_fa` = 'فعال‌سازی خودکار کاربر', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'auto_active_customer'; UPDATE `settings` SET `title_fa` = 'ثبت‌نام باز', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'open_register'; UPDATE `settings` SET `title_fa` = 'دریافت قیمت از تابان‌گوهر', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'tabanGohar_price'; UPDATE `settings` SET `title_fa` = 'دریافت قیمت از محصولات', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'main_product_price'; -UPDATE `settings` SET `title_fa` = 'حساب بانکی ته‌حساب', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'tahesab_bank_account'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'حساب بانکی ته‌حساب', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'tahesab_bank_account'; UPDATE `settings` SET `title_fa` = 'کد معرف', `type` = 'select', `is_active` = COALESCE(`is_active`, 1), `description` = 'required = اجباری|required,' WHERE `key` = 'referral_id'; -UPDATE `settings` SET `title_fa` = 'پیامک گروهی', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'group_sms'; -UPDATE `settings` SET `title_fa` = 'توکن بات بله', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'bale_bot_token'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'پیامک گروهی', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'group_sms'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'توکن بات بله', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'bale_bot_token'; UPDATE `settings` SET `title_fa` = 'تایید کارت با جیبیت', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'jibit_verification'; UPDATE `settings` SET `title_fa` = 'تایید کد ملی در ثبت‌نام', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'register_jibit_verify'; UPDATE `settings` SET `title_fa` = 'پاداش معرف', `type` = 'number', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'gift_for_referrer'; @@ -104,19 +117,31 @@ UPDATE `settings` SET `title_fa` = 'محدودیت دعوت', `type` = ' UPDATE `settings` SET `title_fa` = 'بستن قیمت در ساعات مشخص', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'close_price'; UPDATE `settings` SET `title_fa` = 'ساعت شروع', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'startDay'; UPDATE `settings` SET `title_fa` = 'ساعت پایان', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'endDay'; -UPDATE `settings` SET `title_fa` = 'آدرس API همکار', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_base_url'; -UPDATE `settings` SET `title_fa` = 'توکن همکار', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_token'; -UPDATE `settings` SET `title_fa` = 'بسته بودن سرویس همکار', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_closed'; -UPDATE `settings` SET `title_fa` = 'باز بودن خرید همکار', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_open_buy'; -UPDATE `settings` SET `title_fa` = 'باز بودن فروش همکار', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_open_sell'; -UPDATE `settings` SET `title_fa` = 'اختلاف قیمت همکار', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_diff'; -UPDATE `settings` SET `title_fa` = 'مظنه همکار', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_mazaneh'; -UPDATE `settings` SET `title_fa` = 'مظنه خرید واقعی همکار', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_truly_buy_mazaneh'; -UPDATE `settings` SET `title_fa` = 'مظنه فروش واقعی همکار', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_truly_sell_mazaneh'; -UPDATE `settings` SET `title_fa` = 'پاسخ سفارش همکار', `type` = 'longtext', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_order_response'; -UPDATE `settings` SET `title_fa` = 'لاگ محصول همکار', `type` = 'longtext', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_last_product_log'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'آدرس API همکار', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_base_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'توکن همکار', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_token'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'بسته بودن سرویس همکار', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_closed'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'باز بودن خرید همکار', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_open_buy'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'باز بودن فروش همکار', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_open_sell'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'اختلاف قیمت همکار', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_diff'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'مظنه همکار', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_mazaneh'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'مظنه خرید واقعی همکار', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_truly_buy_mazaneh'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'مظنه فروش واقعی همکار', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_truly_sell_mazaneh'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'پاسخ سفارش همکار', `type` = 'longtext', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_order_response'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'لاگ محصول همکار', `type` = 'longtext', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_last_product_log'; UPDATE `settings` SET `title_fa` = 'نشان دادن آخرین قیمت', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'show_last_price'; -UPDATE `settings` SET `title_fa` = 'قیمت لحظه‌ای همکار', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_live_price'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'قیمت لحظه‌ای همکار', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 0 WHERE `key` = 'montzar_live_price'; UPDATE `settings` SET `title_fa` = 'بروزرسانی قیمت در لیست', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'product_update_price_on_list'; UPDATE `settings` SET `title_fa` = 'باز/بسته خودکار محصول در لیست', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'product_auto_close_open_on_list'; UPDATE `settings` SET `title_fa` = 'شماره همراه همکار', `type` = 'text', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'montzar_mobile'; @@ -125,19 +150,21 @@ UPDATE `settings` SET `title_fa` = 'کد محصول همکار', `type` = UPDATE `settings` SET `title_fa` = 'دریافت قیمت از همکار', `type` = 'switch', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'montzar_price'; UPDATE `settings` SET `title_fa` = 'سود خرید', `type` = 'number', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'buy_fee'; UPDATE `settings` SET `title_fa` = 'سود فروش', `type` = 'number', `is_active` = COALESCE(`is_active`, 1) WHERE `key` = 'sell_fee'; -UPDATE `settings` SET - `title_fa` = 'UUID نمودار Zaarbox', - `type` = 'text', - `is_active` = 1, - `can_edit` = 1, - `description` = 'خالی = ca3800a0-1f57-3528-b963-178f9168e04f', - `value` = CASE - WHEN TRIM(COALESCE(`value`, '')) = '' THEN '8c19e06a-446e-3d56-9cc0-750f7c6cd767' - ELSE `value` - END, - `updated_at` = NOW() -WHERE `key` = 'chart_id'; -UPDATE `settings` SET `title_fa` = 'آدرس API تابلو Zaarbox', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 1 WHERE `key` = 'zaarbox_api_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'UUID نمودار Zaarbox', +-- `type` = 'text', +-- `is_active` = 1, +-- `can_edit` = 1, +-- `description` = 'خالی = ca3800a0-1f57-3528-b963-178f9168e04f', +-- `value` = CASE +-- WHEN TRIM(COALESCE(`value`, '')) = '' THEN '8c19e06a-446e-3d56-9cc0-750f7c6cd767' +-- ELSE `value` +-- END, +-- `updated_at` = NOW() +-- WHERE `key` = 'chart_id'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'آدرس API تابلو Zaarbox', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 1 WHERE `key` = 'zaarbox_api_url'; UPDATE `settings` SET `title_fa` = 'شناسه ردیف تابلو (key یا UUID)', `type` = 'text', `is_active` = COALESCE(`is_active`, 1), `can_edit` = 1 WHERE `key` = 'zaarbox_price_key'; -- --------------------------------------------------------------------------- @@ -266,8 +293,9 @@ WHERE LOWER(TRIM(COALESCE(`description`, ''))) IN ( ) OR TRIM(COALESCE(`description`, '')) LIKE 'count of%'; -UPDATE `settings` SET `description` = 'منبع فعال قیمت|montzar,zaarbox,main_product,taban_gohar' -WHERE `key` = 'price_provider'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'منبع فعال قیمت|montzar,zaarbox,main_product,taban_gohar' +-- WHERE `key` = 'price_provider'; UPDATE `settings` SET `description` = 'required = اجباری|required,', `title_fa` = 'کد معرف', `type` = 'select' WHERE `key` = 'referral_id'; @@ -275,7 +303,8 @@ WHERE `key` = 'referral_id'; UPDATE `settings` SET `description` = 'جایگزین: price_provider=main_product' WHERE `key` = 'main_product_price'; UPDATE `settings` SET `description` = 'true یا price_provider=montzar' WHERE `key` = 'montzar_price'; UPDATE `settings` SET `description` = 'تعداد سفارش اول بدون کارمزد' WHERE `key` = 'fee_free'; -UPDATE `settings` SET `description` = 'id یا reading_method محصول آبشده' WHERE `key` = 'main_product'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `description` = 'id یا reading_method محصول آبشده' WHERE `key` = 'main_product'; UPDATE `settings` SET `is_active` = 1 WHERE `key` IN ('zaarbox_api_url', 'zaarbox_price_key', 'chart_id'); diff --git a/database/sql/goldali_compat_patch.sql b/database/sql/goldali_compat_patch.sql index 8d8e0b6..bd1b41c 100644 --- a/database/sql/goldali_compat_patch.sql +++ b/database/sql/goldali_compat_patch.sql @@ -5,14 +5,16 @@ START TRANSACTION; -- قیمت از تابلو Zaarbox (یا main_product — یکی را انتخاب کنید) -- UPDATE `settings` SET `value` = 'zaarbox' WHERE `key` = 'price_provider'; -UPDATE `settings` SET `value` = 'main_product' WHERE `key` = 'price_provider'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `value` = 'main_product' WHERE `key` = 'price_provider'; INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) SELECT 'price_provider', 'main_product', 'منبع قیمت', 1, 1, 'montzar | taban_gohar | main_product | zaarbox' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_provider' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) SELECT 'main_product', '13', 'شناسه محصول آبشده', 1, 1, 'اول settings، بعد const' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'main_product' LIMIT 1); -UPDATE `settings` SET `value` = '13' WHERE `key` = 'main_product'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `value` = '13' WHERE `key` = 'main_product'; INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) SELECT 'zaarbox_api_url', 'https://price.zaarbox.ir/api/free', 'آدرس API تابلو Zaarbox', 1, 1, NULL @@ -34,23 +36,27 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_gateway_name' INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) SELECT 'payping_gateway_items', 'sDsB,gp1Q,GPH4,AMAX,TbQl,AAQl', 'item چرخشی', 1, 1, NULL WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_gateway_items' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'payping_round_toman', 'true', 'گرد به تومان', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_round_toman' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'payping_strict_failed_withdraw', 'true', 'اولویت ناموفق', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_strict_failed_withdraw' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'payping_round_toman', 'true', 'گرد به تومان', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_round_toman' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'payping_strict_failed_withdraw', 'true', 'اولویت ناموفق', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_strict_failed_withdraw' LIMIT 1); UPDATE `settings` SET `value` = 'https://payment.goldaliii.com/payment/start' WHERE `key` = 'payping_start_url'; UPDATE `settings` SET `value` = 'https://payment.goldaliii.com/payment/verify' WHERE `key` = 'payping_verify_url'; UPDATE `settings` SET `value` = 'sepal' WHERE `key` = 'payping_gateway_name'; -UPDATE `settings` SET `value` = 'sDsB,gp1Q,GPH4,AMAX,TbQl,AAQl' WHERE `key` = 'payping_gateway_items'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `value` = 'sDsB,gp1Q,GPH4,AMAX,TbQl,AAQl' WHERE `key` = 'payping_gateway_items'; UPDATE `settings` SET `value` = 'true' WHERE `key` IN ('payping_round_toman', 'payping_strict_failed_withdraw'); -- API سود طلا (کلاینت /customer/profit_gold) -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -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); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- 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'; -- ثبت‌نام باز (AuthController) @@ -60,9 +66,10 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'open_register' LIMIT 1 UPDATE `settings` SET `is_active` = 1 WHERE `key` = 'open_register'; -- تراز ادمین: حساب تست را از گزارش حذف کن (گلد علی معمولاً 12) -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); +-- [super-admin can_edit=0] +-- 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); UPDATE `settings` SET `value` = '12' WHERE `key` = 'balance_report_exclude_customer_id'; -- const — کلاینت و ادمین diff --git a/database/sql/goldali_database_settings.sql b/database/sql/goldali_database_settings.sql index cbe32f4..5374156 100644 --- a/database/sql/goldali_database_settings.sql +++ b/database/sql/goldali_database_settings.sql @@ -10,7 +10,8 @@ START TRANSACTION; -- ----------------------------------------------------------------------------- -- ۱) قیمت — محصول اصلی (نه اتحادیه)؛ main_product اول settings بعد const -- ----------------------------------------------------------------------------- -UPDATE `settings` SET `value` = 'main_product' WHERE `key` = 'price_provider'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `value` = 'main_product' WHERE `key` = 'price_provider'; INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) SELECT 'price_provider', 'main_product', 'منبع قیمت', 1, 1, 'montzar|main_product|taban_gohar' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_provider' LIMIT 1); @@ -19,7 +20,8 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_provider' LIMIT INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) SELECT 'main_product', '13', 'محصول آبشده (id یا reading_method)', 1, 1, 'مثلاً 13 — نه UUID API' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'main_product' LIMIT 1); -UPDATE `settings` SET `value` = '13' WHERE `key` = 'main_product'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `value` = '13' WHERE `key` = 'main_product'; -- نمایش buy/sell در /api/price/last (ریال — جدا از کارمزد سفارش) INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) @@ -57,9 +59,10 @@ SELECT 'open_register', '1', 'ثبت‌نام باز', 1, 1, NULL WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'open_register' LIMIT 1); UPDATE `settings` SET `is_active` = 1 WHERE `key` = 'open_register'; -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -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); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- 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) @@ -72,18 +75,22 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'node_shared_secret' LI 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'; +-- [super-admin can_edit=0] +-- 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); +-- [super-admin can_edit=0] +-- 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); UPDATE `settings` SET `value` = '12' WHERE `key` = 'balance_report_exclude_customer_id'; -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'send_to_tahesab', 'false', 'ارسال ته‌حساب', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'send_to_tahesab' LIMIT 1); -UPDATE `settings` SET `value` = 'false' WHERE `key` = 'send_to_tahesab'; +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'send_to_tahesab', 'false', 'ارسال ته‌حساب', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'send_to_tahesab' LIMIT 1); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `value` = 'false' WHERE `key` = 'send_to_tahesab'; -- ----------------------------------------------------------------------------- -- ۴) درگاه payment.goldaliii.com @@ -100,16 +107,19 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_gateway_name' INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) SELECT 'payping_gateway_items', 'sDsB,gp1Q,GPH4,AMAX,TbQl,AAQl', 'item چرخشی', 1, 1, NULL WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_gateway_items' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'payping_round_toman', 'true', 'گرد تومان', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_round_toman' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'payping_strict_failed_withdraw', 'true', 'اولویت ناموفق', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_strict_failed_withdraw' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'payping_round_toman', 'true', 'گرد تومان', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_round_toman' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'payping_strict_failed_withdraw', 'true', 'اولویت ناموفق', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_strict_failed_withdraw' LIMIT 1); UPDATE `settings` SET `value` = 'https://payment.goldaliii.com/payment/start' WHERE `key` = 'payping_start_url'; UPDATE `settings` SET `value` = 'https://payment.goldaliii.com/payment/verify' WHERE `key` = 'payping_verify_url'; UPDATE `settings` SET `value` = 'sepal' WHERE `key` = 'payping_gateway_name'; -UPDATE `settings` SET `value` = 'sDsB,gp1Q,GPH4,AMAX,TbQl,AAQl' WHERE `key` = 'payping_gateway_items'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `value` = 'sDsB,gp1Q,GPH4,AMAX,TbQl,AAQl' WHERE `key` = 'payping_gateway_items'; UPDATE `settings` SET `value` = 'true' WHERE `key` IN ('payping_round_toman', 'payping_strict_failed_withdraw'); -- ----------------------------------------------------------------------------- diff --git a/database/sql/goldali_payping_patch.sql b/database/sql/goldali_payping_patch.sql index 288e551..daedd89 100644 --- a/database/sql/goldali_payping_patch.sql +++ b/database/sql/goldali_payping_patch.sql @@ -18,18 +18,21 @@ INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `de SELECT 'payping_gateway_items', 'sDsB,gp1Q,GPH4,AMAX,TbQl,AAQl', 'لیست item (چرخشی)', 1, 1, NULL WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_gateway_items' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'payping_round_toman', 'true', 'گرد کردن مبلغ به تومان', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_round_toman' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'payping_round_toman', 'true', 'گرد کردن مبلغ به تومان', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_round_toman' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'payping_strict_failed_withdraw', 'true', 'اولویت تراکنش ناموفق', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_strict_failed_withdraw' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'payping_strict_failed_withdraw', 'true', 'اولویت تراکنش ناموفق', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_strict_failed_withdraw' LIMIT 1); UPDATE `settings` SET `value` = 'https://payment.goldaliii.com/payment/start' WHERE `key` = 'payping_start_url'; UPDATE `settings` SET `value` = 'https://payment.goldaliii.com/payment/verify' WHERE `key` = 'payping_verify_url'; UPDATE `settings` SET `value` = 'sepal' WHERE `key` = 'payping_gateway_name'; -UPDATE `settings` SET `value` = 'sDsB,gp1Q,GPH4,AMAX,TbQl,AAQl' WHERE `key` = 'payping_gateway_items'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `value` = 'sDsB,gp1Q,GPH4,AMAX,TbQl,AAQl' WHERE `key` = 'payping_gateway_items'; UPDATE `settings` SET `value` = 'true' WHERE `key` IN ('payping_round_toman', 'payping_strict_failed_withdraw'); COMMIT; diff --git a/database/sql/goldali_post_merge_settings.sql b/database/sql/goldali_post_merge_settings.sql index 04953e1..6d683e1 100644 --- a/database/sql/goldali_post_merge_settings.sql +++ b/database/sql/goldali_post_merge_settings.sql @@ -22,16 +22,22 @@ UPDATE `settings` SET `title_fa` = 'نام فارسی اپ' WHERE `key` = 'name_ UPDATE `settings` SET `title_fa` = 'نام انگلیسی اپ' WHERE `key` = 'name_en' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'آدرس اپ (کاربر)' WHERE `key` = 'app_url' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'آدرس پایه' WHERE `key` = 'bace_url' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); -UPDATE `settings` SET `title_fa` = 'لوگوی صفحه ورود' WHERE `key` = 'logo_register' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); -UPDATE `settings` SET `title_fa` = 'آدرس پنل ادمین' WHERE `key` = 'admin_url' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); -UPDATE `settings` SET `title_fa` = 'عنوان PWA' WHERE `key` = 'title_pwa' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); -UPDATE `settings` SET `title_fa` = 'عنوان favicon' WHERE `key` = 'title_fav' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'لوگوی صفحه ورود' WHERE `key` = 'logo_register' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'آدرس پنل ادمین' WHERE `key` = 'admin_url' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'عنوان PWA' WHERE `key` = 'title_pwa' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'عنوان favicon' WHERE `key` = 'title_fav' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'متن قوانین' WHERE `key` = 'text_rule' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'متن درباره ما' WHERE `key` = 'text_about' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); -UPDATE `settings` SET `title_fa` = 'صفحه کسب درآمد' WHERE `key` = 'has_page_earn_money' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'صفحه کسب درآمد' WHERE `key` = 'has_page_earn_money' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'صفحه صندوق' WHERE `key` = 'has_page_fund' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'صفحه مجوزها' WHERE `key` = 'has_page_permission' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); -UPDATE `settings` SET `title_fa` = 'صفحه هشدار قیمت' WHERE `key` = 'has_page_price_trigger' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'صفحه هشدار قیمت' WHERE `key` = 'has_page_price_trigger' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'صفحه طلای فیزیکی' WHERE `key` = 'has_page_physical_gold' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'رنگ اصلی' WHERE `key` = 'color_primary' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'رنگ ثانویه' WHERE `key` = 'color_secondary' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); @@ -40,7 +46,8 @@ UPDATE `settings` SET `title_fa` = 'چت پشتیبانی' WHERE `key` = 'has_ch UPDATE `settings` SET `title_fa` = 'آدرس API سرور' WHERE `key` = 'server_url' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'کلید داخلی اپ' WHERE `key` = 'key' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'تعداد معرف برای هدیه' WHERE `key` = 'referral_count_for_gift' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); -UPDATE `settings` SET `title_fa` = 'مبلغ پاداش معرف' WHERE `key` = 'referral_bonus_amount' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = 'مبلغ پاداش معرف' WHERE `key` = 'referral_bonus_amount' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'حداقل برداشت (ریال)' WHERE `key` = 'min_withdraw' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `settings` SET `title_fa` = 'حداقل اولین خرید (ریال)' WHERE `key` = 'min_first_buy' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); @@ -106,25 +113,29 @@ WHERE r.`key` = 'referral_id' DELETE FROM `settings` WHERE `key` = 'is_requaire_referral'; -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -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); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- 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); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) SELECT 'open_register', '1', 'ثبت‌نام باز', 1, 1, NULL WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'open_register' LIMIT 1); -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); +-- [super-admin can_edit=0] +-- 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); -- ============================================================================= -- بخش ۳ — فقط چند UPDATE مطمئن (کلیدهای مربوط به کد جدید) -- ============================================================================= -UPDATE `settings` SET `value` = 'main_product', `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'منبع قیمت') -WHERE `key` = 'price_provider'; -UPDATE `settings` SET `value` = '13' WHERE `key` = 'main_product'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `value` = 'main_product', `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'منبع قیمت') +-- WHERE `key` = 'price_provider'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `value` = '13' WHERE `key` = 'main_product'; UPDATE `settings` SET `value` = 'true' WHERE `key` = 'profit_gold_api_enabled'; UPDATE `settings` SET `is_active` = 1 WHERE `key` = 'open_register'; UPDATE `settings` SET `value` = '12' WHERE `key` = 'balance_report_exclude_customer_id'; @@ -163,18 +174,21 @@ INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `de SELECT 'payping_gateway_items', 'sDsB,gp1Q,GPH4,AMAX,TbQl,AAQl', 'لیست item (چرخشی)', 1, 1, NULL WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_gateway_items' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'payping_round_toman', 'true', 'گرد کردن مبلغ به تومان', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_round_toman' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'payping_round_toman', 'true', 'گرد کردن مبلغ به تومان', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_round_toman' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'payping_strict_failed_withdraw', 'true', 'اولویت تراکنش ناموفق', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_strict_failed_withdraw' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'payping_strict_failed_withdraw', 'true', 'اولویت تراکنش ناموفق', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_strict_failed_withdraw' LIMIT 1); UPDATE `settings` SET `value` = 'https://payment.goldaliii.com/payment/start' WHERE `key` = 'payping_start_url'; UPDATE `settings` SET `value` = 'https://payment.goldaliii.com/payment/verify' WHERE `key` = 'payping_verify_url'; UPDATE `settings` SET `value` = 'sepal' WHERE `key` = 'payping_gateway_name'; -UPDATE `settings` SET `value` = 'sDsB,gp1Q,GPH4,AMAX,TbQl,AAQl' WHERE `key` = 'payping_gateway_items'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `value` = 'sDsB,gp1Q,GPH4,AMAX,TbQl,AAQl' WHERE `key` = 'payping_gateway_items'; UPDATE `settings` SET `value` = 'true' WHERE `key` IN ('payping_round_toman', 'payping_strict_failed_withdraw'); -- ============================================================================= diff --git a/database/sql/goldali_settings_full_catalog.sql b/database/sql/goldali_settings_full_catalog.sql index ad9bcbb..f3edea8 100644 --- a/database/sql/goldali_settings_full_catalog.sql +++ b/database/sql/goldali_settings_full_catalog.sql @@ -64,9 +64,10 @@ INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `de SELECT 'montzar_base_url', 'https://limangold.ir', 'آدرس سرور همکار', 1, 1, NULL WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_base_url' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'montzar_token', '', 'توکن همکار (خودکار)', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_token' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'montzar_token', '', 'توکن همکار (خودکار)', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_token' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) SELECT 'montzar_open_buy', 'true', 'باز بودن خرید همکار', 1, 1, NULL @@ -76,25 +77,30 @@ INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `de SELECT 'montzar_open_sell', 'true', 'باز بودن فروش همکار', 1, 1, NULL WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_open_sell' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'montzar_diff', '0', 'اختلاف قیمت همکار', 0, 1, 'سیستم پر می‌کند' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_diff' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'montzar_diff', '0', 'اختلاف قیمت همکار', 0, 1, 'سیستم پر می‌کند' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_diff' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'montzar_live_price', '0', 'قیمت لحظه‌ای همکار', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_live_price' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'montzar_live_price', '0', 'قیمت لحظه‌ای همکار', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_live_price' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'montzar_mazaneh', '0', 'مظنه همکار', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_mazaneh' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'montzar_mazaneh', '0', 'مظنه همکار', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_mazaneh' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'montzar_truly_buy_mazaneh', '0', 'مظنه خرید همکار', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_truly_buy_mazaneh' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'montzar_truly_buy_mazaneh', '0', 'مظنه خرید همکار', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_truly_buy_mazaneh' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'montzar_truly_sell_mazaneh', '0', 'مظنه فروش همکار', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_truly_sell_mazaneh' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'montzar_truly_sell_mazaneh', '0', 'مظنه فروش همکار', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_truly_sell_mazaneh' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) SELECT 'display_montzar', 'false', 'نمایش بلوک همکار در UI', 1, 1, NULL @@ -184,13 +190,15 @@ INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `de SELECT 'tahesab_bank_account', '', 'حساب بانکی ته‌حساب', 1, 1, NULL WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tahesab_bank_account' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'telegram_bot_token', '', 'توکن بات تلگرام', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'telegram_bot_token' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'telegram_bot_token', '', 'توکن بات تلگرام', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'telegram_bot_token' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'bale_bot_token', '', 'توکن بات بله', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'bale_bot_token' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'bale_bot_token', '', 'توکن بات بله', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'bale_bot_token' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) SELECT 'support_messenger_id', '', 'شناسه پشتیبانی پیام‌رسان', 1, 0, 'بله: یوزرنیم ble.ir | تلگرام: یوزرنیم | واتساپ: شماره با کد کشور | روبیکا/ایتا/سروش: یوزرنیم' @@ -205,17 +213,20 @@ SELECT 'support_messenger', 'bale', 'پیام‌رسان پشتیبانی', 1, 1 WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'support_messenger' LIMIT 1); -- min/max قیمت روز (سیستم) -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'up_price', '0', 'بیشترین قیمت امروز', 0, 1, 'ReportController' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'up_price' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'up_price', '0', 'بیشترین قیمت امروز', 0, 1, 'ReportController' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'up_price' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'down_price', '0', 'کمترین قیمت امروز', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'down_price' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'down_price', '0', 'کمترین قیمت امروز', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'down_price' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'price_extreme_date', '', 'تاریخ min/max روز', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_extreme_date' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'price_extreme_date', '', 'تاریخ min/max روز', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_extreme_date' LIMIT 1); INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) SELECT 'product_update_price_on_list', 'true', 'بروز قیمت در لیست محصول', 1, 1, NULL @@ -254,15 +265,18 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_gateway_item' -- عنوان فارسی + can_edit (value دست نخورده) -- ============================================================================= -UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'منبع قیمت'), `can_edit` = 1, - `description` = 'zaarbox | main_product | montzar | etehadie | taban_gohar' -WHERE `key` = 'price_provider'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'منبع قیمت'), `can_edit` = 1, +-- `description` = 'zaarbox | main_product | montzar | etehadie | taban_gohar' +-- WHERE `key` = 'price_provider'; -UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'محصول / UUID تابلو'), `can_edit` = 1 -WHERE `key` = 'main_product'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'محصول / UUID تابلو'), `can_edit` = 1 +-- WHERE `key` = 'main_product'; -UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'آدرس API Zaarbox'), `can_edit` = 1 -WHERE `key` = 'zaarbox_api_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'آدرس API Zaarbox'), `can_edit` = 1 +-- WHERE `key` = 'zaarbox_api_url'; UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'شناسه ردیف Zaarbox'), `can_edit` = 1, `value` = TRIM(REPLACE(REPLACE(`value`, CHAR(10), ''), CHAR(13), '')) @@ -277,8 +291,9 @@ WHERE `key` = 'buy_fee'; UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'سود فروش نمایش'), `can_edit` = 1 WHERE `key` = 'sell_fee'; -UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'کارمزد ریالی سفارش (legacy)'), `can_edit` = 0 -WHERE `key` = 'fee_cash'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'کارمزد ریالی سفارش (legacy)'), `can_edit` = 0 +-- WHERE `key` = 'fee_cash'; UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'درصد کارمزد سفارش'), `can_edit` = 1 WHERE `key` = 'fee_service_charge_percentage'; @@ -289,21 +304,24 @@ 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'; +-- [super-admin can_edit=0] +-- 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'; +-- [super-admin can_edit=0] +-- 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'; -UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'نام Montify'), `can_edit` = 1, - `description` = 'RequestsController — اختیاری' -WHERE `key` = 'montify_name'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'نام Montify'), `can_edit` = 1, +-- `description` = 'RequestsController — اختیاری' +-- WHERE `key` = 'montify_name'; -- ============================================================================= -- CONST — کلیدهای مورد استفاده کد @@ -349,7 +367,8 @@ WHERE `key` = 'main_product'; UPDATE `settings` SET `type` = 'longtext' WHERE `key` IN ('text_rule', 'text_about'); -- select (+ گزینه‌ها در description) -UPDATE `settings` SET `type` = 'select', `description` = 'montzar,zaarbox,main_product,etehadie,taban_gohar' WHERE `key` = 'price_provider'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `type` = 'select', `description` = 'montzar,zaarbox,main_product,etehadie,taban_gohar' WHERE `key` = 'price_provider'; UPDATE `settings` SET `type` = 'select', `description` = 'required = اجباری؛ خالی = اختیاری|required,', `can_edit` = 1 WHERE `key` = 'referral_id'; UPDATE `settings` SET `type` = 'select', `description` = 'sepal,' WHERE `key` = 'payping_gateway_name'; UPDATE `settings` SET `type` = 'select', `description` = 'bale,telegram,whatsapp,rubika,eitaa,soroush' WHERE `key` = 'support_messenger'; diff --git a/database/sql/goldali_zaarbox_price.sql b/database/sql/goldali_zaarbox_price.sql index 07eaca4..ce799a8 100644 --- a/database/sql/goldali_zaarbox_price.sql +++ b/database/sql/goldali_zaarbox_price.sql @@ -3,7 +3,8 @@ START TRANSACTION; -UPDATE `settings` SET `value` = 'zaarbox' WHERE `key` = 'price_provider'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `value` = 'zaarbox' WHERE `key` = 'price_provider'; INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) SELECT 'price_provider', 'zaarbox', 'منبع قیمت', 1, 1, 'zaarbox | main_product | montzar' @@ -12,7 +13,8 @@ WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_provider' LIMIT INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) SELECT 'zaarbox_api_url', 'https://price.zaarbox.ir/api/free', 'آدرس API تابلو', 1, 1, NULL WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'zaarbox_api_url' LIMIT 1); -UPDATE `settings` SET `value` = 'https://price.zaarbox.ir/api/free' WHERE `key` = 'zaarbox_api_url'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `value` = 'https://price.zaarbox.ir/api/free' WHERE `key` = 'zaarbox_api_url'; -- key ردیف در JSON (یا UUID فیلد id) — از Network تابلو کپی کنید INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) diff --git a/database/sql/kashkol_products_pricing_bootstrap.sql b/database/sql/kashkol_products_pricing_bootstrap.sql index 01949df..7b4d7ae 100644 --- a/database/sql/kashkol_products_pricing_bootstrap.sql +++ b/database/sql/kashkol_products_pricing_bootstrap.sql @@ -120,7 +120,8 @@ INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `de SELECT 'is_store', 'true', 'حالت فروشگاهی (قطره / کشکول)', 1, 1, 'true = روت‌های فروشگاه', 'switch' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'is_store' LIMIT 1); -UPDATE `settings` SET `value` = 'true' WHERE `key` = 'is_store'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `value` = 'true' WHERE `key` = 'is_store'; INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) SELECT 'montzar_price', 'true', 'قیمت از همکار (montzar)', 1, 1, NULL, 'switch' diff --git a/database/sql/price_channel_settings.sql b/database/sql/price_channel_settings.sql index ac6c95f..7610a3f 100644 --- a/database/sql/price_channel_settings.sql +++ b/database/sql/price_channel_settings.sql @@ -43,15 +43,17 @@ SET @price_channel_default_text = CONCAT( ); -- توکن روبیکا (توکن بله/تلگرام از قبل موجودند) — سیستمی (can_edit=0) -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'rubika_bot_token', '', 'توکن بات روبیکا', 0, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'rubika_bot_token' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) +-- SELECT 'rubika_bot_token', '', 'توکن بات روبیکا', 0, 1, NULL +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'rubika_bot_token' LIMIT 1); -- دسترسی دیپلوی — فقط تنظیمات پیشرفته (can_edit=0) -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'price_channel_access', 'false', 'دسترسی ارسال قیمت به کانال', 0, 1, - 'روشن: گروه «ارسال قیمت به کانال» در تنظیمات عادی پنل دیده می‌شود. خاموش: مخفی است (فقط از تنظیمات پیشرفته).', 'switch' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_channel_access' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'price_channel_access', 'false', 'دسترسی ارسال قیمت به کانال', 0, 1, +-- 'روشن: گروه «ارسال قیمت به کانال» در تنظیمات عادی پنل دیده می‌شود. خاموش: مخفی است (فقط از تنظیمات پیشرفته).', 'switch' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_channel_access' LIMIT 1); -- محتوا — قابل ویرایش (can_edit=1) INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) @@ -108,33 +110,38 @@ SELECT 'change_mesghal', '4.3318', 'وزن مثقال (گرم)', 1, 1, WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'change_mesghal' LIMIT 1); -- مقصد ارسال هر پیام‌رسان (آیدی چنل/گروه) — سیستمی (can_edit=0) -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'price_channel_bale_to', '', 'مقصد ارسال بله', 0, 1, - 'آیدی چنل/گروه بله برای ارسال قیمت (چند مقصد با ویرگول).', 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_channel_bale_to' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'price_channel_bale_to', '', 'مقصد ارسال بله', 0, 1, +-- 'آیدی چنل/گروه بله برای ارسال قیمت (چند مقصد با ویرگول).', 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_channel_bale_to' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'price_channel_telegram_to', '', 'مقصد ارسال تلگرام', 0, 1, - 'آیدی چنل/گروه تلگرام برای ارسال قیمت (چند مقصد با ویرگول).', 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_channel_telegram_to' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'price_channel_telegram_to', '', 'مقصد ارسال تلگرام', 0, 1, +-- 'آیدی چنل/گروه تلگرام برای ارسال قیمت (چند مقصد با ویرگول).', 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_channel_telegram_to' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'price_channel_rubika_to', '', 'مقصد ارسال روبیکا', 0, 1, - 'آیدی چنل/گروه روبیکا برای ارسال قیمت (چند مقصد با ویرگول).', 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_channel_rubika_to' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'price_channel_rubika_to', '', 'مقصد ارسال روبیکا', 0, 1, +-- 'آیدی چنل/گروه روبیکا برای ارسال قیمت (چند مقصد با ویرگول).', 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_channel_rubika_to' LIMIT 1); -- استانداردسازی can_edit -UPDATE `settings` SET `can_edit` = 0 WHERE `key` IN ( - 'rubika_bot_token', - 'price_channel_access', - 'price_channel_bale_to', 'price_channel_telegram_to', 'price_channel_rubika_to' -); -UPDATE `settings` SET - `title_fa` = 'دسترسی ارسال قیمت به کانال', - `type` = 'switch', - `can_edit` = 0, - `description` = 'روشن: گروه «ارسال قیمت به کانال» در تنظیمات عادی پنل دیده می‌شود. خاموش: مخفی است (فقط از تنظیمات پیشرفته).' -WHERE `key` = 'price_channel_access'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `can_edit` = 0 WHERE `key` IN ( +-- 'rubika_bot_token', +-- 'price_channel_access', +-- 'price_channel_bale_to', 'price_channel_telegram_to', 'price_channel_rubika_to' +-- ); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `title_fa` = 'دسترسی ارسال قیمت به کانال', +-- `type` = 'switch', +-- `can_edit` = 0, +-- `description` = 'روشن: گروه «ارسال قیمت به کانال» در تنظیمات عادی پنل دیده می‌شود. خاموش: مخفی است (فقط از تنظیمات پیشرفته).' +-- WHERE `key` = 'price_channel_access'; UPDATE `settings` SET `can_edit` = 1 WHERE `key` IN ( 'price_channel_enabled', 'price_channel_messengers', 'price_channel_diff', 'price_channel_min_seconds', 'price_channel_message_text', diff --git a/database/sql/remove_montzar_price_setting.sql b/database/sql/remove_montzar_price_setting.sql index 8d9ade1..05acbb2 100644 --- a/database/sql/remove_montzar_price_setting.sql +++ b/database/sql/remove_montzar_price_setting.sql @@ -31,7 +31,8 @@ DELETE FROM `const` WHERE `key` IN ( 'first_customer_wallet_value' ); -UPDATE `settings` SET `value` = '13', `can_edit` = 1 -WHERE `key` = 'main_wallet_products' AND TRIM(COALESCE(`value`, '')) = ''; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `value` = '13', `can_edit` = 1 +-- WHERE `key` = 'main_wallet_products' AND TRIM(COALESCE(`value`, '')) = ''; COMMIT; diff --git a/database/sql/remove_obsolete_wss_settings.sql b/database/sql/remove_obsolete_wss_settings.sql index 2ee6473..7fbaa56 100644 --- a/database/sql/remove_obsolete_wss_settings.sql +++ b/database/sql/remove_obsolete_wss_settings.sql @@ -3,27 +3,30 @@ -- اجرا روی پروژه‌های موجود بعد از مهاجرت به SSE لاراول -- اطمینان از کلیدهای فعال SSE -UPDATE `settings` SET - `value` = 'true', - `can_edit` = 0, - `is_active` = 1, - `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'قیمت لحظه‌ای (SSE)'), - `description` = 'روشن: اپ به sse_path وصل می‌شود؛ خاموش: polling /api/price/last و /customer/product/list' -WHERE `key` = 'wss_enabled'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `value` = 'true', +-- `can_edit` = 0, +-- `is_active` = 1, +-- `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'قیمت لحظه‌ای (SSE)'), +-- `description` = 'روشن: اپ به sse_path وصل می‌شود؛ خاموش: polling /api/price/last و /customer/product/list' +-- WHERE `key` = 'wss_enabled'; -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'sse_path', '/api/price/stream', 'مسیر SSE قیمت', 0, 1, - 'GET لاراول — استریم event:last و event:list', - 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'sse_path' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'sse_path', '/api/price/stream', 'مسیر SSE قیمت', 0, 1, +-- 'GET لاراول — استریم event:last و event:list', +-- 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'sse_path' LIMIT 1); -UPDATE `settings` SET - `value` = COALESCE(NULLIF(TRIM(`value`), ''), '/api/price/stream'), - `can_edit` = 0, - `is_active` = 1, - `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'مسیر SSE قیمت'), - `description` = 'مسیر GET لاراول برای استریم قیمت — پیش‌فرض /api/price/stream' -WHERE `key` = 'sse_path'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET +-- `value` = COALESCE(NULLIF(TRIM(`value`), ''), '/api/price/stream'), +-- `can_edit` = 0, +-- `is_active` = 1, +-- `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'مسیر SSE قیمت'), +-- `description` = 'مسیر GET لاراول برای استریم قیمت — پیش‌فرض /api/price/stream' +-- WHERE `key` = 'sse_path'; -- حذف کلیدهای اضافی WebSocket/montzar DELETE FROM `settings` diff --git a/database/sql/remove_taban_gohar_price_provider.sql b/database/sql/remove_taban_gohar_price_provider.sql index 9403ae5..2d23943 100644 --- a/database/sql/remove_taban_gohar_price_provider.sql +++ b/database/sql/remove_taban_gohar_price_provider.sql @@ -10,14 +10,15 @@ DELETE FROM `settings` WHERE `key` IN ( 'price_primary_source' ); -UPDATE `settings` -SET - `value` = CASE - WHEN LOWER(TRIM(`value`)) IN ('taban_gohar', 'etehadie') THEN 'montzar' - ELSE `value` - END, - `description` = 'منبع فعال قیمت|montzar,zaarbox,main_product', - `type` = 'select' -WHERE `key` = 'price_provider'; +-- [super-admin can_edit=0] +-- UPDATE `settings` +-- SET +-- `value` = CASE +-- WHEN LOWER(TRIM(`value`)) IN ('taban_gohar', 'etehadie') THEN 'montzar' +-- ELSE `value` +-- END, +-- `description` = 'منبع فعال قیمت|montzar,zaarbox,main_product', +-- `type` = 'select' +-- WHERE `key` = 'price_provider'; COMMIT; diff --git a/database/sql/wss_settings_update.sql b/database/sql/wss_settings_update.sql index f65674e..2bda4eb 100644 --- a/database/sql/wss_settings_update.sql +++ b/database/sql/wss_settings_update.sql @@ -1,22 +1,26 @@ -- مهاجرت WebSocket/montzar → SSE لاراول -- دیگر نیازی به docker montzar و لایت‌اسپید /prc/ws نیست -UPDATE `settings` SET `value` = 'true', `can_edit` = 0, `is_active` = 1, - `title_fa` = 'قیمت لحظه‌ای (SSE)', - `description` = 'روشن: اپ به /api/price/stream وصل می‌شود؛ خاموش: polling /api/price/last و /customer/product/list' -WHERE `key` = 'wss_enabled'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `value` = 'true', `can_edit` = 0, `is_active` = 1, +-- `title_fa` = 'قیمت لحظه‌ای (SSE)', +-- `description` = 'روشن: اپ به /api/price/stream وصل می‌شود؛ خاموش: polling /api/price/last و /customer/product/list' +-- WHERE `key` = 'wss_enabled'; -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) -SELECT 'sse_path', '/api/price/stream', 'مسیر SSE قیمت', 0, 1, - 'مسیر GET لاراول برای استریم last/list — پیش‌فرض /api/price/stream', - 'text' -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'sse_path' LIMIT 1); +-- [super-admin can_edit=0] +-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +-- SELECT 'sse_path', '/api/price/stream', 'مسیر SSE قیمت', 0, 1, +-- 'مسیر GET لاراول برای استریم last/list — پیش‌فرض /api/price/stream', +-- 'text' +-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'sse_path' LIMIT 1); -UPDATE `settings` SET `can_edit` = 0, `is_active` = 0, - `title_fa` = 'مسیر WebSocket (منسوخ)', - `description` = 'منسوخ — SSE از sse_path استفاده می‌کند. montzar دیگر لازم نیست.' -WHERE `key` = 'wss_path'; +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `can_edit` = 0, `is_active` = 0, +-- `title_fa` = 'مسیر WebSocket (منسوخ)', +-- `description` = 'منسوخ — SSE از sse_path استفاده می‌کند. montzar دیگر لازم نیست.' +-- WHERE `key` = 'wss_path'; -UPDATE `settings` SET `can_edit` = 0, `is_active` = 0, - `description` = 'منسوخ — montzar trigger. با SSE دیگر استفاده نمی‌شود.' -WHERE `key` IN ('wss_trigger_host', 'wss_http_port', 'wss_socket_port', 'wss_trigger_path', 'wss_link'); +-- [super-admin can_edit=0] +-- UPDATE `settings` SET `can_edit` = 0, `is_active` = 0, +-- `description` = 'منسوخ — montzar trigger. با SSE دیگر استفاده نمی‌شود.' +-- WHERE `key` IN ('wss_trigger_host', 'wss_http_port', 'wss_socket_port', 'wss_trigger_path', 'wss_link');