using System; using System.Collections.Generic; using System.Text; namespace Common { /// /// 站点配置 /// public class WebConfig { #region Email服务器配置 #endregion /// /// 钉钉机器人推送地址 预警发送地址 /// public string ServerWarnApiUrl { get; set; } /// /// 重点错预警URl /// public string ServerWarnApiUrlErr { get; set; } /// /// 关键字 /// public string ServerWarnKey { get; set; } /// /// 授权认证服务器url /// public string IdentServerUrl { get; set; } /// /// 站点ID /// public int WebId { get; set; } = 0; /// /// 是否是开发环境 /// public bool IsDev { get; set; } = false; /// /// 站点名称 /// public string WebName { get; set; } = ""; /// /// web站点跟目录 /// public string WebHostUrl { get; set; } = ""; /// /// 站点所在城市 省|市|区 /// public string Area { get; set; } = ""; /// ///RedisUrl地址 /// public string Redis { get; set; } = ""; /// /// reids DB 编号 /// public int RedisDb { get; set; } = 0; /// /// RabbitMQ Server /// public string Rbmq_Host { get; set; } = ""; /// ///RabbitMQ 用户名 /// public string Rbmq_UserName { get; set; } = ""; /// ///RabbitMQ 密码 /// public string Rbmq_Password{ get; set; } = ""; /// /// RabbitMQ 持久化数据库链接 /// public string Rbmq_Sqlhost { get; set; } = ""; /// /// 默认数据库连接名称 /// public string ConnName { get; set; } = "sysdb"; /// /// 数据库连接队列 /// public List DataConnList { get; set; } = new List(); /// /// 配置数据列表 /// public Dictionary ConfigList{ get; set; } /// /// 配置数的初始化状态 /// public bool ConfigInitStatus { get; set; } = false; public int ConfigInitcount { get; set; } /// /// Des加密解密密钥16位 /// public string DesKey { get; set; } = ""; /// /// 最大数量 /// public int Maxcount { get; set; } /// /// 登录超时时间 /// public int LoginAutoOutTime { get; set; } = 10; /// /// /// public int ShopPower { get; set; } = 2; #region jwt认证配置 /// /// jwt发行者 /// public string jwt_Issuer { get; set; } = ""; /// /// jwt订阅者 /// public string jwt_Audience { get; set; } = ""; /// /// jwt过期的时间间隔分钟 /// public int jwt_Expiration { get; set; } =1440; /// /// jwt私钥密钥 /// public string jwt_Secretkey { get; set; } = ""; /// /// 系统脏字过滤关键字列表中间用,或|间隔 /// public string StrFilte { get; set; } = ""; /// /// 系统脏字过滤关键字列表 /// public string[] FilteArray { get { return StrFilte.IndexOf(',') >= 0?StrFilte.Split(','): StrFilte.Split('|'); } } #endregion #region 缓存配置 /// /// 是否开启缓存 /// public bool cache_open { get; set; } = false; /// /// 统一的缓存短时间 单位秒 /// public int cache_time { get; set; } = 60; /// /// 统一的缓存长时间 单位秒 /// public int cache_timemax { get; set; } = 600; /// /// 是否启动redis缓存,否则为内存缓存 /// public bool cache_IsRedis { get; set; } = false; /// /// redis URl /// public string cache_Redis_Host { get; set; } = ""; /// /// redis端口号 /// public int cache_redis_Poit { get; set; } = 6379; /// /// redis密码 /// public string cache_redis_Passwrod { get; set; } = ""; /// /// 使用的redis InstanceName /// public string cache_Redis_InstanceName { get; set; } = "web"; #endregion } }