diff --git a/config/price_providers.php b/config/price_providers.php index b7686d6..9905c36 100644 --- a/config/price_providers.php +++ b/config/price_providers.php @@ -17,7 +17,6 @@ return [ 'zaarbox_price_key' => '', /** UUID نمودار Zaarbox — خالی = پیش‌فرض ca3800a0-... در ZaarboxPriceService */ 'chart_id' => '', - 'price_method' => '', 'register_jibit_verify' => false, 'register_referral_sms_to_referrer' => false, 'register_referral_bonus_message' => false, diff --git a/database/sql/abshode_rahimi_merge_goldali_catalog.sql b/database/sql/abshode_rahimi_merge_goldali_catalog.sql new file mode 100644 index 0000000..cf43142 --- /dev/null +++ b/database/sql/abshode_rahimi_merge_goldali_catalog.sql @@ -0,0 +1,1378 @@ +-- ============================================================================= +-- آبشده رحیمی — ادغام settings با کاتالوگ goldAliii +-- +-- منبع مقادیر: abshode_rahimi.json (settings) +-- قالب کلیدها: goldali.json (102 کلید) +-- +-- نکته: ابتدا charset ستون description به utf8mb4 تبدیل می‌شود. +-- +-- قبل از اجرا: USE دیتابیس آبشده رحیمی + بکاپ +-- ============================================================================= + +START TRANSACTION; + +-- ============================================================================= +-- charset — ستون description روی بعضی سرورها latin1 است +-- ============================================================================= +SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci; + +ALTER TABLE `settings` + MODIFY COLUMN `description` TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL, + MODIFY COLUMN `title_fa` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL, + MODIFY COLUMN `type` VARCHAR(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL; + +-- 1) INSERT + +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'admin_url', 'https://app.abshodehrahimi.ir/admin/', 'آدرس پنل ادمین', 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 'app_url', 'https://app.abshodehrahimi.ir', 'آدرس اپ (کاربر)', 1, 1, '0inserver', 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'app_url' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'auto_active_customer', 'true', 'فعال‌سازی خودکار کاربر', 1, 1, NULL, 'switch' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'auto_active_customer' LIMIT 1); +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); +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); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'charge_notif', 'false', 'پیامک شارژ ادمین', 1, 1, NULL, 'switch' +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 'chart_id', '', 'UUID نمودار Zaarbox', 1, 0, 'خالی = ca3800a0-1f57-3528-b963-178f9168e04f', 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'chart_id' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'close_price', 'false', 'بستن قیمت در بازه زمانی', 1, 1, NULL, 'switch' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'close_price' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'color_primary', '#0A1B37', 'رنگ اصلی', 1, 1, NULL, 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'color_primary' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'color_secondary', '#0A1B37', 'رنگ ثانویه', 1, 1, NULL, 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'color_secondary' LIMIT 1); +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); +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); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'etehadie_api_url', '', 'آدرس API اتحادیه (پشتیبان)', 1, 0, NULL, 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'etehadie_api_url' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'external_order_api_enabled', '', 'فعال‌سازی API سفارش خارجی (get_wallet / order)', 1, 0, 'true + node_client_id + node_shared_secret', NULL +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'external_order_api_enabled' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'fee_cash', '500000', 'اختلاف ریالی هر گرم (سفارش)', 1, 1, 'goldAliii: 0', 'number' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'fee_cash' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'fee_free', '0', 'تعداد سفارش اول بدون کارمزد', 1, 1, NULL, 'switch' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'fee_free' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'fee_service_charge_percentage', '0.005', 'درصد کارمزد سفارش', 1, 1, 'goldAliii: 7%', 'number' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'fee_service_charge_percentage' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'fee_single', '500000', 'اختلاف قیمت پایه (ریال)', 1, 1, 'پیش‌فرض Laravel fee.single', 'number' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'fee_single' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'gift_for_referral', '', 'پاداش معرف‌شونده', 1, 0, NULL, 'number' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'gift_for_referral' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'gift_for_referrer', '0.005', 'پاداش معرف', 1, 1, NULL, 'number' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'gift_for_referrer' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'group_sms', 'false', 'پیامک گروهی', 1, 1, NULL, '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 'has_chat', 'true', 'چت پشتیبانی', 1, 1, NULL, 'switch' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'has_chat' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'has_page_earn_money', 'false', 'صفحه کسب درآمد', 1, 1, 'in server', 'switch' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'has_page_earn_money' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'has_page_fund', 'true', 'صفحه صندوق', 1, 1, NULL, 'switch' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'has_page_fund' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'has_page_permission', 'true', 'صفحه مجوزها', 1, 1, NULL, 'switch' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'has_page_permission' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'has_page_physical_gold', 'true', 'صفحه طلای فیزیکی', 1, 1, NULL, 'switch' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'has_page_physical_gold' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'has_page_price_trigger', 'true', 'صفحه هشدار قیمت', 1, 1, NULL, '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 'is_requaire_referral', 'true', 'کد معرف اجباری (قدیمی)', 1, 1, NULL, 'switch' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'is_requaire_referral' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'jibit_verification', 'true', 'تأیید کارت بانکی با جیبیت', 1, 1, 'true/false — BankAccountController', 'switch' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'jibit_verification' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'key', 'abshodehrahimi', 'کلید داخلی اپ', 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 'logo_login', 'logo_login +', '', 1, 1, 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', 'logo_register', 'لوگوی صفحه ورود', 1, 1, 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 'main_product', '', 'قیمت صفحه اصلی', 1, 0, NULL, 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'main_product' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'main_product_price', 'true', 'قیمت از محصول (legacy)', 1, 1, 'از price_provider استفاده کنید', 'switch' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'main_product_price' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'metal_type', '', 'عنوان فلز در UI', 1, 0, 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 'min_first_buy', '', 'حداقل اولین خرید (ریال)', 1, 0, NULL, 'number' +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 'min_withdraw', '', 'حداقل برداشت (ریال)', 1, 0, NULL, 'number' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'min_withdraw' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'minimum_sell', '', 'حداقل فروش', 1, 0, NULL, 'number' +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 '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 'montzar_base_url', 'https://abshodehrahimi.ir', 'آدرس سرور همکار', 1, 1, 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_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); +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); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'montzar_open_buy', 'true', 'باز بودن خرید همکار', 1, 1, 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', 'true', 'باز بودن فروش همکار', 1, 1, 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_password', '09133745569', 'رمز API همکار', 1, 1, NULL, 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_password' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'montzar_price', 'true', 'قیمت از همکار (montzar)', 1, 1, 'گلد علی: false — zaarbox فعال', 'switch' +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); +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); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'name_fa', 'آبشده رحیمی', 'نام فارسی اپ', 1, 1, 'پلتفرم خرید و فروش آنلاین طلای آبشده . اولین ایده پرداز قلک طلا در ایران', 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'name_fa' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'node_client_id', '', 'شناسه کلاینت API خارجی (X-Client-Id)', 1, 0, 'مقدار قبلی .env: NODE_CLIENT_ID', NULL +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'node_client_id' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'node_shared_secret', '', 'کلید امضای HMAC API خارجی', 1, 0, 'مقدار قبلی .env: NODE_SHARED_SECRET', NULL +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'node_shared_secret' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'open_register', 'true', 'ثبت‌نام باز', 1, 1, NULL, 'switch' +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`, `type`) +SELECT 'payping_fin_customer_id', '', 'customer_id fin', 1, 0, NULL, 'number' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_fin_customer_id' 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); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'payping_fin_token', '', 'توکن fin', 1, 0, NULL, 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_fin_token' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'payping_fin_url', '', 'URL fin', 1, 0, NULL, 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_fin_url' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'payping_gateway_item', '', 'item تکی (legacy)', 1, 0, NULL, 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_gateway_item' LIMIT 1); +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_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); +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); +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); +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); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'product_auto_close_open_on_list', 'true', 'باز/بسته خودکار محصول', 1, 1, 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 '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); +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); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'referral_count_for_gift', '', 'تعداد معرف برای هدیه', 1, 0, NULL, 'number' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'referral_count_for_gift' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'referral_id', 'required', 'الزام کد معرف', 0, 1, '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 'referral_limit', '', 'محدودیت دعوت', 1, 0, NULL, 'text' +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 'register_jibit_verify', '', 'تأیید کدملی/موبایل در ثبت‌نام', 1, 0, 'AuthController', 'switch' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'register_jibit_verify' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'register_referral_bonus_message', '', 'پیام پاداش در SMS ثبت‌نام', 1, 0, NULL, 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'register_referral_bonus_message' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'register_referral_sms_to_referrer', '', 'SMS به معرف هنگام ثبت‌نام', 1, 0, NULL, 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'register_referral_sms_to_referrer' LIMIT 1); +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); +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); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'show_last_price', 'false', 'نمایش آخرین قیمت DB اگر API قطع شد', 1, 1, NULL, 'switch' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'show_last_price' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'startDay', '11:00', 'شروع بازه معامله', 1, 1, NULL, 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'startDay' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'tabanGohar_price', 'false', 'قیمت تابان گوهر', 1, 1, NULL, 'switch' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tabanGohar_price' 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 'tahesab_db', 'TahesabDB5', 'دیتابیس ته‌حساب', 1, 1, NULL, 'text' +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); +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); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'text_about', '', 'متن درباره ما', 1, 0, NULL, 'longtext' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'text_about' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'text_rule', '', 'متن قوانین', 1, 0, NULL, 'longtext' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'text_rule' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'title_fav', '', 'عنوان favicon', 1, 0, NULL, 'text' +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); +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); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'zaarbox_price_key', '', 'کد محصول زرباکس', 1, 0, NULL, 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'zaarbox_price_key' LIMIT 1); + +-- 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'; +UPDATE `settings` SET + `title_fa` = 'آدرس اپ (کاربر)', + `can_edit` = 1, + `type` = 'text', + `description` = '0inserver', + `value` = 'https://app.abshodehrahimi.ir', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'app_url'; +UPDATE `settings` SET + `title_fa` = 'فعال‌سازی خودکار کاربر', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'true', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'auto_active_customer'; +UPDATE `settings` SET + `title_fa` = 'آدرس پایه', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '91.212.174.137', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'bace_url'; +UPDATE `settings` SET + `title_fa` = 'حذف مشتری از تراز ادمین', + `can_edit` = 0, + `type` = 'number', + `description` = NULL, + `value` = '', + `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'; +UPDATE `settings` SET + `title_fa` = 'سود/اختلاف خرید (ریال)', + `can_edit` = 1, + `type` = 'number', + `description` = 'اگر خالی باشد از fee_single', + `value` = '0', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'buy_fee'; +UPDATE `settings` SET + `title_fa` = 'پیامک شارژ ادمین', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'false', + `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'; +UPDATE `settings` SET + `title_fa` = 'بستن قیمت در بازه زمانی', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'false', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'close_price'; +UPDATE `settings` SET + `title_fa` = 'رنگ اصلی', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '#0A1B37', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'color_primary'; +UPDATE `settings` SET + `title_fa` = 'رنگ ثانویه', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '#0A1B37', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'color_secondary'; +UPDATE `settings` SET + `title_fa` = 'نمایش بلوک همکار در UI', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = '', + `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'; +UPDATE `settings` SET + `title_fa` = 'پایان بازه معامله', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '20:30', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'endDay'; +UPDATE `settings` SET + `title_fa` = 'آدرس API اتحادیه (پشتیبان)', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '', + `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'; +UPDATE `settings` SET + `title_fa` = 'اختلاف ریالی هر گرم (سفارش)', + `can_edit` = 1, + `type` = 'number', + `description` = 'goldAliii: 0', + `value` = '500000', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'fee_cash'; +UPDATE `settings` SET + `title_fa` = 'تعداد سفارش اول بدون کارمزد', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = '0', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'fee_free'; +UPDATE `settings` SET + `title_fa` = 'درصد کارمزد سفارش', + `can_edit` = 1, + `type` = 'number', + `description` = 'goldAliii: 7%', + `value` = '0.005', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'fee_service_charge_percentage'; +UPDATE `settings` SET + `title_fa` = 'اختلاف قیمت پایه (ریال)', + `can_edit` = 1, + `type` = 'number', + `description` = 'پیش‌فرض Laravel fee.single', + `value` = '500000', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'fee_single'; +UPDATE `settings` SET + `title_fa` = 'پاداش معرف‌شونده', + `can_edit` = 1, + `type` = 'number', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'gift_for_referral'; +UPDATE `settings` SET + `title_fa` = 'پاداش معرف', + `can_edit` = 1, + `type` = 'number', + `description` = NULL, + `value` = '0.005', + `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'; +UPDATE `settings` SET + `title_fa` = 'چت پشتیبانی', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'true', + `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'; +UPDATE `settings` SET + `title_fa` = 'صفحه صندوق', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'true', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'has_page_fund'; +UPDATE `settings` SET + `title_fa` = 'صفحه مجوزها', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'true', + `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_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'; +UPDATE `settings` SET + `title_fa` = 'کد معرف اجباری (قدیمی)', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'true', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'is_requaire_referral'; +UPDATE `settings` SET + `title_fa` = 'تأیید کارت بانکی با جیبیت', + `can_edit` = 1, + `type` = 'switch', + `description` = 'true/false — BankAccountController', + `value` = 'true', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'jibit_verification'; +UPDATE `settings` SET + `title_fa` = 'کلید داخلی اپ', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = 'abshodehrahimi', + `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'; +UPDATE `settings` SET + `title_fa` = 'قیمت از محصول (legacy)', + `can_edit` = 1, + `type` = 'switch', + `description` = 'از price_provider استفاده کنید', + `value` = 'true', + `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'; +UPDATE `settings` SET + `title_fa` = 'حداقل اولین خرید (ریال)', + `can_edit` = 1, + `type` = 'number', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'min_first_buy'; +UPDATE `settings` SET + `title_fa` = 'حداقل برداشت (ریال)', + `can_edit` = 1, + `type` = 'number', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'min_withdraw'; +UPDATE `settings` SET + `title_fa` = 'حداقل فروش', + `can_edit` = 1, + `type` = 'number', + `description` = NULL, + `value` = '', + `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'; +UPDATE `settings` SET + `title_fa` = 'بسته بودن همکار', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'false', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'montzar_closed'; +UPDATE `settings` SET + `title_fa` = 'اختلاف قیمت همکار', + `can_edit` = 0, + `type` = 'text', + `description` = 'سیستم پر می‌کند', + `value` = '334733.67434615', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'montzar_diff'; +UPDATE `settings` SET + `title_fa` = 'قیمت لحظه‌ای همکار', + `can_edit` = 0, + `type` = 'text', + `description` = NULL, + `value` = '183572564.02763', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'montzar_live_price'; +UPDATE `settings` SET + `title_fa` = 'مظنه همکار', + `can_edit` = 0, + `type` = 'text', + `description` = NULL, + `value` = '795200000', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'montzar_mazaneh'; +UPDATE `settings` SET + `title_fa` = 'موبایل API همکار', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '09133745569', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'montzar_mobile'; +UPDATE `settings` SET + `title_fa` = 'باز بودن خرید همکار', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'true', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'montzar_open_buy'; +UPDATE `settings` SET + `title_fa` = 'باز بودن فروش همکار', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'true', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'montzar_open_sell'; +UPDATE `settings` SET + `title_fa` = 'رمز API همکار', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '09133745569', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'montzar_password'; +UPDATE `settings` SET + `title_fa` = 'قیمت از همکار (montzar)', + `can_edit` = 1, + `type` = 'switch', + `description` = 'گلد علی: false — zaarbox فعال', + `value` = 'true', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'montzar_price'; +UPDATE `settings` SET + `title_fa` = 'کد محصول همکار', + `can_edit` = 1, + `type` = 'number', + `description` = NULL, + `value` = '1', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'montzar_product_id'; +UPDATE `settings` SET + `title_fa` = 'توکن همکار (خودکار)', + `can_edit` = 0, + `type` = 'text', + `description` = NULL, + `value` = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL2xpbWFuZ29sZC5pci9zZXJ2ZXIvYXV0aC9sb2dpbiIsImlhdCI6MTc3OTcxNTkxMywiZXhwIjoxNzgyMzA3OTEzLCJuYmYiOjE3Nzk3MTU5MTMsImp0aSI6ImZ4SDkwcWV4eHRiTmx5RUUiLCJzdWIiOiIzMzQ2IiwicHJ2IjoiMWQwYTAyMGFjZjVjNGI2YzQ5Nzk4OWRmMWFiZjBmYmQ0ZThjOGQ2MyJ9.M_Yff36nYQ94p8HnjB2wuHEQJaZTgW6Ppr-PRTXkyHE', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'montzar_token'; +UPDATE `settings` SET + `title_fa` = 'مظنه خرید همکار', + `can_edit` = 0, + `type` = 'text', + `description` = NULL, + `value` = '796650000', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'montzar_truly_buy_mazaneh'; +UPDATE `settings` SET + `title_fa` = 'مظنه فروش همکار', + `can_edit` = 0, + `type` = 'text', + `description` = NULL, + `value` = '793750000', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'montzar_truly_sell_mazaneh'; +UPDATE `settings` SET + `title_fa` = 'نام انگلیسی اپ', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = 'abshode_rahimi', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'name_en'; +UPDATE `settings` SET + `title_fa` = 'نام فارسی اپ', + `can_edit` = 1, + `type` = 'text', + `description` = 'پلتفرم خرید و فروش آنلاین طلای آبشده . اولین ایده پرداز قلک طلا در ایران', + `value` = 'آبشده رحیمی', + `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'; +UPDATE `settings` SET + `title_fa` = 'کلید امضای HMAC API خارجی', + `can_edit` = 1, + `type` = NULL, + `description` = 'مقدار قبلی .env: NODE_SHARED_SECRET', + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'node_shared_secret'; +UPDATE `settings` SET + `title_fa` = 'ثبت‌نام باز', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'true', + `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'; +UPDATE `settings` SET + `title_fa` = 'توکن fin', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'payping_fin_token'; +UPDATE `settings` SET + `title_fa` = 'URL fin', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'payping_fin_url'; +UPDATE `settings` SET + `title_fa` = 'item تکی (legacy)', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '', + `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'; +UPDATE `settings` SET + `title_fa` = 'نام gateway درگاه', + `can_edit` = 1, + `type` = 'select', + `description` = 'sepal,', + `value` = '', + `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'; +UPDATE `settings` SET + `title_fa` = 'آدرس شروع درگاه', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'payping_start_url'; +UPDATE `settings` SET + `title_fa` = 'اولویت تراکنش ناموفق', + `can_edit` = 0, + `type` = 'switch', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'payping_strict_failed_withdraw'; +UPDATE `settings` SET + `title_fa` = 'آدرس تأیید درگاه', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '', + `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'; +UPDATE `settings` SET + `title_fa` = 'باز/بسته خودکار محصول', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'true', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'product_auto_close_open_on_list'; +UPDATE `settings` SET + `title_fa` = 'بروز قیمت در لیست محصول', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'true', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'product_update_price_on_list'; +UPDATE `settings` SET + `title_fa` = 'API سود طلا', + `can_edit` = 0, + `type` = 'switch', + `description` = NULL, + `value` = '', + `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'; +UPDATE `settings` SET + `title_fa` = 'تعداد معرف برای هدیه', + `can_edit` = 1, + `type` = 'number', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'referral_count_for_gift'; +UPDATE `settings` SET + `title_fa` = 'الزام کد معرف', + `can_edit` = 0, + `type` = 'select', + `description` = 'required,', + `value` = 'required', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'referral_id'; +UPDATE `settings` SET + `title_fa` = 'محدودیت دعوت', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'referral_limit'; +UPDATE `settings` SET + `title_fa` = 'تأیید کدملی/موبایل در ثبت‌نام', + `can_edit` = 1, + `type` = 'switch', + `description` = 'AuthController', + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'register_jibit_verify'; +UPDATE `settings` SET + `title_fa` = 'پیام پاداش در SMS ثبت‌نام', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'register_referral_bonus_message'; +UPDATE `settings` SET + `title_fa` = 'SMS به معرف هنگام ثبت‌نام', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'register_referral_sms_to_referrer'; +UPDATE `settings` SET + `title_fa` = 'سود/اختلاف فروش (ریال)', + `can_edit` = 1, + `type` = 'number', + `description` = 'اگر خالی باشد از fee_single', + `value` = '0', + `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'; +UPDATE `settings` SET + `title_fa` = 'آدرس API سرور', + `can_edit` = 1, + `type` = 'text', + `description` = 'in server', + `value` = 'https://app.abshodehrahimi.ir/api', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'server_url'; +UPDATE `settings` SET + `title_fa` = 'نمایش آخرین قیمت DB اگر API قطع شد', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'false', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'show_last_price'; +UPDATE `settings` SET + `title_fa` = 'شروع بازه معامله', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '11:00', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'startDay'; +UPDATE `settings` SET + `title_fa` = 'قیمت تابان گوهر', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'false', + `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'; +UPDATE `settings` SET + `title_fa` = '', + `can_edit` = 1, + `type` = 'text', + `description` = 'تستی است', + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'test*'; +UPDATE `settings` SET + `title_fa` = 'متن درباره ما', + `can_edit` = 1, + `type` = 'longtext', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'text_about'; +UPDATE `settings` SET + `title_fa` = 'متن قوانین', + `can_edit` = 1, + `type` = 'longtext', + `description` = NULL, + `value` = '', + `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'; +UPDATE `settings` SET + `title_fa` = 'کد محصول زرباکس', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'zaarbox_price_key'; + +-- 3) logo_login + +DELETE FROM `settings` +WHERE `key` LIKE 'logo_login%' AND `key` <> 'logo_login' + AND EXISTS (SELECT 1 FROM (SELECT `id`, `key` FROM `settings`) AS `s` WHERE `s`.`key` = 'logo_login'); + +UPDATE `settings` SET + `key` = 'logo_login', + `value` = TRIM(REPLACE(REPLACE(`value`, CHAR(13), ''), CHAR(10), '')), + `updated_at` = NOW() +WHERE `key` LIKE 'logo_login%' AND `key` <> 'logo_login'; + +-- 4) DELETE extras + +DELETE FROM `settings` +WHERE `key` NOT IN ( + 'admin_url', + 'app_url', + 'auto_active_customer', + 'bace_url', + 'balance_report_exclude_customer_id', + 'bale_bot_token', + 'buy_fee', + 'charge_notif', + 'chart_id', + 'close_price', + 'color_primary', + 'color_secondary', + 'display_montzar', + 'down_price', + 'endDay', + 'etehadie_api_url', + 'external_order_api_enabled', + 'fee_cash', + 'fee_free', + 'fee_service_charge_percentage', + 'fee_single', + 'gift_for_referral', + 'gift_for_referrer', + 'group_sms', + 'has_chat', + 'has_page_earn_money', + 'has_page_fund', + 'has_page_permission', + 'has_page_physical_gold', + 'has_page_price_trigger', + 'is_requaire_referral', + 'jibit_verification', + 'key', + 'logo_login', + 'logo_register', + 'main_product', + 'main_product_price', + 'metal_type', + 'min_first_buy', + 'min_withdraw', + 'minimum_sell', + 'montify_name', + 'montzar_base_url', + 'montzar_closed', + 'montzar_diff', + 'montzar_live_price', + 'montzar_mazaneh', + 'montzar_mobile', + 'montzar_open_buy', + 'montzar_open_sell', + 'montzar_password', + 'montzar_price', + 'montzar_product_id', + 'montzar_token', + 'montzar_truly_buy_mazaneh', + 'montzar_truly_sell_mazaneh', + 'name_en', + 'name_fa', + 'node_client_id', + 'node_shared_secret', + 'open_register', + 'payping_fin_customer_id', + 'payping_fin_sync_enabled', + 'payping_fin_token', + 'payping_fin_url', + 'payping_gateway_item', + 'payping_gateway_items', + 'payping_gateway_name', + 'payping_round_toman', + 'payping_start_url', + 'payping_strict_failed_withdraw', + 'payping_verify_url', + 'price_extreme_date', + 'price_provider', + 'product_auto_close_open_on_list', + 'product_update_price_on_list', + 'profit_gold_api_enabled', + 'referral_bonus_amount', + 'referral_count_for_gift', + 'referral_id', + 'referral_limit', + 'register_jibit_verify', + 'register_referral_bonus_message', + 'register_referral_sms_to_referrer', + 'sell_fee', + 'send_to_tahesab', + 'server_url', + 'show_last_price', + 'startDay', + 'tabanGohar_price', + 'tahesab_bank_account', + 'tahesab_db', + 'tahesab_token', + 'telegram_bot_token', + 'test*', + 'text_about', + 'text_rule', + 'title_fav', + 'title_pwa', + 'up_price', + 'zaarbox_api_url', + 'zaarbox_price_key' +); + +DELETE FROM `settings` WHERE `key` = 'price_method'; + +COMMIT; diff --git a/database/sql/abshode_rahimi_merge_goldali_catalog_patch.sql b/database/sql/abshode_rahimi_merge_goldali_catalog_patch.sql new file mode 100644 index 0000000..2bf8f60 --- /dev/null +++ b/database/sql/abshode_rahimi_merge_goldali_catalog_patch.sql @@ -0,0 +1,931 @@ +-- patch بعد از اجرای ناقص — فقط charset + UPDATE +SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci; + +ALTER TABLE `settings` + MODIFY COLUMN `description` TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL, + MODIFY COLUMN `title_fa` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL, + MODIFY COLUMN `type` VARCHAR(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL; + +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'; +UPDATE `settings` SET + `title_fa` = 'آدرس اپ (کاربر)', + `can_edit` = 1, + `type` = 'text', + `description` = '0inserver', + `value` = 'https://app.abshodehrahimi.ir', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'app_url'; +UPDATE `settings` SET + `title_fa` = 'فعال‌سازی خودکار کاربر', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'true', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'auto_active_customer'; +UPDATE `settings` SET + `title_fa` = 'آدرس پایه', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '91.212.174.137', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'bace_url'; +UPDATE `settings` SET + `title_fa` = 'حذف مشتری از تراز ادمین', + `can_edit` = 0, + `type` = 'number', + `description` = NULL, + `value` = '', + `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'; +UPDATE `settings` SET + `title_fa` = 'سود/اختلاف خرید (ریال)', + `can_edit` = 1, + `type` = 'number', + `description` = 'اگر خالی باشد از fee_single', + `value` = '0', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'buy_fee'; +UPDATE `settings` SET + `title_fa` = 'پیامک شارژ ادمین', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'false', + `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'; +UPDATE `settings` SET + `title_fa` = 'بستن قیمت در بازه زمانی', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'false', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'close_price'; +UPDATE `settings` SET + `title_fa` = 'رنگ اصلی', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '#0A1B37', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'color_primary'; +UPDATE `settings` SET + `title_fa` = 'رنگ ثانویه', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '#0A1B37', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'color_secondary'; +UPDATE `settings` SET + `title_fa` = 'نمایش بلوک همکار در UI', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = '', + `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'; +UPDATE `settings` SET + `title_fa` = 'پایان بازه معامله', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '20:30', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'endDay'; +UPDATE `settings` SET + `title_fa` = 'آدرس API اتحادیه (پشتیبان)', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '', + `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'; +UPDATE `settings` SET + `title_fa` = 'اختلاف ریالی هر گرم (سفارش)', + `can_edit` = 1, + `type` = 'number', + `description` = 'goldAliii: 0', + `value` = '500000', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'fee_cash'; +UPDATE `settings` SET + `title_fa` = 'تعداد سفارش اول بدون کارمزد', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = '0', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'fee_free'; +UPDATE `settings` SET + `title_fa` = 'درصد کارمزد سفارش', + `can_edit` = 1, + `type` = 'number', + `description` = 'goldAliii: 7%', + `value` = '0.005', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'fee_service_charge_percentage'; +UPDATE `settings` SET + `title_fa` = 'اختلاف قیمت پایه (ریال)', + `can_edit` = 1, + `type` = 'number', + `description` = 'پیش‌فرض Laravel fee.single', + `value` = '500000', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'fee_single'; +UPDATE `settings` SET + `title_fa` = 'پاداش معرف‌شونده', + `can_edit` = 1, + `type` = 'number', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'gift_for_referral'; +UPDATE `settings` SET + `title_fa` = 'پاداش معرف', + `can_edit` = 1, + `type` = 'number', + `description` = NULL, + `value` = '0.005', + `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'; +UPDATE `settings` SET + `title_fa` = 'چت پشتیبانی', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'true', + `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'; +UPDATE `settings` SET + `title_fa` = 'صفحه صندوق', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'true', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'has_page_fund'; +UPDATE `settings` SET + `title_fa` = 'صفحه مجوزها', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'true', + `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_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'; +UPDATE `settings` SET + `title_fa` = 'کد معرف اجباری (قدیمی)', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'true', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'is_requaire_referral'; +UPDATE `settings` SET + `title_fa` = 'تأیید کارت بانکی با جیبیت', + `can_edit` = 1, + `type` = 'switch', + `description` = 'true/false — BankAccountController', + `value` = 'true', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'jibit_verification'; +UPDATE `settings` SET + `title_fa` = 'کلید داخلی اپ', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = 'abshodehrahimi', + `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'; +UPDATE `settings` SET + `title_fa` = 'قیمت از محصول (legacy)', + `can_edit` = 1, + `type` = 'switch', + `description` = 'از price_provider استفاده کنید', + `value` = 'true', + `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'; +UPDATE `settings` SET + `title_fa` = 'حداقل اولین خرید (ریال)', + `can_edit` = 1, + `type` = 'number', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'min_first_buy'; +UPDATE `settings` SET + `title_fa` = 'حداقل برداشت (ریال)', + `can_edit` = 1, + `type` = 'number', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'min_withdraw'; +UPDATE `settings` SET + `title_fa` = 'حداقل فروش', + `can_edit` = 1, + `type` = 'number', + `description` = NULL, + `value` = '', + `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'; +UPDATE `settings` SET + `title_fa` = 'بسته بودن همکار', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'false', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'montzar_closed'; +UPDATE `settings` SET + `title_fa` = 'اختلاف قیمت همکار', + `can_edit` = 0, + `type` = 'text', + `description` = 'سیستم پر می‌کند', + `value` = '334733.67434615', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'montzar_diff'; +UPDATE `settings` SET + `title_fa` = 'قیمت لحظه‌ای همکار', + `can_edit` = 0, + `type` = 'text', + `description` = NULL, + `value` = '183572564.02763', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'montzar_live_price'; +UPDATE `settings` SET + `title_fa` = 'مظنه همکار', + `can_edit` = 0, + `type` = 'text', + `description` = NULL, + `value` = '795200000', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'montzar_mazaneh'; +UPDATE `settings` SET + `title_fa` = 'موبایل API همکار', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '09133745569', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'montzar_mobile'; +UPDATE `settings` SET + `title_fa` = 'باز بودن خرید همکار', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'true', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'montzar_open_buy'; +UPDATE `settings` SET + `title_fa` = 'باز بودن فروش همکار', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'true', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'montzar_open_sell'; +UPDATE `settings` SET + `title_fa` = 'رمز API همکار', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '09133745569', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'montzar_password'; +UPDATE `settings` SET + `title_fa` = 'قیمت از همکار (montzar)', + `can_edit` = 1, + `type` = 'switch', + `description` = 'گلد علی: false — zaarbox فعال', + `value` = 'true', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'montzar_price'; +UPDATE `settings` SET + `title_fa` = 'کد محصول همکار', + `can_edit` = 1, + `type` = 'number', + `description` = NULL, + `value` = '1', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'montzar_product_id'; +UPDATE `settings` SET + `title_fa` = 'توکن همکار (خودکار)', + `can_edit` = 0, + `type` = 'text', + `description` = NULL, + `value` = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL2xpbWFuZ29sZC5pci9zZXJ2ZXIvYXV0aC9sb2dpbiIsImlhdCI6MTc3OTcxNTkxMywiZXhwIjoxNzgyMzA3OTEzLCJuYmYiOjE3Nzk3MTU5MTMsImp0aSI6ImZ4SDkwcWV4eHRiTmx5RUUiLCJzdWIiOiIzMzQ2IiwicHJ2IjoiMWQwYTAyMGFjZjVjNGI2YzQ5Nzk4OWRmMWFiZjBmYmQ0ZThjOGQ2MyJ9.M_Yff36nYQ94p8HnjB2wuHEQJaZTgW6Ppr-PRTXkyHE', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'montzar_token'; +UPDATE `settings` SET + `title_fa` = 'مظنه خرید همکار', + `can_edit` = 0, + `type` = 'text', + `description` = NULL, + `value` = '796650000', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'montzar_truly_buy_mazaneh'; +UPDATE `settings` SET + `title_fa` = 'مظنه فروش همکار', + `can_edit` = 0, + `type` = 'text', + `description` = NULL, + `value` = '793750000', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'montzar_truly_sell_mazaneh'; +UPDATE `settings` SET + `title_fa` = 'نام انگلیسی اپ', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = 'abshode_rahimi', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'name_en'; +UPDATE `settings` SET + `title_fa` = 'نام فارسی اپ', + `can_edit` = 1, + `type` = 'text', + `description` = 'پلتفرم خرید و فروش آنلاین طلای آبشده . اولین ایده پرداز قلک طلا در ایران', + `value` = 'آبشده رحیمی', + `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'; +UPDATE `settings` SET + `title_fa` = 'کلید امضای HMAC API خارجی', + `can_edit` = 1, + `type` = NULL, + `description` = 'مقدار قبلی .env: NODE_SHARED_SECRET', + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'node_shared_secret'; +UPDATE `settings` SET + `title_fa` = 'ثبت‌نام باز', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'true', + `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'; +UPDATE `settings` SET + `title_fa` = 'توکن fin', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'payping_fin_token'; +UPDATE `settings` SET + `title_fa` = 'URL fin', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'payping_fin_url'; +UPDATE `settings` SET + `title_fa` = 'item تکی (legacy)', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '', + `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'; +UPDATE `settings` SET + `title_fa` = 'نام gateway درگاه', + `can_edit` = 1, + `type` = 'select', + `description` = 'sepal,', + `value` = '', + `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'; +UPDATE `settings` SET + `title_fa` = 'آدرس شروع درگاه', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'payping_start_url'; +UPDATE `settings` SET + `title_fa` = 'اولویت تراکنش ناموفق', + `can_edit` = 0, + `type` = 'switch', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'payping_strict_failed_withdraw'; +UPDATE `settings` SET + `title_fa` = 'آدرس تأیید درگاه', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '', + `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'; +UPDATE `settings` SET + `title_fa` = 'باز/بسته خودکار محصول', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'true', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'product_auto_close_open_on_list'; +UPDATE `settings` SET + `title_fa` = 'بروز قیمت در لیست محصول', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'true', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'product_update_price_on_list'; +UPDATE `settings` SET + `title_fa` = 'API سود طلا', + `can_edit` = 0, + `type` = 'switch', + `description` = NULL, + `value` = '', + `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'; +UPDATE `settings` SET + `title_fa` = 'تعداد معرف برای هدیه', + `can_edit` = 1, + `type` = 'number', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'referral_count_for_gift'; +UPDATE `settings` SET + `title_fa` = 'الزام کد معرف', + `can_edit` = 0, + `type` = 'select', + `description` = 'required,', + `value` = 'required', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'referral_id'; +UPDATE `settings` SET + `title_fa` = 'محدودیت دعوت', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'referral_limit'; +UPDATE `settings` SET + `title_fa` = 'تأیید کدملی/موبایل در ثبت‌نام', + `can_edit` = 1, + `type` = 'switch', + `description` = 'AuthController', + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'register_jibit_verify'; +UPDATE `settings` SET + `title_fa` = 'پیام پاداش در SMS ثبت‌نام', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'register_referral_bonus_message'; +UPDATE `settings` SET + `title_fa` = 'SMS به معرف هنگام ثبت‌نام', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'register_referral_sms_to_referrer'; +UPDATE `settings` SET + `title_fa` = 'سود/اختلاف فروش (ریال)', + `can_edit` = 1, + `type` = 'number', + `description` = 'اگر خالی باشد از fee_single', + `value` = '0', + `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'; +UPDATE `settings` SET + `title_fa` = 'آدرس API سرور', + `can_edit` = 1, + `type` = 'text', + `description` = 'in server', + `value` = 'https://app.abshodehrahimi.ir/api', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'server_url'; +UPDATE `settings` SET + `title_fa` = 'نمایش آخرین قیمت DB اگر API قطع شد', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'false', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'show_last_price'; +UPDATE `settings` SET + `title_fa` = 'شروع بازه معامله', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '11:00', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'startDay'; +UPDATE `settings` SET + `title_fa` = 'قیمت تابان گوهر', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'false', + `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'; +UPDATE `settings` SET + `title_fa` = '', + `can_edit` = 1, + `type` = 'text', + `description` = 'تستی است', + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'test*'; +UPDATE `settings` SET + `title_fa` = 'متن درباره ما', + `can_edit` = 1, + `type` = 'longtext', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'text_about'; +UPDATE `settings` SET + `title_fa` = 'متن قوانین', + `can_edit` = 1, + `type` = 'longtext', + `description` = NULL, + `value` = '', + `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'; +UPDATE `settings` SET + `title_fa` = 'کد محصول زرباکس', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'zaarbox_price_key'; + +COMMIT; diff --git a/database/sql/abshode_rahimi_merge_goldali_const.sql b/database/sql/abshode_rahimi_merge_goldali_const.sql new file mode 100644 index 0000000..7b2ab1e --- /dev/null +++ b/database/sql/abshode_rahimi_merge_goldali_const.sql @@ -0,0 +1,117 @@ +-- ============================================================================= +-- آبشده رحیمی — ادغام const با کاتالوگ goldAliii +-- +-- منبع مقادیر: abshode_rahimi.json (const) +-- قالب: 10 کلید goldali +-- ============================================================================= + +START TRANSACTION; + +SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci; + +ALTER TABLE `const` + MODIFY COLUMN `title_fa` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL; + +-- 1) INSERT + +INSERT INTO `const` (`key`, `value`, `title_fa`) +SELECT 'limited_price', '', 'سقف قیمت محدود' +WHERE NOT EXISTS (SELECT 1 FROM `const` WHERE `key` = 'limited_price' LIMIT 1); +INSERT INTO `const` (`key`, `value`, `title_fa`) +SELECT 'is_gateway_open', '', 'باز بودن درگاه پرداخت' +WHERE NOT EXISTS (SELECT 1 FROM `const` WHERE `key` = 'is_gateway_open' LIMIT 1); +INSERT INTO `const` (`key`, `value`, `title_fa`) +SELECT 'liman', '', 'توکن لیمان' +WHERE NOT EXISTS (SELECT 1 FROM `const` WHERE `key` = 'liman' LIMIT 1); +INSERT INTO `const` (`key`, `value`, `title_fa`) +SELECT 'header_banner', '[{"icon":"https://garoosigholaktala.ir/server/storage/1404/12/03/748a08082c0e8ec016fc27ae22c62a56.jpg","show":false,"caption":null,"link":"تست","typeClick":null},{"icon":"https://garoosigholaktala.ir/server/storage/1404/12/03/cba70a6204dc579b86f3d96c314410da.jpg","show":false,"caption":null,"link":null,"typeClick":null,"modalText":"

تست

"},{"icon":"https://garoosigholaktala.ir/server/storage/1405/02/28/cfd03bf5f8b0ddd086ded30ec4a45c51.jpg","show":true,"caption":null,"link":null,"typeClick":null,"modalText":null},{"icon":"https://garoosigholaktala.ir/server/storage/1405/02/29/a12b0d4db1c1a040562f71725b39c42d.jpg","show":true,"caption":null,"link":null,"typeClick":null,"modalText":null},{"icon":"https://garoosigholaktala.ir/server/storage/1405/03/04/8816eb105fe2fe8c2bcb111214bd829f.jpg","show":true,"caption":null,"link":null,"typeClick":null,"modalText":null}]', 'بنر بالای صفحه' +WHERE NOT EXISTS (SELECT 1 FROM `const` WHERE `key` = 'header_banner' LIMIT 1); +INSERT INTO `const` (`key`, `value`, `title_fa`) +SELECT 'app_closed', 'false', 'بسته بودن اپ' +WHERE NOT EXISTS (SELECT 1 FROM `const` WHERE `key` = 'app_closed' LIMIT 1); +INSERT INTO `const` (`key`, `value`, `title_fa`) +SELECT 'main_product', '13', 'محصول آبشده پیش‌فرض' +WHERE NOT EXISTS (SELECT 1 FROM `const` WHERE `key` = 'main_product' LIMIT 1); +INSERT INTO `const` (`key`, `value`, `title_fa`) +SELECT 'gram', '', 'گرم ثبت‌نام' +WHERE NOT EXISTS (SELECT 1 FROM `const` WHERE `key` = 'gram' LIMIT 1); +INSERT INTO `const` (`key`, `value`, `title_fa`) +SELECT 'first_customer_wallet_value', '', 'حداقل اولین خرید' +WHERE NOT EXISTS (SELECT 1 FROM `const` WHERE `key` = 'first_customer_wallet_value' LIMIT 1); +INSERT INTO `const` (`key`, `value`, `title_fa`) +SELECT 'jibit_counter', '0', 'شمارنده جیبیت' +WHERE NOT EXISTS (SELECT 1 FROM `const` WHERE `key` = 'jibit_counter' LIMIT 1); +INSERT INTO `const` (`key`, `value`, `title_fa`) +SELECT 'price', '', 'لیست قیمت TGJU (JSON)' +WHERE NOT EXISTS (SELECT 1 FROM `const` WHERE `key` = 'price' LIMIT 1); + +-- 2) UPDATE + +UPDATE `const` SET + `title_fa` = 'سقف قیمت محدود', + `value` = '', + `updated_at` = NOW() +WHERE `key` = 'limited_price'; +UPDATE `const` SET + `title_fa` = 'باز بودن درگاه پرداخت', + `value` = '', + `updated_at` = NOW() +WHERE `key` = 'is_gateway_open'; +UPDATE `const` SET + `title_fa` = 'توکن لیمان', + `value` = '', + `updated_at` = NOW() +WHERE `key` = 'liman'; +UPDATE `const` SET + `title_fa` = 'بنر بالای صفحه', + `value` = '[{"icon":"https://garoosigholaktala.ir/server/storage/1404/12/03/748a08082c0e8ec016fc27ae22c62a56.jpg","show":false,"caption":null,"link":"تست","typeClick":null},{"icon":"https://garoosigholaktala.ir/server/storage/1404/12/03/cba70a6204dc579b86f3d96c314410da.jpg","show":false,"caption":null,"link":null,"typeClick":null,"modalText":"

تست

"},{"icon":"https://garoosigholaktala.ir/server/storage/1405/02/28/cfd03bf5f8b0ddd086ded30ec4a45c51.jpg","show":true,"caption":null,"link":null,"typeClick":null,"modalText":null},{"icon":"https://garoosigholaktala.ir/server/storage/1405/02/29/a12b0d4db1c1a040562f71725b39c42d.jpg","show":true,"caption":null,"link":null,"typeClick":null,"modalText":null},{"icon":"https://garoosigholaktala.ir/server/storage/1405/03/04/8816eb105fe2fe8c2bcb111214bd829f.jpg","show":true,"caption":null,"link":null,"typeClick":null,"modalText":null}]', + `updated_at` = NOW() +WHERE `key` = 'header_banner'; +UPDATE `const` SET + `title_fa` = 'بسته بودن اپ', + `value` = 'false', + `updated_at` = NOW() +WHERE `key` = 'app_closed'; +UPDATE `const` SET + `title_fa` = 'محصول آبشده پیش‌فرض', + `value` = '13', + `updated_at` = NOW() +WHERE `key` = 'main_product'; +UPDATE `const` SET + `title_fa` = 'گرم ثبت‌نام', + `value` = '', + `updated_at` = NOW() +WHERE `key` = 'gram'; +UPDATE `const` SET + `title_fa` = 'حداقل اولین خرید', + `value` = '', + `updated_at` = NOW() +WHERE `key` = 'first_customer_wallet_value'; +UPDATE `const` SET + `title_fa` = 'شمارنده جیبیت', + `value` = '0', + `updated_at` = NOW() +WHERE `key` = 'jibit_counter'; +UPDATE `const` SET + `title_fa` = 'لیست قیمت TGJU (JSON)', + `value` = '', + `updated_at` = NOW() +WHERE `key` = 'price'; + +-- 3) DELETE (14 کلید: goldir_*, log, ...) + +DELETE FROM `const` +WHERE `key` NOT IN ( + 'limited_price', + 'is_gateway_open', + 'liman', + 'header_banner', + 'app_closed', + 'main_product', + 'gram', + 'first_customer_wallet_value', + 'jibit_counter', + 'price' +); + +COMMIT; diff --git a/database/sql/bourcecu_merge_goldali_catalog.sql b/database/sql/bourcecu_merge_goldali_catalog.sql new file mode 100644 index 0000000..236cf8d --- /dev/null +++ b/database/sql/bourcecu_merge_goldali_catalog.sql @@ -0,0 +1,1395 @@ +-- ============================================================================= +-- بورس مس — ادغام settings با کاتالوگ goldAliii +-- +-- منبع مقادیر: bourcecu.json (دیتابیس فعلی) +-- قالب کلیدها: goldali.json (کاتالوگ کامل) +-- +-- قوانین: +-- • کاتالوگ = goldali.json (102 کلید) — فقط همین کلیدها باقی می‌مانند +-- • کلید مشترک + مقدار در بورس مس → value از بورس مس، is_active=1 +-- • کلید کاتالوگ بدون مقدار در بورس مس → value=''، is_active=0 +-- • title_fa / type / can_edit / description از کاتالوگ goldAliii +-- • کلیدهای اضافی بورس مس (خارج از کاتالوگ) → DELETE +-- +-- قبل از اجرا: USE دیتابیس بورس مس + بکاپ +-- ============================================================================= + +START TRANSACTION; + +-- ============================================================================= +-- charset — ستون description روی بعضی سرورها latin1 است +-- ============================================================================= +SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci; + +ALTER TABLE `settings` + MODIFY COLUMN `description` TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL, + MODIFY COLUMN `title_fa` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL, + MODIFY COLUMN `type` VARCHAR(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL; + + +-- ============================================================================= +-- 1) INSERT کلیدهای کاتالوگ که هنوز در DB نیستند +-- ============================================================================= + + +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'name_fa', 'بورس مس', 'نام فارسی اپ', 1, 1, 'پلتفرم خرید و فروش آنلاین طلای آبشده . اولین ایده پرداز قلک طلا در ایران', 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'name_fa' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'name_en', 'demo_gold', 'نام انگلیسی اپ', 1, 1, NULL, 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'name_en' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'app_url', 'https://kh.montzar.ir', 'آدرس اپ (کاربر)', 1, 1, '0inserver', 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'app_url' LIMIT 1); +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 'logo_login', 'logo_login', '', 1, 1, 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', 'logo_register', 'لوگوی صفحه ورود', 1, 1, 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 'admin_url', 'https://kh.montzar.ir/admin/', 'آدرس پنل ادمین', 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 '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 'title_fav', '', 'عنوان favicon', 1, 0, NULL, 'text' +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 'text_rule', '', 'متن قوانین', 1, 0, NULL, 'longtext' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'text_rule' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'text_about', '', 'متن درباره ما', 1, 0, NULL, 'longtext' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'text_about' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'is_requaire_referral', 'false', 'کد معرف اجباری (قدیمی)', 1, 1, NULL, 'switch' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'is_requaire_referral' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'has_page_earn_money', 'true', 'صفحه کسب درآمد', 1, 1, 'in server', 'switch' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'has_page_earn_money' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'has_page_fund', 'true', 'صفحه صندوق', 1, 1, NULL, 'switch' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'has_page_fund' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'has_page_permission', 'true', 'صفحه مجوزها', 1, 1, NULL, 'switch' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'has_page_permission' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'has_page_price_trigger', 'true', 'صفحه هشدار قیمت', 1, 1, NULL, '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_physical_gold', 'true', 'صفحه طلای فیزیکی', 1, 1, NULL, 'switch' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'has_page_physical_gold' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'color_primary', '#0A1B37', 'رنگ اصلی', 1, 1, NULL, 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'color_primary' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'color_secondary', '#0A1B37', 'رنگ ثانویه', 1, 1, NULL, 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'color_secondary' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'has_chat', 'true', 'چت پشتیبانی', 1, 1, NULL, 'switch' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'has_chat' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'server_url', 'https://kh.montzar.ir/server', 'آدرس API سرور', 1, 1, 'in server', 'text' +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); +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); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'minimum_sell', '', 'حداقل فروش', 1, 0, NULL, 'number' +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_count_for_gift', '', 'تعداد معرف برای هدیه', 1, 0, NULL, 'number' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'referral_count_for_gift' 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); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'min_withdraw', '', 'حداقل برداشت (ریال)', 1, 0, NULL, 'number' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'min_withdraw' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'min_first_buy', '', 'حداقل اولین خرید (ریال)', 1, 0, NULL, 'number' +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); +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); +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); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'fee_single', '500000', 'اختلاف قیمت پایه (ریال)', 1, 1, 'پیش‌فرض Laravel fee.single', 'number' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'fee_single' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'buy_fee', '', 'سود/اختلاف خرید (ریال)', 1, 0, 'اگر خالی باشد از fee_single', 'number' +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); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'fee_service_charge_percentage', '0.005', 'درصد کارمزد سفارش', 1, 1, 'goldAliii: 7%', 'number' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'fee_service_charge_percentage' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'fee_cash', '500000', 'اختلاف ریالی هر گرم (سفارش)', 1, 1, 'goldAliii: 0', 'number' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'fee_cash' 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_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 '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_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); +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); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'main_product', '', 'قیمت صفحه اصلی', 1, 0, NULL, 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'main_product' 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); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'zaarbox_price_key', '', 'کد محصول زرباکس', 1, 0, NULL, 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'zaarbox_price_key' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'chart_id', '8c19e06a-446e-3d56-9cc0-750f7c6cd767', 'UUID نمودار Zaarbox', 1, 1, 'خالی = ca3800a0-1f57-3528-b963-178f9168e04f', 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'chart_id' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'etehadie_api_url', '', 'آدرس API اتحادیه (پشتیبان)', 1, 0, NULL, 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'etehadie_api_url' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'show_last_price', '', 'نمایش آخرین قیمت DB اگر API قطع شد', 1, 0, NULL, 'switch' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'show_last_price' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'main_product_price', 'true', 'قیمت از محصول (legacy)', 1, 1, 'از price_provider استفاده کنید', 'switch' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'main_product_price' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'tabanGohar_price', 'false', 'قیمت تابان گوهر', 1, 1, NULL, 'switch' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'tabanGohar_price' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'montzar_price', '', 'قیمت از همکار (montzar)', 1, 0, 'گلد علی: false — zaarbox فعال', 'switch' +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_mobile', '', 'موبایل API همکار', 1, 0, NULL, 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_mobile' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'montzar_password', '', 'رمز API همکار', 1, 0, NULL, 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'montzar_password' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'montzar_product_id', '', 'کد محصول همکار', 1, 0, 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_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); +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); +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 'jibit_verification', 'true', 'تأیید کارت بانکی با جیبیت', 1, 1, 'true/false — BankAccountController', 'switch' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'jibit_verification' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'register_jibit_verify', '', 'تأیید کدملی/موبایل در ثبت‌نام', 1, 0, 'AuthController', 'switch' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'register_jibit_verify' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'close_price', '', 'بستن قیمت در بازه زمانی', 1, 0, NULL, 'switch' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'close_price' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'startDay', '', 'شروع بازه معامله', 1, 0, NULL, 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'startDay' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'endDay', '', 'پایان بازه معامله', 1, 0, NULL, 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'endDay' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'auto_active_customer', 'false', 'فعال‌سازی خودکار کاربر', 1, 1, NULL, 'switch' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'auto_active_customer' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'fee_free', '2', 'تعداد سفارش اول بدون کارمزد', 1, 1, NULL, 'switch' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'fee_free' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'charge_notif', 'false', 'پیامک شارژ ادمین', 1, 1, NULL, 'switch' +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 'gift_for_referrer', '0.005', 'پاداش معرف', 1, 1, NULL, 'number' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'gift_for_referrer' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'gift_for_referral', '', 'پاداش معرف‌شونده', 1, 0, NULL, 'number' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'gift_for_referral' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'register_referral_sms_to_referrer', '', 'SMS به معرف هنگام ثبت‌نام', 1, 0, NULL, 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'register_referral_sms_to_referrer' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'register_referral_bonus_message', '', 'پیام پاداش در SMS ثبت‌نام', 1, 0, NULL, 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'register_referral_bonus_message' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'referral_limit', '', 'محدودیت دعوت', 1, 0, NULL, 'text' +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', 'پیامک گروهی', 1, 1, NULL, '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 '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 'tahesab_db', 'TahesabDB5', 'دیتابیس ته‌حساب', 1, 1, NULL, 'text' +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); +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', 1, 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); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'payping_fin_url', '', 'URL fin', 1, 0, NULL, 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_fin_url' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'payping_fin_token', '', 'توکن fin', 1, 0, NULL, 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_fin_token' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'payping_fin_customer_id', '', 'customer_id fin', 1, 0, NULL, 'number' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_fin_customer_id' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'payping_gateway_item', '', 'item تکی (legacy)', 1, 0, NULL, 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'payping_gateway_item' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'node_client_id', '', 'شناسه کلاینت API خارجی (X-Client-Id)', 1, 0, 'مقدار قبلی .env: NODE_CLIENT_ID', 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'node_client_id' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'node_shared_secret', '', 'کلید امضای HMAC API خارجی', 1, 0, 'مقدار قبلی .env: NODE_SHARED_SECRET', 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'node_shared_secret' LIMIT 1); +INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`) +SELECT 'external_order_api_enabled', '', 'فعال‌سازی API سفارش خارجی (get_wallet / order)', 1, 0, 'true + node_client_id + node_shared_secret', 'text' +WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'external_order_api_enabled' LIMIT 1); + +-- ============================================================================= +-- 2) UPDATE همه کلیدهای کاتالوگ (مقدار + متادیتا) +-- ============================================================================= + + +UPDATE `settings` SET + `title_fa` = 'نام فارسی اپ', + `can_edit` = 1, + `type` = 'text', + `description` = 'پلتفرم خرید و فروش آنلاین طلای آبشده . اولین ایده پرداز قلک طلا در ایران', + `value` = 'بورس مس', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'name_fa'; +UPDATE `settings` SET + `title_fa` = 'نام انگلیسی اپ', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = 'demo_gold', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'name_en'; +UPDATE `settings` SET + `title_fa` = 'آدرس اپ (کاربر)', + `can_edit` = 1, + `type` = 'text', + `description` = '0inserver', + `value` = 'https://kh.montzar.ir', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'app_url'; +UPDATE `settings` SET + `title_fa` = 'آدرس پایه', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '91.212.174.137', + `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'; +UPDATE `settings` SET + `title_fa` = 'متن قوانین', + `can_edit` = 1, + `type` = 'longtext', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'text_rule'; +UPDATE `settings` SET + `title_fa` = 'متن درباره ما', + `can_edit` = 1, + `type` = 'longtext', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'text_about'; +UPDATE `settings` SET + `title_fa` = 'کد معرف اجباری (قدیمی)', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'false', + `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'; +UPDATE `settings` SET + `title_fa` = 'صفحه صندوق', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'true', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'has_page_fund'; +UPDATE `settings` SET + `title_fa` = 'صفحه مجوزها', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'true', + `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'; +UPDATE `settings` SET + `title_fa` = 'صفحه طلای فیزیکی', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'true', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'has_page_physical_gold'; +UPDATE `settings` SET + `title_fa` = 'رنگ اصلی', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '#0A1B37', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'color_primary'; +UPDATE `settings` SET + `title_fa` = 'رنگ ثانویه', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '#0A1B37', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'color_secondary'; +UPDATE `settings` SET + `title_fa` = 'چت پشتیبانی', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'true', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'has_chat'; +UPDATE `settings` SET + `title_fa` = 'آدرس API سرور', + `can_edit` = 1, + `type` = 'text', + `description` = 'in server', + `value` = 'https://kh.montzar.ir/server', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'server_url'; +UPDATE `settings` SET + `title_fa` = 'کلید داخلی اپ', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = 'demogold', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'key'; +UPDATE `settings` SET + `title_fa` = 'حذف مشتری از تراز ادمین', + `can_edit` = 0, + `type` = 'number', + `description` = NULL, + `value` = '', + `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'; +UPDATE `settings` SET + `title_fa` = '', + `can_edit` = 1, + `type` = 'text', + `description` = 'تستی است', + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'test*'; +UPDATE `settings` SET + `title_fa` = 'حداقل فروش', + `can_edit` = 1, + `type` = 'number', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'minimum_sell'; +UPDATE `settings` SET + `title_fa` = 'تعداد معرف برای هدیه', + `can_edit` = 1, + `type` = 'number', + `description` = NULL, + `value` = '', + `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'; +UPDATE `settings` SET + `title_fa` = 'حداقل برداشت (ریال)', + `can_edit` = 1, + `type` = 'number', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'min_withdraw'; +UPDATE `settings` SET + `title_fa` = 'حداقل اولین خرید (ریال)', + `can_edit` = 1, + `type` = 'number', + `description` = NULL, + `value` = '', + `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'; +UPDATE `settings` SET + `title_fa` = 'API سود طلا', + `can_edit` = 0, + `type` = 'switch', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'profit_gold_api_enabled'; +UPDATE `settings` SET + `title_fa` = 'ثبت‌نام باز', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'true', + `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'; +UPDATE `settings` SET + `title_fa` = 'اختلاف قیمت پایه (ریال)', + `can_edit` = 1, + `type` = 'number', + `description` = 'پیش‌فرض Laravel fee.single', + `value` = '500000', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'fee_single'; +UPDATE `settings` SET + `title_fa` = 'سود/اختلاف خرید (ریال)', + `can_edit` = 1, + `type` = 'number', + `description` = 'اگر خالی باشد از fee_single', + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'buy_fee'; +UPDATE `settings` SET + `title_fa` = 'سود/اختلاف فروش (ریال)', + `can_edit` = 1, + `type` = 'number', + `description` = 'اگر خالی باشد از fee_single', + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'sell_fee'; +UPDATE `settings` SET + `title_fa` = 'الزام کد معرف', + `can_edit` = 0, + `type` = 'select', + `description` = 'required,', + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'referral_id'; +UPDATE `settings` SET + `title_fa` = 'درصد کارمزد سفارش', + `can_edit` = 1, + `type` = 'number', + `description` = 'goldAliii: 7%', + `value` = '0.005', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'fee_service_charge_percentage'; +UPDATE `settings` SET + `title_fa` = 'اختلاف ریالی هر گرم (سفارش)', + `can_edit` = 1, + `type` = 'number', + `description` = 'goldAliii: 0', + `value` = '500000', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'fee_cash'; +UPDATE `settings` SET + `title_fa` = 'آدرس شروع درگاه', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'payping_start_url'; +UPDATE `settings` SET + `title_fa` = 'آدرس تأیید درگاه', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'payping_verify_url'; +UPDATE `settings` SET + `title_fa` = 'نام gateway درگاه', + `can_edit` = 1, + `type` = 'select', + `description` = 'sepal,', + `value` = '', + `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'; +UPDATE `settings` SET + `title_fa` = 'اولویت تراکنش ناموفق', + `can_edit` = 0, + `type` = 'switch', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'payping_strict_failed_withdraw'; +UPDATE `settings` SET + `title_fa` = 'بسته بودن همکار', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = '', + `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'; +UPDATE `settings` SET + `title_fa` = 'کد محصول زرباکس', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '', + `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'; +UPDATE `settings` SET + `title_fa` = 'آدرس API اتحادیه (پشتیبان)', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'etehadie_api_url'; +UPDATE `settings` SET + `title_fa` = 'نمایش آخرین قیمت DB اگر API قطع شد', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'show_last_price'; +UPDATE `settings` SET + `title_fa` = 'قیمت از محصول (legacy)', + `can_edit` = 1, + `type` = 'switch', + `description` = 'از price_provider استفاده کنید', + `value` = 'true', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'main_product_price'; +UPDATE `settings` SET + `title_fa` = 'قیمت تابان گوهر', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'false', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'tabanGohar_price'; +UPDATE `settings` SET + `title_fa` = 'قیمت از همکار (montzar)', + `can_edit` = 1, + `type` = 'switch', + `description` = 'گلد علی: false — zaarbox فعال', + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'montzar_price'; +UPDATE `settings` SET + `title_fa` = 'موبایل API همکار', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'montzar_mobile'; +UPDATE `settings` SET + `title_fa` = 'رمز API همکار', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'montzar_password'; +UPDATE `settings` SET + `title_fa` = 'کد محصول همکار', + `can_edit` = 1, + `type` = 'number', + `description` = NULL, + `value` = '', + `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'; +UPDATE `settings` SET + `title_fa` = 'توکن همکار (خودکار)', + `can_edit` = 0, + `type` = 'text', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'montzar_token'; +UPDATE `settings` SET + `title_fa` = 'باز بودن خرید همکار', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'montzar_open_buy'; +UPDATE `settings` SET + `title_fa` = 'باز بودن فروش همکار', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'montzar_open_sell'; +UPDATE `settings` SET + `title_fa` = 'اختلاف قیمت همکار', + `can_edit` = 0, + `type` = 'text', + `description` = 'سیستم پر می‌کند', + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'montzar_diff'; +UPDATE `settings` SET + `title_fa` = 'قیمت لحظه‌ای همکار', + `can_edit` = 0, + `type` = 'text', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'montzar_live_price'; +UPDATE `settings` SET + `title_fa` = 'مظنه همکار', + `can_edit` = 0, + `type` = 'text', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'montzar_mazaneh'; +UPDATE `settings` SET + `title_fa` = 'مظنه خرید همکار', + `can_edit` = 0, + `type` = 'text', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'montzar_truly_buy_mazaneh'; +UPDATE `settings` SET + `title_fa` = 'مظنه فروش همکار', + `can_edit` = 0, + `type` = 'text', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'montzar_truly_sell_mazaneh'; +UPDATE `settings` SET + `title_fa` = 'نمایش بلوک همکار در UI', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'true', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'display_montzar'; +UPDATE `settings` SET + `title_fa` = 'تأیید کارت بانکی با جیبیت', + `can_edit` = 1, + `type` = 'switch', + `description` = 'true/false — BankAccountController', + `value` = 'true', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'jibit_verification'; +UPDATE `settings` SET + `title_fa` = 'تأیید کدملی/موبایل در ثبت‌نام', + `can_edit` = 1, + `type` = 'switch', + `description` = 'AuthController', + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'register_jibit_verify'; +UPDATE `settings` SET + `title_fa` = 'بستن قیمت در بازه زمانی', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'close_price'; +UPDATE `settings` SET + `title_fa` = 'شروع بازه معامله', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'startDay'; +UPDATE `settings` SET + `title_fa` = 'پایان بازه معامله', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'endDay'; +UPDATE `settings` SET + `title_fa` = 'فعال‌سازی خودکار کاربر', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'false', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'auto_active_customer'; +UPDATE `settings` SET + `title_fa` = 'تعداد سفارش اول بدون کارمزد', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = '2', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'fee_free'; +UPDATE `settings` SET + `title_fa` = 'پیامک شارژ ادمین', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = 'false', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'charge_notif'; +UPDATE `settings` SET + `title_fa` = 'پاداش معرف', + `can_edit` = 1, + `type` = 'number', + `description` = NULL, + `value` = '0.005', + `is_active` = 1, + `updated_at` = NOW() +WHERE `key` = 'gift_for_referrer'; +UPDATE `settings` SET + `title_fa` = 'پاداش معرف‌شونده', + `can_edit` = 1, + `type` = 'number', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'gift_for_referral'; +UPDATE `settings` SET + `title_fa` = 'SMS به معرف هنگام ثبت‌نام', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'register_referral_sms_to_referrer'; +UPDATE `settings` SET + `title_fa` = 'پیام پاداش در SMS ثبت‌نام', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'register_referral_bonus_message'; +UPDATE `settings` SET + `title_fa` = 'محدودیت دعوت', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '', + `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'; +UPDATE `settings` SET + `title_fa` = 'بروز قیمت در لیست محصول', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'product_update_price_on_list'; +UPDATE `settings` SET + `title_fa` = 'باز/بسته خودکار محصول', + `can_edit` = 1, + `type` = 'switch', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'product_auto_close_open_on_list'; +UPDATE `settings` SET + `title_fa` = 'عنوان فلز در UI', + `can_edit` = 1, + `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'; +UPDATE `settings` SET + `title_fa` = 'URL fin', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '', + `is_active` = 0, + `updated_at` = NOW() +WHERE `key` = 'payping_fin_url'; +UPDATE `settings` SET + `title_fa` = 'توکن fin', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '', + `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'; +UPDATE `settings` SET + `title_fa` = 'item تکی (legacy)', + `can_edit` = 1, + `type` = 'text', + `description` = NULL, + `value` = '', + `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'; +UPDATE `settings` SET + `title_fa` = 'کلید امضای HMAC API خارجی', + `can_edit` = 1, + `type` = 'text', + `description` = 'مقدار قبلی .env: NODE_SHARED_SECRET', + `value` = '', + `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'; + +-- ============================================================================= +-- 3) اصلاح کلید خراب logo_login (در صورت وجود) +-- ============================================================================= + +DELETE FROM `settings` +WHERE `key` LIKE 'logo_login%' AND `key` <> 'logo_login' + AND EXISTS (SELECT 1 FROM (SELECT `id`, `key` FROM `settings`) AS `s` WHERE `s`.`key` = 'logo_login'); + +UPDATE `settings` SET + `key` = 'logo_login', + `value` = TRIM(REPLACE(REPLACE(`value`, CHAR(13), ''), CHAR(10), '')), + `updated_at` = NOW() +WHERE `key` LIKE 'logo_login%' AND `key` <> 'logo_login'; + + +-- ============================================================================= +-- 4) حذف کلیدهای اضافی بورس مس (خارج از کاتالوگ goldAliii) +-- مثال: liman_token, send_to_goldir, goldir_price, test, test2, ... +-- ============================================================================= + +DELETE FROM `settings` +WHERE `key` NOT IN ( + 'admin_url', + 'app_url', + 'auto_active_customer', + 'bace_url', + 'balance_report_exclude_customer_id', + 'bale_bot_token', + 'buy_fee', + 'charge_notif', + 'chart_id', + 'close_price', + 'color_primary', + 'color_secondary', + 'display_montzar', + 'down_price', + 'endDay', + 'etehadie_api_url', + 'external_order_api_enabled', + 'fee_cash', + 'fee_free', + 'fee_service_charge_percentage', + 'fee_single', + 'gift_for_referral', + 'gift_for_referrer', + 'group_sms', + 'has_chat', + 'has_page_earn_money', + 'has_page_fund', + 'has_page_permission', + 'has_page_physical_gold', + 'has_page_price_trigger', + 'is_requaire_referral', + 'jibit_verification', + 'key', + 'logo_login', + 'logo_register', + 'main_product', + 'main_product_price', + 'metal_type', + 'min_first_buy', + 'min_withdraw', + 'minimum_sell', + 'montify_name', + 'montzar_base_url', + 'montzar_closed', + 'montzar_diff', + 'montzar_live_price', + 'montzar_mazaneh', + 'montzar_mobile', + 'montzar_open_buy', + 'montzar_open_sell', + 'montzar_password', + 'montzar_price', + 'montzar_product_id', + 'montzar_token', + 'montzar_truly_buy_mazaneh', + 'montzar_truly_sell_mazaneh', + 'name_en', + 'name_fa', + 'node_client_id', + 'node_shared_secret', + 'open_register', + 'payping_fin_customer_id', + 'payping_fin_sync_enabled', + 'payping_fin_token', + 'payping_fin_url', + 'payping_gateway_item', + 'payping_gateway_items', + 'payping_gateway_name', + 'payping_round_toman', + 'payping_start_url', + 'payping_strict_failed_withdraw', + 'payping_verify_url', + 'price_extreme_date', + 'price_provider', + 'product_auto_close_open_on_list', + 'product_update_price_on_list', + 'profit_gold_api_enabled', + 'referral_bonus_amount', + 'referral_count_for_gift', + 'referral_id', + 'referral_limit', + 'register_jibit_verify', + 'register_referral_bonus_message', + 'register_referral_sms_to_referrer', + 'sell_fee', + 'send_to_tahesab', + 'server_url', + 'show_last_price', + 'startDay', + 'tabanGohar_price', + 'tahesab_bank_account', + 'tahesab_db', + 'tahesab_token', + 'telegram_bot_token', + 'test*', + 'text_about', + 'text_rule', + 'title_fav', + 'title_pwa', + 'up_price', + 'zaarbox_api_url', + 'zaarbox_price_key' +); + +-- legacy — در کد استفاده نمی‌شود +DELETE FROM `settings` WHERE `key` = 'price_method'; + +COMMIT; diff --git a/database/sql/bourcecu_merge_goldali_const.sql b/database/sql/bourcecu_merge_goldali_const.sql new file mode 100644 index 0000000..b12b2ee --- /dev/null +++ b/database/sql/bourcecu_merge_goldali_const.sql @@ -0,0 +1,132 @@ +-- ============================================================================= +-- بورس مس — ادغام const با کاتالوگ goldAliii +-- +-- منبع مقادیر: bourcecu.json +-- قالب کلیدها: goldali.json (10 کلید) +-- +-- قوانین: +-- • کلید مشترک + مقدار در بورس مس → value از بورس مس +-- • کلید کاتالوگ بدون مقدار در بورس مس → value='' +-- • title_fa از کاتالوگ goldAliii +-- • کلیدهای اضافی بورس مس (goldir_*, log, ...) → DELETE +-- +-- قبل از اجرا: USE دیتابیس بورس مس + بکاپ +-- ============================================================================= + +START TRANSACTION; + +SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci; + +ALTER TABLE `const` + MODIFY COLUMN `title_fa` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL; + +-- ============================================================================= +-- 1) INSERT کلیدهای کاتالوگ که هنوز در DB نیستند +-- ============================================================================= + +INSERT INTO `const` (`key`, `value`, `title_fa`) +SELECT 'limited_price', '', 'سقف قیمت محدود' +WHERE NOT EXISTS (SELECT 1 FROM `const` WHERE `key` = 'limited_price' LIMIT 1); +INSERT INTO `const` (`key`, `value`, `title_fa`) +SELECT 'is_gateway_open', '', 'باز بودن درگاه پرداخت' +WHERE NOT EXISTS (SELECT 1 FROM `const` WHERE `key` = 'is_gateway_open' LIMIT 1); +INSERT INTO `const` (`key`, `value`, `title_fa`) +SELECT 'liman', '', 'توکن لیمان' +WHERE NOT EXISTS (SELECT 1 FROM `const` WHERE `key` = 'liman' LIMIT 1); +INSERT INTO `const` (`key`, `value`, `title_fa`) +SELECT 'header_banner', '[{"icon":"https://garoosigholaktala.ir/server/storage/1404/12/03/b99fc0b5d1cd0dc343338b1f73dd3cab.jpg","show":true,"caption":null,"link":null},{"icon":"https://garoosigholaktala.ir/server/storage/1404/12/03/748a08082c0e8ec016fc27ae22c62a56.jpg","show":true,"caption":null,"link":null},{"icon":"https://garoosigholaktala.ir/server/storage/1404/12/03/cba70a6204dc579b86f3d96c314410da.jpg","show":true,"caption":null,"link":null}]', 'بنر بالای صفحه' +WHERE NOT EXISTS (SELECT 1 FROM `const` WHERE `key` = 'header_banner' LIMIT 1); +INSERT INTO `const` (`key`, `value`, `title_fa`) +SELECT 'app_closed', '', 'بسته بودن اپ' +WHERE NOT EXISTS (SELECT 1 FROM `const` WHERE `key` = 'app_closed' LIMIT 1); +INSERT INTO `const` (`key`, `value`, `title_fa`) +SELECT 'main_product', '1', 'محصول آبشده پیش‌فرض' +WHERE NOT EXISTS (SELECT 1 FROM `const` WHERE `key` = 'main_product' LIMIT 1); +INSERT INTO `const` (`key`, `value`, `title_fa`) +SELECT 'gram', '', 'گرم ثبت‌نام' +WHERE NOT EXISTS (SELECT 1 FROM `const` WHERE `key` = 'gram' LIMIT 1); +INSERT INTO `const` (`key`, `value`, `title_fa`) +SELECT 'first_customer_wallet_value', '', 'حداقل اولین خرید' +WHERE NOT EXISTS (SELECT 1 FROM `const` WHERE `key` = 'first_customer_wallet_value' LIMIT 1); +INSERT INTO `const` (`key`, `value`, `title_fa`) +SELECT 'jibit_counter', '1', 'شمارنده جیبیت' +WHERE NOT EXISTS (SELECT 1 FROM `const` WHERE `key` = 'jibit_counter' LIMIT 1); +INSERT INTO `const` (`key`, `value`, `title_fa`) +SELECT 'price', '', 'لیست قیمت TGJU (JSON)' +WHERE NOT EXISTS (SELECT 1 FROM `const` WHERE `key` = 'price' LIMIT 1); + +-- ============================================================================= +-- 2) UPDATE همه کلیدهای کاتالوگ +-- ============================================================================= + +UPDATE `const` SET + `title_fa` = 'سقف قیمت محدود', + `value` = '', + `updated_at` = NOW() +WHERE `key` = 'limited_price'; +UPDATE `const` SET + `title_fa` = 'باز بودن درگاه پرداخت', + `value` = '', + `updated_at` = NOW() +WHERE `key` = 'is_gateway_open'; +UPDATE `const` SET + `title_fa` = 'توکن لیمان', + `value` = '', + `updated_at` = NOW() +WHERE `key` = 'liman'; +UPDATE `const` SET + `title_fa` = 'بنر بالای صفحه', + `value` = '[{"icon":"https://garoosigholaktala.ir/server/storage/1404/12/03/b99fc0b5d1cd0dc343338b1f73dd3cab.jpg","show":true,"caption":null,"link":null},{"icon":"https://garoosigholaktala.ir/server/storage/1404/12/03/748a08082c0e8ec016fc27ae22c62a56.jpg","show":true,"caption":null,"link":null},{"icon":"https://garoosigholaktala.ir/server/storage/1404/12/03/cba70a6204dc579b86f3d96c314410da.jpg","show":true,"caption":null,"link":null}]', + `updated_at` = NOW() +WHERE `key` = 'header_banner'; +UPDATE `const` SET + `title_fa` = 'بسته بودن اپ', + `value` = '', + `updated_at` = NOW() +WHERE `key` = 'app_closed'; +UPDATE `const` SET + `title_fa` = 'محصول آبشده پیش‌فرض', + `value` = '1', + `updated_at` = NOW() +WHERE `key` = 'main_product'; +UPDATE `const` SET + `title_fa` = 'گرم ثبت‌نام', + `value` = '', + `updated_at` = NOW() +WHERE `key` = 'gram'; +UPDATE `const` SET + `title_fa` = 'حداقل اولین خرید', + `value` = '', + `updated_at` = NOW() +WHERE `key` = 'first_customer_wallet_value'; +UPDATE `const` SET + `title_fa` = 'شمارنده جیبیت', + `value` = '1', + `updated_at` = NOW() +WHERE `key` = 'jibit_counter'; +UPDATE `const` SET + `title_fa` = 'لیست قیمت TGJU (JSON)', + `value` = '', + `updated_at` = NOW() +WHERE `key` = 'price'; + +-- ============================================================================= +-- 3) حذف کلیدهای اضافی بورس مس (خارج از کاتالوگ) +-- 14 کلید: goldir_*, log, last_order_log, ... +-- ============================================================================= + +DELETE FROM `const` +WHERE `key` NOT IN ( + 'limited_price', + 'is_gateway_open', + 'liman', + 'header_banner', + 'app_closed', + 'main_product', + 'gram', + 'first_customer_wallet_value', + 'jibit_counter', + 'price' +); + +COMMIT; diff --git a/database/sql/drop_price_method_setting.sql b/database/sql/drop_price_method_setting.sql new file mode 100644 index 0000000..6961b1e --- /dev/null +++ b/database/sql/drop_price_method_setting.sql @@ -0,0 +1,2 @@ +-- حذف setting legacy: price_method (در کد استفاده نمی‌شود؛ جایگزین: price_provider + zaarbox_price_key) +DELETE FROM `settings` WHERE `key` = 'price_method'; diff --git a/database/sql/goldali_post_merge_settings.sql b/database/sql/goldali_post_merge_settings.sql index 73ea25e..d1ac89c 100644 --- a/database/sql/goldali_post_merge_settings.sql +++ b/database/sql/goldali_post_merge_settings.sql @@ -44,7 +44,6 @@ UPDATE `settings` SET `title_fa` = 'تعداد معرف برای هدیه' WHERE 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`) = ''); -UPDATE `settings` SET `title_fa` = 'کلید محصول در API اتحادیه' WHERE `key` = 'price_method' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `const` SET `title_fa` = 'سقف قیمت محدود' WHERE `key` = 'limited_price' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); UPDATE `const` SET `title_fa` = 'باز بودن درگاه پرداخت' WHERE `key` = 'is_gateway_open' AND (`title_fa` IS NULL OR TRIM(`title_fa`) = ''); @@ -117,8 +116,7 @@ INSERT INTO `const` (`key`, `value`, `title_fa`) SELECT 'first_customer_wallet_value', '0', 'حداقل موجودی اول خرید' WHERE NOT EXISTS (SELECT 1 FROM `const` WHERE `key` = 'first_customer_wallet_value' LIMIT 1); --- price_method را دست نمی‌زنیم — روی گلد علی همین است: --- estjt_41670cdf0270a874b68a0a95a235f9a1 +-- legacy price_method حذف شد — از price_provider + zaarbox_price_key استفاده کنید. -- ============================================================================= -- بخش ۳ب — درگاه پرداخت گلد علی (payment.goldaliii.com) @@ -169,7 +167,7 @@ WHERE NOT EXISTS (SELECT 1 FROM `const` WHERE `key` = 'app_closed' LIMIT 1); -- ============================================================================= -- SELECT `key`, `title_fa`, `value` FROM `settings` -- WHERE `key` IN ( --- 'price_provider', 'price_method', 'profit_gold_api_enabled', +-- 'price_provider', 'profit_gold_api_enabled', -- 'fee_single', 'buy_fee', 'sell_fee', -- 'referral_id', 'is_requaire_referral', -- 'payping_start_url', 'payping_verify_url', 'payping_gateway_name' diff --git a/database/sql/goldali_settings_full_catalog.sql b/database/sql/goldali_settings_full_catalog.sql index a8c398e..c2c92ca 100644 --- a/database/sql/goldali_settings_full_catalog.sql +++ b/database/sql/goldali_settings_full_catalog.sql @@ -256,9 +256,6 @@ UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'شن `value` = TRIM(REPLACE(REPLACE(`value`, CHAR(10), ''), CHAR(13), '')) WHERE `key` = 'zaarbox_price_key'; -UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'کلید API اتحادیه'), `can_edit` = 1 -WHERE `key` = 'price_method'; - UPDATE `settings` SET `title_fa` = COALESCE(NULLIF(TRIM(`title_fa`), ''), 'اختلاف پایه نمایش'), `can_edit` = 1 WHERE `key` = 'fee_single'; @@ -368,7 +365,7 @@ UPDATE `settings` SET `type` = 'number' WHERE `key` IN ( UPDATE `settings` SET `type` = 'text' WHERE `key` IN ( 'name_fa', 'name_en', 'app_url', 'bace_url', 'logo_register', 'admin_url', 'title_pwa', 'title_fav', 'server_url', 'key', 'main_product', 'zaarbox_api_url', 'zaarbox_price_key', 'chart_id', - 'price_method', 'etehadie_api_url', 'montzar_mobile', 'montzar_password', 'montzar_base_url', + 'etehadie_api_url', 'montzar_mobile', 'montzar_password', 'montzar_base_url', 'montzar_token', 'montzar_diff', 'montzar_live_price', 'montzar_mazaneh', 'montzar_truly_buy_mazaneh', 'montzar_truly_sell_mazaneh', 'startDay', 'endDay', 'payping_start_url', 'payping_verify_url', 'payping_gateway_items', 'payping_fin_url', diff --git a/database/sql/khaneghi_settings_catalog.sql b/database/sql/khaneghi_settings_catalog.sql index 3ac58d6..a00693d 100644 --- a/database/sql/khaneghi_settings_catalog.sql +++ b/database/sql/khaneghi_settings_catalog.sql @@ -36,10 +36,6 @@ INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `de SELECT 'chart_id', '', 'UUID نمودار Zaarbox', 1, 1, 'خالی = ca3800a0-1f57-3528-b963-178f9168e04f' WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'chart_id' LIMIT 1); -INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) -SELECT 'price_method', '', 'کلید محصول API اتحادیه (legacy)', 1, 1, NULL -WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'price_method' LIMIT 1); - INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`) SELECT 'etehadie_api_url', 'http://109.122.246.48:4949/api/free', 'آدرس API اتحادیه', 1, 1, NULL WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'etehadie_api_url' LIMIT 1);