上货增加用户上货 一部分配置 统一下发到用户
This commit is contained in:
1 parent
ca37be31c6
commit
65cbb347e1
9 files changed
+4124
-3364
No files matched your search
@@ -0,0 +1,51 @@
|
||||
using CefSharp.DevTools.IndexedDB;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Work;
|
||||
|
||||
/// <summary>
|
||||
/// 主账号云端配置
|
||||
/// </summary>
|
||||
public class UserConfig
|
||||
{
|
||||
public const string SensitiveWordsKey = "SensitiveWords";
|
||||
public const string UseOrderReturnWarehouseAddressKey = "UseOrderReturnWarehouseAddress";
|
||||
|
||||
public Dictionary<string, ConfigItem> Configs { get; set; } = [];
|
||||
public ConfigItem this[string key]
|
||||
{
|
||||
get => Configs.TryGetValue(key, out var item) ? item : null;
|
||||
}
|
||||
public bool TryGetConfig(string key, out ConfigItem item)
|
||||
{
|
||||
return Configs.TryGetValue(key, out item);
|
||||
}
|
||||
public enum InheritPolicy
|
||||
{
|
||||
/// <summary>
|
||||
/// 自由
|
||||
/// </summary>
|
||||
Free = 0,
|
||||
/// <summary>
|
||||
/// 锁定
|
||||
/// </summary>
|
||||
Locked = 1,
|
||||
/// <summary>
|
||||
/// 追加
|
||||
/// </summary>
|
||||
AppendOnly = 2
|
||||
}
|
||||
|
||||
|
||||
public class ConfigItem
|
||||
{
|
||||
public string Key { get; set; }
|
||||
public string Value { get; set; }
|
||||
public InheritPolicy Policy { get; set; } = InheritPolicy.Free;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user