using System; using System.Collections.Generic; using MongoDB.Bson.Serialization.Attributes; using ProtoBuf; namespace ET { [ProtoContract] [Config] public partial class StartGlobalConfigCategory : ProtoObject, IMerge { public static StartGlobalConfigCategory Instance; [ProtoIgnore] [BsonIgnore] private Dictionary dict = new Dictionary(); [BsonElement] [ProtoMember(1)] private List list = new List(); public StartGlobalConfigCategory() { Instance = this; } public void Merge(object o) { StartGlobalConfigCategory s = o as StartGlobalConfigCategory; this.list.AddRange(s.list); } public override void EndInit() { foreach (StartGlobalConfig config in list) { config.EndInit(); this.dict.Add(config.Id, config); } this.AfterEndInit(); } public StartGlobalConfig Get(int id) { this.dict.TryGetValue(id, out StartGlobalConfig item); if (item == null) { throw new Exception($"配置找不到,配置表名: {nameof (StartGlobalConfig)},配置id: {id}"); } return item; } public bool Contain(int id) { return this.dict.ContainsKey(id); } public Dictionary GetAll() { return this.dict; } public StartGlobalConfig GetOne() { if (this.dict == null || this.dict.Count <= 0) { return null; } return this.dict.Values.GetEnumerator().Current; } } [ProtoContract] public partial class StartGlobalConfig: ProtoObject, IConfig { /// Id [ProtoMember(1)] public int Id { get; set; } /// 公众号或小程序的唯一标识 [ProtoMember(2)] public string VxAppId { get; set; } /// 商户号 [ProtoMember(3)] public string VxMchId { get; set; } /// 微信V2key [ProtoMember(4)] public string VxV2Key { get; set; } /// 微信V3key [ProtoMember(5)] public string VxV3Key { get; set; } /// 回调通知url [ProtoMember(6)] public string VxNotifyUrl { get; set; } /// appId [ProtoMember(7)] public string AppId { get; set; } /// 应用私钥 [ProtoMember(8)] public string AliPrivateKey { get; set; } /// 支付宝公钥 [ProtoMember(9)] public string AlipayPublicKey { get; set; } /// 后台游戏服务key [ProtoMember(10)] public string LogReportKey { get; set; } /// 后台游戏服务Ip端口 [ProtoMember(11)] public string GmGameServeIp { get; set; } /// 芭乐安卓sdk支付KEY [ProtoMember(12)] public string BaLeAndroidSdkPayKey { get; set; } /// 芭乐苹果sdk支付KEY [ProtoMember(13)] public string BaLeIosSdkPayKey { get; set; } /// OBS访问密钥ID [ProtoMember(14)] public string AccessKeyID { get; set; } /// OBS密钥 [ProtoMember(15)] public string SecretAccessKey { get; set; } /// OBS桶 [ProtoMember(16)] public string BucketName { get; set; } /// OBS相册存储对象 [ProtoMember(17)] public string ObjectName { get; set; } /// OBS访问url [ProtoMember(18)] public string ObsUrl { get; set; } /// QuickMd5Key [ProtoMember(19)] public string QuickMd5Key { get; set; } /// QuickCallbackKey [ProtoMember(20)] public string QuickCallbackKey { get; set; } /// TapTapServerSecret [ProtoMember(21)] public string TapTapServerSecret { get; set; } /// IOS颁发者Id [ProtoMember(22)] public string IosIssIssuer { get; set; } /// IOS私钥Id [ProtoMember(23)] public string IosKeyId { get; set; } /// IosBundleId包名 [ProtoMember(24)] public string IosBundleId { get; set; } /// IosPrivateKey苹果私钥 [ProtoMember(25)] public string IosPrivateKey { get; set; } /// 防沉迷游戏备案识别码 [ProtoMember(26)] public string BizId { get; set; } /// 防沉迷用户密钥 [ProtoMember(27)] public string SecretKey { get; set; } /// 单个scens最大在线人数 [ProtoMember(28)] public int QueueSingleSceneMaxOnline { get; set; } /// 间隔放人时间(毫秒) [ProtoMember(29)] public int QueueTickTime { get; set; } /// 每次放几个人 [ProtoMember(30)] public int QueueTickeCount { get; set; } /// 更新排名的时间的间隔(毫秒) [ProtoMember(31)] public int QueueTickUpdate { get; set; } /// 掉线保护检测时间(毫秒) [ProtoMember(32)] public int QueueClearProtect { get; set; } /// 掉线保护时长5分钟(毫秒) [ProtoMember(33)] public int QueueProtectTime { get; set; } /// 错误上报 [ProtoMember(34)] public string ErrorReportUrl { get; set; } /// 开启上报 [ProtoMember(35)] public string OpenReportUrl { get; set; } /// 关闭上报 [ProtoMember(36)] public string CloseReportUrl { get; set; } /// 外网被探测上报 [ProtoMember(37)] public string DetectionReportUrl { get; set; } /// 外网订单报错上报 [ProtoMember(38)] public string OrderReportUrl { get; set; } /// 热更配置通知 [ProtoMember(39)] public string ReloadSqliteConfigReportUrl { get; set; } /// 配置版本号 [ProtoMember(40)] public string Version { get; set; } } }