@@ -1,124 +1,7 @@
|
|||||||
[
|
[
|
||||||
{
|
|
||||||
"key": "accounting_provider",
|
|
||||||
"value": "none",
|
|
||||||
"title_fa": "سیستم حسابداری",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "سیستم حسابداری: none=هیچکدام، pargar=API پرگار، tahesab=ارسال خودکار تهحساب، zarin=ارسال خودکار زرین.",
|
|
||||||
"type": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "admin_url",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "آدرس پنل ادمین",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "آدرس کامل پنل مدیریت (با https). برای لینکهای ادمین و تنظیمات CORS در صورت نیاز.",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "apk_download_link",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "لینک دانلود اپ اندروید",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "آدرس کامل فایل APK اندروید (https). اگر خالی باشد لینک دانلود در اپ نمایش داده نمیشود.",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "app_url",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "آدرس اپ (کاربر)",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "آدرس کامل وباپ کاربر (با https). در لینکهای پیامک، بازگشت از درگاه و ارجاعات داخلی استفاده میشود.",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "bale_bot_token",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "توکن بات بله",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "توکن ربات بله برای ارسال اعلانها. محرمانه.",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "chart_id",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "UUID نمودار Zaarbox",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "شناسه یکتا (UUID) نمودار در سرویس تابلو. اگر خالی باشد از شناسه پیشفرض سرویس استفاده میشود.",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "chart_use_local_data",
|
|
||||||
"value": "false",
|
|
||||||
"title_fa": "نمودار از داده خود سایت",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "روشن: نمودار قیمت از تاریخچه ذخیرهشده در دیتابیس خودتان. خاموش: از سرویس تابلو آنلاین (با شناسه chart_id) استفاده میشود.",
|
|
||||||
"type": "switch"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "chat_api",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "API چت",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "هاست سرور چت جدا (بدون https)، مثلاً chat.example.ir — برای WS و ساخت روم.",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "chat_api_key",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "کلید API چت",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "کلید API سرور چت جدا.",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "chat_download_url",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "آدرس دانلود فایل چت",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "پایهٔ URL دانلود/نمایش فایلهای چت پشتیبانی.",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "chat_upload_url",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "آدرس آپلود فایل چت",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "URL کامل آپلود مدیا برای چت پشتیبانی.",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "chat_webhook_base_url",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "آدرس پایه وبهوک چت",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "اگر APP_URL فرانت است (مثلاً https://niazitala.ir) اینجا آدرس لاراول را بگذار (مثلاً https://niazitala.ir/server). خالی = همان APP_URL.",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "chat_webhook_secret",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "رمز وبهوک چت",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "رمز مشترک بین لاراول و سرور چت برای اعلان پیام پشتیبانی. فقط سرور؛ در صورت خالی بودن بهصورت خودکار ساخته میشود.",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"key": "customer_direct_sms",
|
"key": "customer_direct_sms",
|
||||||
"value": "false",
|
"value": "",
|
||||||
"title_fa": "پیامک تکی به مشتری از لیست",
|
"title_fa": "پیامک تکی به مشتری از لیست",
|
||||||
"can_edit": 0,
|
"can_edit": 0,
|
||||||
"is_active": 1,
|
"is_active": 1,
|
||||||
@@ -127,25 +10,25 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "customer_special_pricing",
|
"key": "customer_special_pricing",
|
||||||
"value": "false",
|
"value": "",
|
||||||
"title_fa": "قیمت ویژه مشتری",
|
"title_fa": "customer_special_pricing",
|
||||||
"can_edit": 0,
|
"can_edit": 0,
|
||||||
"is_active": 1,
|
"is_active": 1,
|
||||||
"description": "روشن: زیرمنوی قیمت ویژه در مشتریان و اعمال سود خرید/فروش پکیج روی مظنه و سفارش برای کاربران انتخابشده. خاموش: غیرفعال. فقط از دیپلوی قابل تغییر است.",
|
"description": "",
|
||||||
"type": "switch"
|
"type": "switch"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "enable_conditional_order",
|
"key": "enable_conditional_order",
|
||||||
"value": "false",
|
"value": "",
|
||||||
"title_fa": "سفارش شرطی",
|
"title_fa": "سفارش شرطی",
|
||||||
"can_edit": 0,
|
"can_edit": 0,
|
||||||
"is_active": 1,
|
"is_active": 1,
|
||||||
"description": "روشن: قابلیت سفارش شرطی سراسری فعال است. خاموش: منو و ارزیابی اجرا نمیشود. فقط از دیپلوی قابل تغییر است.",
|
"description": "",
|
||||||
"type": "switch"
|
"type": "switch"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "enable_customer_level_profit",
|
"key": "enable_customer_level_profit",
|
||||||
"value": "false",
|
"value": "",
|
||||||
"title_fa": "سود چندسطحی معرف",
|
"title_fa": "سود چندسطحی معرف",
|
||||||
"can_edit": 0,
|
"can_edit": 0,
|
||||||
"is_active": 1,
|
"is_active": 1,
|
||||||
@@ -154,97 +37,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "enable_product_funds",
|
"key": "enable_product_funds",
|
||||||
"value": "false",
|
"value": "",
|
||||||
"title_fa": "قلک محصول",
|
"title_fa": "قلک محصول",
|
||||||
"can_edit": 0,
|
"can_edit": 0,
|
||||||
"is_active": 1,
|
"is_active": 1,
|
||||||
"description": "روشن: ساخت و مدیریت قلک per-product در اپ مشتری فعال است (یک محصول در هر قلک؛ انتقال بدون سند حسابداری). خاموش: منو و API ساخت قلک جدید در دسترس نیست. فقط از دیپلوی قابل تغییر است.",
|
"description": "روشن: ساخت و مدیریت قلک per-product در اپ مشتری فعال است (یک محصول در هر قلک؛ انتقال بدون سند حسابداری). خاموش: منو و API ساخت قلک جدید در دسترس نیست. فقط از دیپلوی قابل تغییر است.",
|
||||||
"type": "switch"
|
"type": "switch"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"key": "external_order_api_enabled",
|
|
||||||
"value": "true",
|
|
||||||
"title_fa": "فعالسازی API سفارش خارجی (get_wallet / order)",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "روشن: API دریافت کیف پول و ثبت سفارش از سرویس فروشگاه خارجی فعال است. نیاز به node_client_id و node_shared_secret دارد.",
|
|
||||||
"type": "switch"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "external_payment_base_url",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "آدرس API درگاه (BASE_URL)",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "آدرس پایه API سرویس Montify (بدون اسلش انتهایی)، مثلاً https://node.example.com — فقط سرور؛ در اپ کاربر ارسال نمیشود.",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "external_payment_client_id",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "شناسه کلاینت (client_id)",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "شناسه partner (client_id) — فقط سرور؛ در اپ کاربر یا پاسخ get_settings عمومی نیست.",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "external_payment_client_secret",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "رمز کلاینت (client_secret)",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "رمز مخفی partner (client_secret) — فقط سرور. در فرانت و Network تب کاربر دیده نمیشود.",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "external_payment_enabled",
|
|
||||||
"value": "false",
|
|
||||||
"title_fa": "فعالسازی شارژ آنلاین",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "روشن: در صورت کامل بودن BASE_URL و client_id و client_secret و gateway، دکمه پرداخت آنلاین در اپ نمایش داده میشود. خاموش: فقط واریز دستی.",
|
|
||||||
"type": "switch"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "external_payment_gateway",
|
|
||||||
"value": "zarinpall",
|
|
||||||
"title_fa": "نام درگاه داخل Montify",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "نام درگاه فعال داخل Montify: zarinpall، zibal، payping یا sepal|zarinpall,zibal,payping,sepal",
|
|
||||||
"type": "select"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "external_payment_return_url",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "آدرس برگشت (return_url)",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "آدرس صفحه فرانت بعد از پرداخت. خالی = دامنه سایت + /wallet/payment-result",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "external_payment_webhook_url",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "آدرس Webhook",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "آدرس بکاند برای webhook (شارژ قطعی کیف). خالی = مسیر پیشفرض سرور.",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "fee_deduct_from_gold",
|
|
||||||
"value": "false",
|
|
||||||
"title_fa": "اعمال مبلغ دقیق در معامله مشتری",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "روشن: مشتری دقیقاً همان مبلغ یا وزنی را که وارد کرده دریافت میکند. در فروش، مثلاً ۱۰۰ میلیون ریال درخواست → همان ۱۰۰ میلیون واریز و کارمزد از طلای کیف کسر میشود. در خرید، مثلاً ۱۰ گرم درخواست → همان ۱۰ گرم واریز و کارمزد به ریال قابل پرداخت اضافه میشود. خاموش (پیشفرض): در فروش کارمزد از مبلغ ریالی واریزی کم میشود (مشتری مبلغ کمتری میگیرد). در خرید کارمزد از وزن طلای واریزی کم میشود (مشتری طلای کمتری میگیرد).",
|
|
||||||
"type": "switch"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"key": "group_sms",
|
"key": "group_sms",
|
||||||
"value": "false",
|
"value": "",
|
||||||
"title_fa": "پیامک گروهی",
|
"title_fa": "پیامک گروهی",
|
||||||
"can_edit": 0,
|
"can_edit": 0,
|
||||||
"is_active": 1,
|
"is_active": 1,
|
||||||
@@ -262,7 +64,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "has_page_gift_card",
|
"key": "has_page_gift_card",
|
||||||
"value": "false",
|
"value": "",
|
||||||
"title_fa": "کارت هدیه",
|
"title_fa": "کارت هدیه",
|
||||||
"can_edit": 0,
|
"can_edit": 0,
|
||||||
"is_active": 1,
|
"is_active": 1,
|
||||||
@@ -271,7 +73,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "has_page_notification",
|
"key": "has_page_notification",
|
||||||
"value": "true",
|
"value": "",
|
||||||
"title_fa": "اعلان داخل اپ",
|
"title_fa": "اعلان داخل اپ",
|
||||||
"can_edit": 0,
|
"can_edit": 0,
|
||||||
"is_active": 1,
|
"is_active": 1,
|
||||||
@@ -280,551 +82,38 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "has_page_price_trigger",
|
"key": "has_page_price_trigger",
|
||||||
"value": "true",
|
"value": "",
|
||||||
"title_fa": "هشدار قیمت",
|
"title_fa": "هشدار قیمت",
|
||||||
"can_edit": 0,
|
"can_edit": 0,
|
||||||
"is_active": 1,
|
"is_active": 1,
|
||||||
"description": "روشن: منوی هشدار قیمت در اپ کاربر نمایش داده میشود. خاموش: منو و صفحه مخفی است. فقط از دیپلوی قابل تغییر است.",
|
"description": "روشن: منوی هشدار قیمت در اپ کاربر نمایش داده میشود. خاموش: منو و صفحه مخفی است. فقط از دیپلوی قابل تغییر است.",
|
||||||
"type": "switch"
|
"type": "switch"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"key": "is_store",
|
|
||||||
"value": "false",
|
|
||||||
"title_fa": "حالت فروشگاهی",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "نوع چیدمان اپ: روشن = حالت فروشگاهی (سبد، دستهبندی، حواله و …). خاموش = حالت معامله آبشده/محصولات کلاسیک. فقط از دیپلوی تغییر میکند.",
|
|
||||||
"type": "switch"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"key": "jibit_enabled",
|
"key": "jibit_enabled",
|
||||||
"value": "true",
|
"value": "",
|
||||||
"title_fa": "احراز هویت جیبیت",
|
"title_fa": "احراز هویت جیبیت",
|
||||||
"can_edit": 0,
|
"can_edit": 0,
|
||||||
"is_active": 1,
|
"is_active": 1,
|
||||||
"description": "روشن: سرویس احراز هویت جیبیت (تطبیق کد ملی/موبایل و کارت بانکی) فعال است. خاموش: هیچ فراخوانی به جیبیت انجام نمیشود و احراز هویت خودکار کار نمیکند. فقط از صفحه دیپلوی قابل تغییر است.",
|
"description": "روشن: سرویس احراز هویت جیبیت (تطبیق کد ملی/موبایل و کارت بانکی) فعال است. خاموش: هیچ فراخوانی به جیبیت انجام نمیشود و احراز هویت خودکار کار نمیکند. فقط از صفحه دیپلوی قابل تغییر است.",
|
||||||
"type": "switch"
|
"type": "switch"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"key": "logo_login",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "لوگوی صفحه ورود",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 0,
|
|
||||||
"description": "آدرس تصویر لوگو در صفحه ورود. معمولاً از طریق دیپلوی یا آپلود فایل تنظیم میشود؛ در پنل قابل ویرایش نیست.",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "logo_register",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "لوگوی ثبتنام",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 0,
|
|
||||||
"description": "آدرس تصویر لوگو در صفحه ثبتنام. معمولاً از طریق دیپلوی تنظیم میشود؛ در پنل قابل ویرایش نیست.",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "main_metal",
|
|
||||||
"value": "طلا",
|
|
||||||
"title_fa": "نام فلز اصلی (ادمین)",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "main_product",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "محصول آبشده",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "شناسه عددی یا نام reading_method محصول آبشده مرجع. وقتی منبع قیمت روی main_product باشد برای محاسبه استفاده میشود.",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "main_wallet_products",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "محصولات متصل به کیف اصلی",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "محصولاتی که موجودیشان از کیف طلای اصلی خوانده میشود. چند محصول با کاما. پیشفرض: 13",
|
|
||||||
"type": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "metal_type",
|
|
||||||
"value": "طلای آبشده",
|
|
||||||
"title_fa": "عنوان فلز در UI",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "عنوان فلز اصلی در رابط کاربر (مثلاً «طلای آبشده» یا «کاتد مس»). در دارایی، کیف پول و برچسبهای معامله دیده میشود. فقط از دیپلوی/SQL تغییر میکند.",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "montify_name",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "نام فروشگاه در درگاه",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "نام فروشگاه که در درگاه پرداخت و رسید بانکی به کاربر نمایش داده میشود.",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "montzar_base_url",
|
|
||||||
"value": "https://limangold.ir",
|
|
||||||
"title_fa": "آدرس سرور همکار",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "آدرس پایه سرور API همکار (بدون اسلش انتهایی). مثال: https://example.com",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "node_client_id",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "شناسه کلاینت API خارجی (X-Client-Id)",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "شناسه کلاینت برای API سفارش خارجی (هدر X-Client-Id). باید با مقدار تنظیمشده در سرویس مقصد یکسان باشد.",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "node_shared_secret",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "کلید امضای HMAC API خارجی",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "کلید مشترک امضای HMAC برای احراز درخواستهای API سفارش خارجی. محرمانه نگه دارید.",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "pargar_api_token",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "توکن ثابت API پرگار",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "pargar_item_id_gold",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "کد کالای طلا پرگار",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "کد کالای طلا (کیف اصلی / آبشده) در پرگار برای اسناد وزندار.",
|
|
||||||
"type": "number"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "pargar_item_id_rial",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "کد کالای ریال پرگار",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "کد کالا برای اسناد واریز/برداشت ریالی در پرگار. صفر = استفاده از کد طلا با وزن صفر.",
|
|
||||||
"type": "number"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "pargar_password",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "رمز عبور API پرگار",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "pargar_username",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "نام کاربری API پرگار",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "payping_fin_customer_id",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "customer_id fin",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "شناسه مشتری/حساب در سامانه fin که تراکنشها به نام آن ثبت میشوند.",
|
|
||||||
"type": "number"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "payping_fin_sync_enabled",
|
|
||||||
"value": "false",
|
|
||||||
"title_fa": "همگامسازی fin",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "روشن: پس از واریز/برداشت، تراکنش به سامانه حسابداری fin همگامسازی میشود.",
|
|
||||||
"type": "switch"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "payping_fin_token",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "توکن fin",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "توکن احراز هویت برای API سامانه fin.",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "payping_fin_url",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "URL fin",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "آدرس کامل endpoint ثبت تراکنش در سامانه fin (POST).",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "payping_gateway_items",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "لیست item (چرخشی)",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "لیست کدهای item درگاه (با کاما) برای چرخش بین چند merchant.",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "payping_gateway_name",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "نام gateway درگاه",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "نام درگاه پرداخت فعال که به سرویس واسط درگاه ارسال میشود|sepal,",
|
|
||||||
"type": "select"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "payping_round_toman",
|
|
||||||
"value": "false",
|
|
||||||
"title_fa": "گرد کردن مبلغ به تومان",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "روشن: مبلغ پرداخت به نزدیکترین تومان گرد میشود. خاموش: مبلغ دقیق ریالی.",
|
|
||||||
"type": "switch"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "payping_start_url",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "آدرس شروع درگاه",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "آدرس API شروع پرداخت (redirect کاربر به درگاه).",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "payping_strict_failed_withdraw",
|
|
||||||
"value": "false",
|
|
||||||
"title_fa": "برداشت ناموفق سختگیرانه",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "روشن: در صورت وجود برداشت ناموفق قبلی، تسویه جدید با احتیاط بیشتر انجام میشود.",
|
|
||||||
"type": "switch"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "payping_verify_url",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "آدرس تأیید درگاه",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "آدرس API تأیید و نهاییسازی پرداخت پس از بازگشت از درگاه.",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"key": "permision__enabled",
|
"key": "permision__enabled",
|
||||||
"value": "false",
|
"value": "",
|
||||||
"title_fa": "نمایش منوی مجوزها",
|
"title_fa": "نمایش منوی مجوزها",
|
||||||
"can_edit": 0,
|
"can_edit": 0,
|
||||||
"is_active": 1,
|
"is_active": 1,
|
||||||
"description": "روشن: آیتم «مجوز ها» در منوی تنظیمات اپ خانگی (تم جدید) نمایش داده میشود. خاموش: مخفی است.",
|
"description": "روشن: آیتم «مجوز ها» در منوی تنظیمات اپ خانگی (تم جدید) نمایش داده میشود. خاموش: مخفی است.",
|
||||||
"type": "switch"
|
"type": "switch"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"key": "price_channel_access",
|
|
||||||
"value": "false",
|
|
||||||
"title_fa": "دسترسی ارسال قیمت به کانال",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "روشن: گروه «ارسال قیمت به کانال» در تنظیمات عادی پنل دیده میشود. خاموش: مخفی است (فقط از تنظیمات پیشرفته).",
|
|
||||||
"type": "switch"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "price_channel_bale_to",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "مقصد ارسال بله",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "آیدی چنل/گروه بله برای ارسال قیمت (چند مقصد با ویرگول).",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "price_channel_rubika_to",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "مقصد ارسال روبیکا",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "آیدی چنل/گروه روبیکا برای ارسال قیمت (چند مقصد با ویرگول).",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "price_channel_telegram_to",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "مقصد ارسال تلگرام",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "آیدی چنل/گروه تلگرام برای ارسال قیمت (چند مقصد با ویرگول).",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "price_provider",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "منبع قیمت",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "منبع دریافت قیمت لحظهای برای اپ کاربر و همگامسازی محصولات. مقدار montzar = قیمت از همکار (Montzar).|montzar,zaarbox,main_product",
|
|
||||||
"type": "select"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "profit_gold_api_enabled",
|
|
||||||
"value": "false",
|
|
||||||
"title_fa": "API سود طلا",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 0,
|
|
||||||
"description": "روشن: API محاسبه سود طلا فعال است. در اکثر نصبها خاموش میماند.",
|
|
||||||
"type": "switch"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "referral_bonus_amount",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "مقدار پاداش معرف",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "مبلغ یا مقدار پاداش معرف (متن آزاد — بسته به پیادهسازی پیامک/اعتبار). برای نمایش در پیامها.",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "rubika_bot_token",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "توکن بات روبیکا",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "",
|
|
||||||
"type": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "send_to_pargar",
|
|
||||||
"value": "false",
|
|
||||||
"title_fa": "ارسال به پرگار (قدیمی)",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 0,
|
|
||||||
"description": "",
|
|
||||||
"type": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "send_to_tahesab",
|
|
||||||
"value": "false",
|
|
||||||
"title_fa": "ارسال به تهحساب",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 0,
|
|
||||||
"description": "روشن: واریز و برداشت مشتریان بهصورت خودکار به تهحساب ارسال میشود.",
|
|
||||||
"type": ""
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"key": "show_to_users_chat",
|
"key": "show_to_users_chat",
|
||||||
"value": "deactivate",
|
|
||||||
"title_fa": "نمایش چت به کاربران",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "روشن: قابلیت چت پشتیبانی برای این دیپلوی فعال است (منوی ادمین و پیشنیاز نمایش به کاربر). خاموش: چت در ادمین و اپ کاربر مخفی است و سوییچ «چت پشتیبانی» (has_chat) از تنظیمات عادی هم برداشته میشود.",
|
|
||||||
"type": "switch"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "sms_panel",
|
|
||||||
"value": "true",
|
|
||||||
"title_fa": "پنل پیامک (کیف پول)",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "روشن: پنل پیامک و کیف پول billing فعال است. خاموش: پیامکها مثل قبل ارسال میشوند بدون billing.",
|
|
||||||
"type": "switch"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "sse_path",
|
|
||||||
"value": "/api/price/stream",
|
|
||||||
"title_fa": "مسیر SSE قیمت",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "مسیر GET لاراول برای استریم قیمت — پیشفرض /api/price/stream",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "tahesab_bank_account",
|
|
||||||
"value": "",
|
"value": "",
|
||||||
"title_fa": "حساب بانکی تهحساب",
|
"title_fa": "show_to_users_chat",
|
||||||
"can_edit": 0,
|
"can_edit": 0,
|
||||||
"is_active": 1,
|
"is_active": 1,
|
||||||
"description": "نام یا کد حساب بانکی در سند واریز/برداشت تهحساب.",
|
"description": "",
|
||||||
"type": "text"
|
"type": ""
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "tahesab_db",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "نام دیتابیس تهحساب",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "نام دیتابیس یا شناسه پایگاه در تهحساب که سند به آن ارسال میشود.",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "tahesab_host",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "آدرس IP سرور تهحساب",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "آدرس IP یا hostname سرور نرمافزار تهحساب روی شبکه داخلی.",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "tahesab_port",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "پورت سرور تهحساب",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "شماره پورت اتصال به API تهحساب (معمولاً 8080 یا مقدار مستندات تهحساب).",
|
|
||||||
"type": "number"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "tahesab_token",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "توکن تهحساب",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "توکن/API Key اتصال به تهحساب. از پنل تهحساب دریافت میشود.",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "telegram_bot_token",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "توکن بات تلگرام",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "توکن ربات تلگرام برای ارسال اعلانها. از BotFather دریافت میشود. محرمانه.",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "title_fav",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "عنوان favicon",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 0,
|
|
||||||
"description": "عنوان نمایشدادهشده در تب مرورگر (favicon). از دیپلوی مدیریت میشود.",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "title_pwa",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "عنوان PWA",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 0,
|
|
||||||
"description": "عنوان کوتاه برای نصب PWA روی موبایل. از دیپلوی مدیریت میشود.",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "unit",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "واحد وزن دارایی و معاملات",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "واحد نمایش وزن در داراییها، کیف پول و جزئیات معاملات|گرم,کیلوگرم",
|
|
||||||
"type": "select"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "wallet_payment_provider",
|
|
||||||
"value": "none",
|
|
||||||
"title_fa": "نوع درگاه شارژ آنلاین",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "none=خاموش، montify=پارتنر Montify|none,montify",
|
|
||||||
"type": "select"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "wss_enabled",
|
|
||||||
"value": "true",
|
|
||||||
"title_fa": "قیمت لحظهای (SSE)",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "روشن: اپ به SSE (sse_path) وصل میشود و last/list با payload میآید؛ خاموش: polling.",
|
|
||||||
"type": "switch"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "zaarbox_api_url",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "آدرس API تابلو Zaarbox",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "آدرس سرور(های) فید قیمت (/api/free). تا ۵ آدرس (JSON آرایه) پشتیبانی میشود؛ اگر آدرس اول پاسخ ندهد بهترتیب سراغ بعدی میرود. مقدار تکی قبلی حفظ میشود.",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "zarin_api",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "آدرس API زرین",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "آدرس پایه وبسرویس زرین (بدون /ZarrinService/accounting).",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "zarin_gorohe_kar",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "گروه کار پیشفرض زرین",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "کد gorooheKar هنگام ساخت/جستجوی کار در زرین. برای جداسازی چند پنل روی یک زرین، برای هر پنل مقدار متفاوت بگذارید.",
|
|
||||||
"type": "number"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "zarin_name_g",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "نام گروه حساب مشتریان زرین",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "پارامتر nameG در addhesab — گروه حساب زرین. برای اپ خانگی: مشتری نقدی (خریدار) = گروه ۶. گروه همکار استفاده نشود (مظنه متفاوت است).",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "zarin_noe_kar",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "نوع کار پیشفرض زرین",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "کد noeKar هنگام ساخت کار ساخته در زرین. مقدار ۱۶ معمولاً گرمی است و برای sabtSanadTedadi مناسب نیست.",
|
|
||||||
"type": "number"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "zarin_noe_kar_tedadi",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "نوع کار تعدادی زرین",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "noeKar برای سند تعدادی (سکه/شمش/گوی/مکعب). روی زرین معمولاً ۱۷=سکه-تعدادی یا ۱۸=اجرت تعدادی. اگر خالی/نامعتبر باشد کد از ۱۷ استفاده میکند.",
|
|
||||||
"type": "number"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "zarin_token",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "توکن زرین",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "توکن مکمل API زرین که در نرمافزار زرین تعریف میشود.",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "zarin_uid_prefix",
|
|
||||||
"value": "",
|
|
||||||
"title_fa": "پیشوند عددی uid زرین",
|
|
||||||
"can_edit": 0,
|
|
||||||
"is_active": 1,
|
|
||||||
"description": "فقط عدد. وقتی چند پنل یک زرین دارند باید متفاوت باشد تا uid تکراری نشود.",
|
|
||||||
"type": "text"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -2,11 +2,14 @@
|
|||||||
/**
|
/**
|
||||||
* منبع حقیقت: khaneghi_server/database/sql/deploy_settings_const.sql
|
* منبع حقیقت: khaneghi_server/database/sql/deploy_settings_const.sql
|
||||||
* خروجی:
|
* خروجی:
|
||||||
* - prisma/setting-templates-from-deploy.json (فقط can_edit=0 نهایی)
|
* - prisma/setting-templates-from-deploy.json (فقط کلیدهای مالکیت سوپرادمین)
|
||||||
* - src/program-settings/deploy-setting-catalog-keys.ts
|
* - src/program-settings/deploy-setting-catalog-keys.ts
|
||||||
* - ../controlpanel_user/src/config/superAdminSettingKeys.ts
|
* - ../controlpanel_user/src/config/superAdminSettingKeys.ts
|
||||||
*
|
*
|
||||||
* قالب value خالی است برای توکن/رمز/شناسه پروژه — هر پروژه در سوپرادمین مقدار خودش را دارد.
|
* مالکیت سوپرادمین دیگر با can_edit تعیین نمیشود: فقط کلیدهای SUPERADMIN_OWNED_KEYS
|
||||||
|
* (تب «دسترسی مشتری به قابلیتها») در سوپرادمین میمانند و بقیه مالک دیتابیس هر نصباند.
|
||||||
|
* کلیدهای لوکال در جدول settings همان can_edit=0 خودشان را نگه میدارند تا در تب
|
||||||
|
* «تنظیمات پیشرفته» پنل خانگی بمانند؛ اینجا فقط از قالب سوپرادمین بیرون میروند.
|
||||||
*/
|
*/
|
||||||
import { readFileSync, writeFileSync } from 'fs';
|
import { readFileSync, writeFileSync } from 'fs';
|
||||||
import { dirname, join } from 'path';
|
import { dirname, join } from 'path';
|
||||||
@@ -204,12 +207,29 @@ for (const key of EXTRA_EDITABLE) {
|
|||||||
if (row) row.can_edit = 1;
|
if (row) row.can_edit = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** تنها کلیدهایی که سوپرادمین مالکشان میماند — گروه «دسترسی مشتری به قابلیتها» */
|
||||||
|
const SUPERADMIN_OWNED_KEYS = new Set([
|
||||||
|
'customer_direct_sms',
|
||||||
|
'customer_special_pricing',
|
||||||
|
'enable_conditional_order',
|
||||||
|
'enable_customer_level_profit',
|
||||||
|
'enable_product_funds',
|
||||||
|
'group_sms',
|
||||||
|
'has_page_earn_money',
|
||||||
|
'has_page_gift_card',
|
||||||
|
'has_page_notification',
|
||||||
|
'has_page_price_trigger',
|
||||||
|
'jibit_enabled',
|
||||||
|
'permision__enabled',
|
||||||
|
'show_to_users_chat',
|
||||||
|
]);
|
||||||
|
|
||||||
const systemRows = [...rows.values()]
|
const systemRows = [...rows.values()]
|
||||||
.filter((r) => r.can_edit === 0)
|
.filter((r) => r.can_edit === 0 && SUPERADMIN_OWNED_KEYS.has(r.key))
|
||||||
.sort((a, b) => a.key.localeCompare(b.key));
|
.sort((a, b) => a.key.localeCompare(b.key));
|
||||||
|
|
||||||
const editableRows = [...rows.values()]
|
const editableRows = [...rows.values()]
|
||||||
.filter((r) => r.can_edit === 1)
|
.filter((r) => !SUPERADMIN_OWNED_KEYS.has(r.key))
|
||||||
.sort((a, b) => a.key.localeCompare(b.key));
|
.sort((a, b) => a.key.localeCompare(b.key));
|
||||||
|
|
||||||
const jsonOut = systemRows.map((r) => ({
|
const jsonOut = systemRows.map((r) => ({
|
||||||
@@ -223,14 +243,17 @@ const jsonOut = systemRows.map((r) => ({
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
const tsKeys = `/**
|
const tsKeys = `/**
|
||||||
* کلیدهای can_edit=0 در deploy_settings_const.sql — فقط همینها در قالب سوپرادمین.
|
* کلیدهای مالکیت سوپرادمین — گروه «دسترسی مشتری به قابلیتها».
|
||||||
* تولید خودکار: node scripts/sync-superadmin-setting-template.mjs
|
* تولید خودکار: node scripts/sync-superadmin-setting-template.mjs
|
||||||
*/
|
*/
|
||||||
export const DEPLOY_SETTING_CATALOG_KEYS = new Set<string>([
|
export const DEPLOY_SETTING_CATALOG_KEYS = new Set<string>([
|
||||||
${systemRows.map((r) => ` ${JSON.stringify(r.key)},`).join('\n')}
|
${systemRows.map((r) => ` ${JSON.stringify(r.key)},`).join('\n')}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/** کلیدهای can_edit=1 — نباید در قالب/جدول settings سوپرادمین باشند */
|
/**
|
||||||
|
* کلیدهایی که سوپرادمین مالکشان نیست (مالک: دیتابیس هر نصب).
|
||||||
|
* در هر بوت با purgeEditableFromSuperAdmin از قالب و ردیف همهٔ پروژهها حذف میشوند.
|
||||||
|
*/
|
||||||
export const DEPLOY_SETTING_EDITABLE_KEYS = new Set<string>([
|
export const DEPLOY_SETTING_EDITABLE_KEYS = new Set<string>([
|
||||||
${editableRows.map((r) => ` ${JSON.stringify(r.key)},`).join('\n')}
|
${editableRows.map((r) => ` ${JSON.stringify(r.key)},`).join('\n')}
|
||||||
]);
|
]);
|
||||||
@@ -240,7 +263,7 @@ writeFileSync(join(root, 'prisma/setting-templates-from-deploy.json'), `${JSON.s
|
|||||||
writeFileSync(join(root, 'src/program-settings/deploy-setting-catalog-keys.ts'), `${tsKeys}\n`);
|
writeFileSync(join(root, 'src/program-settings/deploy-setting-catalog-keys.ts'), `${tsKeys}\n`);
|
||||||
|
|
||||||
const userTs = `/**
|
const userTs = `/**
|
||||||
* کلیدهای تنظیمات سوپرادمین — همتراز deploy_settings_const.sql
|
* کلیدهای تنظیمات سوپرادمین — فقط گروه «دسترسی مشتری به قابلیتها».
|
||||||
* تولید خودکار: controlpanel_server/scripts/sync-superadmin-setting-template.mjs
|
* تولید خودکار: controlpanel_server/scripts/sync-superadmin-setting-template.mjs
|
||||||
*/
|
*/
|
||||||
export const SUPERADMIN_SYSTEM_SETTING_KEYS = new Set<string>([
|
export const SUPERADMIN_SYSTEM_SETTING_KEYS = new Set<string>([
|
||||||
@@ -261,24 +284,25 @@ export function isSuperAdminSystemSettingKey(key?: string | null): boolean {
|
|||||||
|
|
||||||
writeFileSync(join(root, '../controlpanel_user/src/config/superAdminSettingKeys.ts'), `${userTs}\n`);
|
writeFileSync(join(root, '../controlpanel_user/src/config/superAdminSettingKeys.ts'), `${userTs}\n`);
|
||||||
|
|
||||||
console.log(`system keys (can_edit=0): ${systemRows.length}`);
|
console.log(`superadmin-owned keys: ${systemRows.length}`);
|
||||||
console.log(`editable keys (can_edit=1): ${editableRows.length}`);
|
console.log(`locally owned keys (purged from superadmin): ${editableRows.length}`);
|
||||||
const mustHave = [
|
for (const key of SUPERADMIN_OWNED_KEYS) {
|
||||||
'price_provider',
|
|
||||||
'zaarbox_api_url',
|
|
||||||
'main_product',
|
|
||||||
'profit_gold_api_enabled',
|
|
||||||
'title_pwa',
|
|
||||||
'title_fav',
|
|
||||||
'unit',
|
|
||||||
'main_wallet_products',
|
|
||||||
];
|
|
||||||
for (const key of mustHave) {
|
|
||||||
const ok = systemRows.some((r) => r.key === key);
|
const ok = systemRows.some((r) => r.key === key);
|
||||||
console.log(` ${ok ? 'OK' : 'MISSING'} ${key}`);
|
console.log(` ${ok ? 'OK' : 'MISSING'} ${key}`);
|
||||||
}
|
}
|
||||||
const mustNot = ['montzar_token', 'montzar_diff', 'name_fa', 'buy_fee'];
|
const mustNot = [
|
||||||
|
'price_provider',
|
||||||
|
'node_shared_secret',
|
||||||
|
'chat_api_key',
|
||||||
|
'external_payment_client_secret',
|
||||||
|
'wallet_payment_provider',
|
||||||
|
'zarin_token',
|
||||||
|
'tahesab_token',
|
||||||
|
'pargar_password',
|
||||||
|
'name_fa',
|
||||||
|
'buy_fee',
|
||||||
|
];
|
||||||
for (const key of mustNot) {
|
for (const key of mustNot) {
|
||||||
const bad = systemRows.some((r) => r.key === key);
|
const bad = systemRows.some((r) => r.key === key);
|
||||||
console.log(` ${bad ? 'LEAK' : 'OK'} system must not contain ${key}`);
|
console.log(` ${bad ? 'LEAK' : 'OK'} superadmin must not own ${key}`);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,40 @@
|
|||||||
/**
|
/**
|
||||||
* کلیدهای can_edit=0 در deploy_settings_const.sql — فقط همینها در قالب سوپرادمین.
|
* کلیدهای مالکیت سوپرادمین — گروه «دسترسی مشتری به قابلیتها».
|
||||||
* تولید خودکار: node scripts/sync-superadmin-setting-template.mjs
|
* تولید خودکار: node scripts/sync-superadmin-setting-template.mjs
|
||||||
*/
|
*/
|
||||||
export const DEPLOY_SETTING_CATALOG_KEYS = new Set<string>([
|
export const DEPLOY_SETTING_CATALOG_KEYS = new Set<string>([
|
||||||
|
"customer_direct_sms",
|
||||||
|
"customer_special_pricing",
|
||||||
|
"enable_conditional_order",
|
||||||
|
"enable_customer_level_profit",
|
||||||
|
"enable_product_funds",
|
||||||
|
"group_sms",
|
||||||
|
"has_page_earn_money",
|
||||||
|
"has_page_gift_card",
|
||||||
|
"has_page_notification",
|
||||||
|
"has_page_price_trigger",
|
||||||
|
"jibit_enabled",
|
||||||
|
"permision__enabled",
|
||||||
|
"show_to_users_chat",
|
||||||
|
]);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* کلیدهایی که سوپرادمین مالکشان نیست (مالک: دیتابیس هر نصب).
|
||||||
|
* در هر بوت با purgeEditableFromSuperAdmin از قالب و ردیف همهٔ پروژهها حذف میشوند.
|
||||||
|
*/
|
||||||
|
export const DEPLOY_SETTING_EDITABLE_KEYS = new Set<string>([
|
||||||
|
"about_software",
|
||||||
"accounting_provider",
|
"accounting_provider",
|
||||||
"admin_url",
|
"admin_url",
|
||||||
"apk_download_link",
|
"apk_download_link",
|
||||||
"app_url",
|
"app_url",
|
||||||
|
"auto_active_customer",
|
||||||
|
"balance_report_exclude_customer_id",
|
||||||
"bale_bot_token",
|
"bale_bot_token",
|
||||||
|
"banner_enabled",
|
||||||
|
"buy_fee",
|
||||||
|
"change_mesghal",
|
||||||
|
"charge_notif",
|
||||||
"chart_id",
|
"chart_id",
|
||||||
"chart_use_local_data",
|
"chart_use_local_data",
|
||||||
"chat_api",
|
"chat_api",
|
||||||
@@ -16,95 +43,6 @@ export const DEPLOY_SETTING_CATALOG_KEYS = new Set<string>([
|
|||||||
"chat_upload_url",
|
"chat_upload_url",
|
||||||
"chat_webhook_base_url",
|
"chat_webhook_base_url",
|
||||||
"chat_webhook_secret",
|
"chat_webhook_secret",
|
||||||
"customer_direct_sms",
|
|
||||||
"customer_special_pricing",
|
|
||||||
"enable_conditional_order",
|
|
||||||
"enable_customer_level_profit",
|
|
||||||
"enable_product_funds",
|
|
||||||
"external_order_api_enabled",
|
|
||||||
"external_payment_base_url",
|
|
||||||
"external_payment_client_id",
|
|
||||||
"external_payment_client_secret",
|
|
||||||
"external_payment_enabled",
|
|
||||||
"external_payment_gateway",
|
|
||||||
"external_payment_return_url",
|
|
||||||
"external_payment_webhook_url",
|
|
||||||
"fee_deduct_from_gold",
|
|
||||||
"group_sms",
|
|
||||||
"has_page_earn_money",
|
|
||||||
"has_page_gift_card",
|
|
||||||
"has_page_notification",
|
|
||||||
"has_page_price_trigger",
|
|
||||||
"is_store",
|
|
||||||
"jibit_enabled",
|
|
||||||
"logo_login",
|
|
||||||
"logo_register",
|
|
||||||
"main_metal",
|
|
||||||
"main_product",
|
|
||||||
"main_wallet_products",
|
|
||||||
"metal_type",
|
|
||||||
"montify_name",
|
|
||||||
"montzar_base_url",
|
|
||||||
"node_client_id",
|
|
||||||
"node_shared_secret",
|
|
||||||
"pargar_api_token",
|
|
||||||
"pargar_item_id_gold",
|
|
||||||
"pargar_item_id_rial",
|
|
||||||
"pargar_password",
|
|
||||||
"pargar_username",
|
|
||||||
"payping_fin_customer_id",
|
|
||||||
"payping_fin_sync_enabled",
|
|
||||||
"payping_fin_token",
|
|
||||||
"payping_fin_url",
|
|
||||||
"payping_gateway_items",
|
|
||||||
"payping_gateway_name",
|
|
||||||
"payping_round_toman",
|
|
||||||
"payping_start_url",
|
|
||||||
"payping_strict_failed_withdraw",
|
|
||||||
"payping_verify_url",
|
|
||||||
"permision__enabled",
|
|
||||||
"price_channel_access",
|
|
||||||
"price_channel_bale_to",
|
|
||||||
"price_channel_rubika_to",
|
|
||||||
"price_channel_telegram_to",
|
|
||||||
"price_provider",
|
|
||||||
"profit_gold_api_enabled",
|
|
||||||
"referral_bonus_amount",
|
|
||||||
"rubika_bot_token",
|
|
||||||
"send_to_pargar",
|
|
||||||
"send_to_tahesab",
|
|
||||||
"show_to_users_chat",
|
|
||||||
"sms_panel",
|
|
||||||
"sse_path",
|
|
||||||
"tahesab_bank_account",
|
|
||||||
"tahesab_db",
|
|
||||||
"tahesab_host",
|
|
||||||
"tahesab_port",
|
|
||||||
"tahesab_token",
|
|
||||||
"telegram_bot_token",
|
|
||||||
"title_fav",
|
|
||||||
"title_pwa",
|
|
||||||
"unit",
|
|
||||||
"wallet_payment_provider",
|
|
||||||
"wss_enabled",
|
|
||||||
"zaarbox_api_url",
|
|
||||||
"zarin_api",
|
|
||||||
"zarin_gorohe_kar",
|
|
||||||
"zarin_name_g",
|
|
||||||
"zarin_noe_kar",
|
|
||||||
"zarin_noe_kar_tedadi",
|
|
||||||
"zarin_token",
|
|
||||||
"zarin_uid_prefix",
|
|
||||||
]);
|
|
||||||
|
|
||||||
/** کلیدهای can_edit=1 — نباید در قالب/جدول settings سوپرادمین باشند */
|
|
||||||
export const DEPLOY_SETTING_EDITABLE_KEYS = new Set<string>([
|
|
||||||
"auto_active_customer",
|
|
||||||
"balance_report_exclude_customer_id",
|
|
||||||
"banner_enabled",
|
|
||||||
"buy_fee",
|
|
||||||
"change_mesghal",
|
|
||||||
"charge_notif",
|
|
||||||
"close_price",
|
"close_price",
|
||||||
"deposit_account_holder",
|
"deposit_account_holder",
|
||||||
"deposit_account_number",
|
"deposit_account_number",
|
||||||
@@ -118,21 +56,40 @@ export const DEPLOY_SETTING_EDITABLE_KEYS = new Set<string>([
|
|||||||
"deposit_support_message_text",
|
"deposit_support_message_text",
|
||||||
"do_send_liman",
|
"do_send_liman",
|
||||||
"down_price",
|
"down_price",
|
||||||
|
"enamad_url",
|
||||||
"endDay",
|
"endDay",
|
||||||
|
"external_order_api_enabled",
|
||||||
|
"external_payment_base_url",
|
||||||
|
"external_payment_client_id",
|
||||||
|
"external_payment_client_secret",
|
||||||
|
"external_payment_enabled",
|
||||||
|
"external_payment_gateway",
|
||||||
|
"external_payment_return_url",
|
||||||
|
"external_payment_webhook_url",
|
||||||
"fee",
|
"fee",
|
||||||
"fee_conditional_order",
|
"fee_conditional_order",
|
||||||
|
"fee_deduct_from_gold",
|
||||||
"fee_free",
|
"fee_free",
|
||||||
"fee_service_charge_percentage",
|
"fee_service_charge_percentage",
|
||||||
"gift_for_referral",
|
"gift_for_referral",
|
||||||
"gift_for_referrer",
|
"gift_for_referrer",
|
||||||
"has_chat",
|
"has_chat",
|
||||||
"invite_link_text",
|
"invite_link_text",
|
||||||
|
"is_store",
|
||||||
"jibit_verification",
|
"jibit_verification",
|
||||||
|
"logo_login",
|
||||||
|
"logo_register",
|
||||||
|
"main_metal",
|
||||||
|
"main_product",
|
||||||
"main_product_price",
|
"main_product_price",
|
||||||
|
"main_wallet_products",
|
||||||
|
"metal_type",
|
||||||
"min_deposit",
|
"min_deposit",
|
||||||
"min_first_buy",
|
"min_first_buy",
|
||||||
"min_withdraw",
|
"min_withdraw",
|
||||||
"minimum_sell",
|
"minimum_sell",
|
||||||
|
"montify_name",
|
||||||
|
"montzar_base_url",
|
||||||
"montzar_closed",
|
"montzar_closed",
|
||||||
"montzar_diff",
|
"montzar_diff",
|
||||||
"montzar_last_product_log",
|
"montzar_last_product_log",
|
||||||
@@ -148,7 +105,26 @@ export const DEPLOY_SETTING_EDITABLE_KEYS = new Set<string>([
|
|||||||
"montzar_truly_buy_mazaneh",
|
"montzar_truly_buy_mazaneh",
|
||||||
"montzar_truly_sell_mazaneh",
|
"montzar_truly_sell_mazaneh",
|
||||||
"name_fa",
|
"name_fa",
|
||||||
|
"node_client_id",
|
||||||
|
"node_shared_secret",
|
||||||
"open_register",
|
"open_register",
|
||||||
|
"pargar_api_token",
|
||||||
|
"pargar_item_id_gold",
|
||||||
|
"pargar_item_id_rial",
|
||||||
|
"pargar_password",
|
||||||
|
"pargar_username",
|
||||||
|
"payping_fin_customer_id",
|
||||||
|
"payping_fin_sync_enabled",
|
||||||
|
"payping_fin_token",
|
||||||
|
"payping_fin_url",
|
||||||
|
"payping_gateway_items",
|
||||||
|
"payping_gateway_name",
|
||||||
|
"payping_round_toman",
|
||||||
|
"payping_start_url",
|
||||||
|
"payping_strict_failed_withdraw",
|
||||||
|
"payping_verify_url",
|
||||||
|
"price_channel_access",
|
||||||
|
"price_channel_bale_to",
|
||||||
"price_channel_diff",
|
"price_channel_diff",
|
||||||
"price_channel_enabled",
|
"price_channel_enabled",
|
||||||
"price_channel_footer_id",
|
"price_channel_footer_id",
|
||||||
@@ -157,10 +133,15 @@ export const DEPLOY_SETTING_EDITABLE_KEYS = new Set<string>([
|
|||||||
"price_channel_message_text",
|
"price_channel_message_text",
|
||||||
"price_channel_messengers",
|
"price_channel_messengers",
|
||||||
"price_channel_min_seconds",
|
"price_channel_min_seconds",
|
||||||
|
"price_channel_rubika_to",
|
||||||
|
"price_channel_telegram_to",
|
||||||
"price_extreme_date",
|
"price_extreme_date",
|
||||||
|
"price_provider",
|
||||||
"products_site_link_enabled",
|
"products_site_link_enabled",
|
||||||
"products_site_link_text",
|
"products_site_link_text",
|
||||||
"products_site_link_url",
|
"products_site_link_url",
|
||||||
|
"profit_gold_api_enabled",
|
||||||
|
"referral_bonus_amount",
|
||||||
"referral_bonus_count",
|
"referral_bonus_count",
|
||||||
"referral_gift_buy_from_montzar",
|
"referral_gift_buy_from_montzar",
|
||||||
"referral_gift_on_first_order",
|
"referral_gift_on_first_order",
|
||||||
@@ -171,7 +152,10 @@ export const DEPLOY_SETTING_EDITABLE_KEYS = new Set<string>([
|
|||||||
"register_referral_bonus_message",
|
"register_referral_bonus_message",
|
||||||
"register_referral_sms_to_referrer",
|
"register_referral_sms_to_referrer",
|
||||||
"require_zero_main_gold_before_other_buy",
|
"require_zero_main_gold_before_other_buy",
|
||||||
|
"rubika_bot_token",
|
||||||
"sell_fee",
|
"sell_fee",
|
||||||
|
"send_to_pargar",
|
||||||
|
"send_to_tahesab",
|
||||||
"show_gold_ounce_price",
|
"show_gold_ounce_price",
|
||||||
"show_home_price_when_closed",
|
"show_home_price_when_closed",
|
||||||
"show_last_price",
|
"show_last_price",
|
||||||
@@ -194,16 +178,37 @@ export const DEPLOY_SETTING_EDITABLE_KEYS = new Set<string>([
|
|||||||
"sms_notif_wallet_alert",
|
"sms_notif_wallet_alert",
|
||||||
"sms_notif_withdraw_admin",
|
"sms_notif_withdraw_admin",
|
||||||
"sms_notif_withdraw_otp",
|
"sms_notif_withdraw_otp",
|
||||||
|
"sms_panel",
|
||||||
|
"sse_path",
|
||||||
"startDay",
|
"startDay",
|
||||||
"support_messenger",
|
"support_messenger",
|
||||||
"support_messenger_id",
|
"support_messenger_id",
|
||||||
"support_messenger_text",
|
"support_messenger_text",
|
||||||
"support_messengers",
|
"support_messengers",
|
||||||
|
"tahesab_bank_account",
|
||||||
|
"tahesab_db",
|
||||||
|
"tahesab_host",
|
||||||
|
"tahesab_port",
|
||||||
|
"tahesab_token",
|
||||||
|
"telegram_bot_token",
|
||||||
"text_about",
|
"text_about",
|
||||||
"text_rule",
|
"text_rule",
|
||||||
|
"title_fav",
|
||||||
|
"title_pwa",
|
||||||
"tracking_systems",
|
"tracking_systems",
|
||||||
"tracking_systems_enabled",
|
"tracking_systems_enabled",
|
||||||
|
"unit",
|
||||||
"up_price",
|
"up_price",
|
||||||
|
"wallet_payment_provider",
|
||||||
|
"wss_enabled",
|
||||||
|
"zaarbox_api_url",
|
||||||
"zaarbox_price_key",
|
"zaarbox_price_key",
|
||||||
|
"zarin_api",
|
||||||
|
"zarin_gorohe_kar",
|
||||||
|
"zarin_name_g",
|
||||||
|
"zarin_noe_kar",
|
||||||
|
"zarin_noe_kar_tedadi",
|
||||||
|
"zarin_token",
|
||||||
|
"zarin_uid_prefix",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user