145 lines
6.3 KiB
C#
145 lines
6.3 KiB
C#
using AyCode.Core.Consts;
|
|
using AyCode.Core.Loggers;
|
|
|
|
namespace FruitBank.Common;
|
|
|
|
public static class FruitBankConstClient
|
|
{
|
|
public static string DefaultLocale = "en-US";
|
|
|
|
// DELEGÁT az AcEnv.BaseUrl-re (AyCode.Core framework, 2026-07): az érték EGY helyen, a kereten él
|
|
// (fail-fast: hidratálatlan olvasás exception). A hostok induláskor hidratálják az appsettings
|
|
// "AyCode:Urls:BaseUrl"-ből; az fbHub és a loggerHub URL-je is ebből származik (+/fbHub, +/loggerHub).
|
|
// Környezet-értékek: dev https://localhost:59579 | prod https://shop.fruitbank.hu | test https://fruitbank.mangoweb.hu | android http://10.0.2.2:59579
|
|
public static string BaseUrl
|
|
{
|
|
get => AcEnv.BaseUrl;
|
|
set => AcEnv.BaseUrl = value;
|
|
}
|
|
|
|
// IsProd → AcEnv.IsProdDb (AyCode.Core framework, 2026-07): a szerver ADAT-környezete (a mögöttes DB PROD-e),
|
|
// NEM build-konfiguráció. Delegát az egy-forrás keret-állapotra (fail-fast + változás-esemény) — a hívóhelyek
|
|
// változatlanok. Az érték forrása: a FruitBankSignalRClient a kapcsolat felépülésekor hidratál (EnsureEnvironmentAsync).
|
|
public static bool IsProd => AcEnv.IsProdDb;
|
|
public static bool IsProdHydrated => AcEnv.IsProdDbHydrated;
|
|
public static void SetIsProd(bool isProd) => AcEnv.SetIsProdDb(isProd);
|
|
|
|
public static event Action<bool>? IsProdChanged
|
|
{
|
|
add => AcEnv.IsProdDbChanged += value;
|
|
remove => AcEnv.IsProdDbChanged -= value;
|
|
}
|
|
|
|
public static string DefaultHubName = "fbHub";
|
|
public static string LoggerHubName = "loggerHub";
|
|
|
|
public static bool SignalRSerializerDiagnosticLog = false;
|
|
public static long SignalRKeepAliveIntervalSecond = 60;
|
|
public static long SignarlRTimeoutIntervalSecond = 180;
|
|
|
|
public const string PalletDbTableName = "fbPallet";
|
|
public const string FilesDbTableName = "fbFiles";
|
|
public const string PartnerDbTableName = "fbPartner";
|
|
public const string PartnerDepotDbTableName = "fbPartnerDepot";
|
|
|
|
public const string EkaerHistoryDbTableName = "fbEkaerHistory";
|
|
public const string EkaerHistoryMappingDbTableName = "fbEkaerHistoryMapping";
|
|
|
|
public const string OrderItemPalletDbTableName = "fbOrderItemPallet";
|
|
|
|
public const string ShippingDbTableName = "fbShipping";
|
|
public const string ShippingItemDbTableName = "fbShippingItem";
|
|
public const string ShippingItemPalletDbTableName = "fbShippingItemPallet";
|
|
public const string ShippingDocumentDbTableName = "fbShippingDocument";
|
|
public const string ShippingDocumentToFilesDbTableName = "fbShippingDocumentToFiles";
|
|
|
|
public const string StockQuantityHistoryExtDbTableName = "fbStockQuantityHistoryExt";
|
|
|
|
public const string StockTakingDbTableName = "fbStockTaking";
|
|
public const string StockTakingItemDbTableName = "fbStockTakingItem";
|
|
public const string StockTakingItemPalletDbTableName = "fbStockTakingItemPallet";
|
|
|
|
public const string CustomerCreditDbTableName = "fbCustomerCredit";
|
|
public const string PreOrderDbTableName = "fbPreOrder";
|
|
public const string PreOrderItemDbTableName = "fbPreOrderItem";
|
|
|
|
public const string CargoPartnerDbTableName = "fbCargoPartner";
|
|
public const string CargoTruckDbTableName = "fbCargoTruck";
|
|
|
|
public const string OrderDraftDbTableName = "fbOrderDraft";
|
|
public const string OrderDraftItemDbTableName = "fbOrderDraftItem";
|
|
public const string ExternalUserPartnerMapDbTableName = "fbExternalUserPartnerMapping";
|
|
public const string ProductTextMappingDbTableName = "fbProductTextMapping";
|
|
|
|
public const string DomainDescription = "This is a nopCommerce plugin developed for FruitBank, a fruit and vegetable wholesaler. The plugin manages supplier inbound delivery (receiving), warehouse weighing (net/gross/pallet/tare weights), and inventory stocktaking. The business logic is centered around FruitBank's requirement for precise physical measurement and quantity tracking.";
|
|
|
|
//public static Guid[] DevAdminIds = new Guid[2] { Guid.Parse("dcf451d2-cc4c-4ac2-8c1f-da00041be1fd"), Guid.Parse("4cbaed43-2465-4d99-84f1-c8bc6b7025f7") };
|
|
//public static Guid[] SysAdmins = new Guid[3]
|
|
//{
|
|
// Guid.Parse("dcf451d2-cc4c-4ac2-8c1f-da00041be1fd"),
|
|
// Guid.Parse("4cbaed43-2465-4d99-84f1-c8bc6b7025f7"),
|
|
// Guid.Parse("540271f6-c604-4c16-8160-d5a7cafedf00")
|
|
//};
|
|
//public static Dictionary<string, Guid> SysAccounts = new Dictionary<string, Guid>
|
|
//{
|
|
// { "SystemEmailSender", Guid.Parse("5e13e051-4fd6-4a30-a371-75cc785cfb84")},
|
|
//};
|
|
|
|
public static string WelcomeEmailTemplateName = "WelcomeEmailTemplate";
|
|
public static string NewTransferEmailTemplateName = "NewTransferEmailTemplate";
|
|
public static string TransferModifiedEmailTemplateName = "TramsferModifiedEmailTemplate";
|
|
public static string ForgotPasswordEmailTemplateName = "ForgotPasswordEmailTemplate";
|
|
public static string GeneralEmailTemplateName = "GeneralEmailTemplate";
|
|
|
|
public static List<string> WelcomeEmailParameters = new List<string>()
|
|
{
|
|
"UserName",
|
|
"SettingBaseUrl",
|
|
"UserId",
|
|
"Token"
|
|
};
|
|
|
|
public static List<string> ForgotPasswordEmailParameters = new List<string>()
|
|
{
|
|
//string userName, string settingBaseUrl, string userId, string token
|
|
"UserName",
|
|
"SettingBaseUrl",
|
|
"UserId",
|
|
"Token"
|
|
};
|
|
|
|
public static List<string> NewTransferEmailParameters = new List<string>()
|
|
{
|
|
//string userName, string fromAddress, string toAddress, string appointment,
|
|
//string fullname,string passengerCount, string luggageCount, string settingBaseUrl, string transferId
|
|
"UserName",
|
|
"FromAddress",
|
|
"ToAddress",
|
|
"Appointment",
|
|
"FullName",
|
|
"PassengerCount",
|
|
"LuggageCount",
|
|
"SettingBaseUrl",
|
|
"TransferId"
|
|
};
|
|
|
|
public static List<string> GeneralEmailParameters = new List<string>()
|
|
{
|
|
//string userName, string settingBaseUrl, string userId, string token
|
|
"UserName",
|
|
"MessageBody",
|
|
"SettingBaseUrl",
|
|
"UserId"
|
|
};
|
|
|
|
#if RELEASE
|
|
public static string SystemEmailAddress = "test@touriam.com";
|
|
public static LogLevel DefaultLogLevelClient = LogLevel.Debug;
|
|
#else
|
|
public static string SystemEmailAddress = "test@touriam.com";
|
|
public static LogLevel DefaultLogLevelClient = LogLevel.Detail;
|
|
#endif
|
|
}
|
|
|
|
|