
using Microsoft.Extensions.Configuration;
using System;
using System.Collections.Generic;
using System.Text;

namespace ASHermed.SinoInterface.Tools
{
    /// <summary>
    /// 项目配置
    /// </summary>
    public class AppConfigurtaion
    {
        public IConfiguration Configuration { get; set; }

        public AppConfigurtaion(IConfiguration configuration)
        {
            Configuration = configuration;

        }
        public string GetAppSetting(string key, string defaultValue)
        {
            string value = Configuration["AppSettings:" + key + ""];
            if (value.IsNullOrEmpty())
            {
                value = defaultValue;
            }
            return value;
        }
        /// <summary>
        /// 接口地址
        /// </summary>
        public string GetCodePeriod
        {
            get { return GetAppSetting("CodePeriod", ""); }
        }

        /// <summary>
        /// 本地地址
        /// </summary>
        public string GetSetDomain
        {
            get { return GetAppSetting("SetDomain", ""); }
        }
        /// <summary>
        /// 对应页面地址
        /// </summary>
        public string GetSetViewDomain
        {
            get { return GetAppSetting("SetViewDomain", ""); }
        }
        public string GetPayReturnUrl
        {
            get { return GetAppSetting("PayReturnUrl", ""); }
        }
        /// <summary>
        /// 短信验证码 位数
        /// </summary>
        public string GetCodeDigit
        {
            get { return GetAppSetting("CodeDigit", ""); }
        }

        /// <summary>
        /// 获取短信模版(中文)
        /// </summary>
        public string GetCnCodeTemp
        {
            get { return GetAppSetting("CnCodeTemp", ""); }
        }

        /// <summary>
        /// 获取短信模版(英文)
        /// </summary>
        public string GetEnCodeTemp
        {
            get { return GetAppSetting("EnCodeTemp", ""); }
        }

        /// <summary>
        /// 是否有优惠券
        /// </summary>
        public string GetNewCouponsOn
        {
            get { return GetAppSetting("NewCouponsOn", ""); }
        }
        /// <summary>
        /// 优惠券IDs
        /// </summary>
        public string GetNewCouponsId
        {
            get { return GetAppSetting("NewCouponsId", ""); }
        }
        /// <summary>
        /// 兑换码长度
        /// </summary>
        public string GetCodeLen
        {
            get { return GetAppSetting("CodeLen", ""); }
        }

        /// <summary>
        /// 腾讯IM_Id用户名前缀
        /// </summary>
        public string GetTencentUserPrefix
        {
            get { return GetAppSetting("TencentUserPrefix", ""); }
        }
        /// <summary>
        /// 腾讯appid
        /// </summary>
        public string GetTencentAppid
        {
            get { return GetAppSetting("TencentAppid", ""); }
        }
        /// <summary>
        /// 腾讯key
        /// </summary>
        public string GetTencentKey
        {
            get { return GetAppSetting("TencentKey", ""); }
        }
        /// <summary>
        /// 腾讯签名时间
        /// </summary>
        public string GetTencentSignTime
        {
            get { return GetAppSetting("TencentSignTime", ""); }
        }
        /// <summary>
        /// 腾讯admin
        /// </summary>
        public string GetTencentAdmin
        {
            get { return GetAppSetting("TencentAdmin", ""); }
        }
        /// <summary>
        /// 腾讯导入URL
        /// </summary>
        public string GetTencentUrl
        {
            get { return GetAppSetting("TencentUrl", ""); }
        }
        /// <summary>
        /// 助通短信账户
        /// </summary>
        public string GetZhuTongUserName
        {
            get { return GetAppSetting("ZhuTongUserName", ""); }
        }
        /// <summary>
        /// 助通短信密码
        /// </summary>
        public string GetZhuTongPassword
        {
            get { return GetAppSetting("ZhuTongPassword", ""); }
        }
        /// <summary>
        /// 助通短信url
        /// </summary>
        public string GetZhuTongSMSUrl
        {
            get { return GetAppSetting("ZhuTongSMSUrl", ""); }
        }
        /// <summary>
        /// 助通短信中文签名
        /// </summary>
        public string GetZhuTongSMSCNSgin
        {
            get { return GetAppSetting("ZhuTongSMSCNSgin", ""); }
        }
        /// <summary>
        /// 助通短信英文签名
        /// </summary>
        public string GetZhuTongSMSENSgin
        {
            get { return GetAppSetting("ZhuTongSMSENSgin", ""); }
        }

        /// <summary>
        /// 预约开关
        /// </summary>
        public string GetAptSwichOn
        {
            get { return GetAppSetting("AptSwichOn", ""); }
        }
        public string GetAptSmsOn
        {
            get { return GetAppSetting("AptSmsOn", ""); }
        }
        /// <summary>
        /// 预约短信模版
        /// </summary>
        public string GetAptUserCommitSmsTemplateForCNFemale
        {
            get { return GetAppSetting("AptUserCommitSmsTemplateForCNFemale", ""); }
        }
        /// <summary>
        /// 预约短信模版
        /// </summary>
        public string GetAptUserCommitSmsTemplateForCNMan
        {
            get { return GetAppSetting("AptUserCommitSmsTemplateForCNMan", ""); }
        }
        /// <summary>
        /// 预约短信模版
        /// </summary>
        public string GetAptUserCommitSmsTemplateForENFemale
        {
            get { return GetAppSetting("AptUserCommitSmsTemplateForENFemale", ""); }
        }
        /// <summary>
        /// 预约短信模版
        /// </summary>
        public string GetAptUserCommitSmsTemplateForENMan
        {
            get { return GetAppSetting("AptUserCommitSmsTemplateForENMan", ""); }
        }

        /// <summary>
        /// 预约推送到用户的编码
        /// </summary>
        public string GetWXAptTitleCode
        {
            get { return GetAppSetting("WXAptTitleCode", ""); }
        }
        /// <summary>
        /// 预约推送到用户的英文台头
        /// </summary>
        public string GetWXEnAptTitle
        {
            get { return GetAppSetting("WXEnAptTitle", ""); }
        }
        /// <summary>
        /// 预约推送到用户的中文台头
        /// </summary>
        public string GetWXAptTitle
        {
            get { return GetAppSetting("WXAptTitle", ""); }
        }

        public string GetWXAptNameCode
        {
            get { return GetAppSetting("WXAptNameCode", ""); }
        }
        public string GetWXAptPhoneCode
        {
            get { return GetAppSetting("WXAptPhoneCode", ""); }
        }
        public string GetWXAptTimeCode
        {
            get { return GetAppSetting("WXAptTimeCode", ""); }
        }
        public string GetWXAptRemarkCode
        {
            get { return GetAppSetting("WXAptRemarkCode", ""); }
        }

        public string GetWXEnAptRemark
        {
            get { return GetAppSetting("WXEnAptRemark", ""); }
        }
        public string GetWXAptRemark
        {
            get { return GetAppSetting("WXAptRemark", ""); }
        }
        public string GetWXAptTempId
        {
            get { return GetAppSetting("WXAptTempId", ""); }
        }
        public string GetWXOnlineTempId
        {//线上微信模版ID
            get { return GetAppSetting("WXOnlineTempId", ""); }
        }
        public string GetAptDetailPagePath
        {
            get { return GetAppSetting("AptDetailPagePath", ""); }
        }

        /// <summary>
        /// 微信小程序ID
        /// </summary>
        public string GetAPPId
        {
            get { return GetAppSetting("APPId", ""); }
        }
        /// <summary>
        /// 微信小程序密码
        /// </summary>
        public string GetAPPSecret
        {
            get { return GetAppSetting("APPSecret", ""); }
        }

        /// <summary>
        /// TC接口TUSERNAME
        /// </summary>
        public string GetTCUserName
        {
            get { return GetAppSetting("TCUserName", ""); }
        }
        /// <summary>
        /// TC接口TPASSWORD
        /// </summary>
        public string GetTCPassWord
        {
            get { return GetAppSetting("TCPassWord", ""); }
        }
        /// <summary>
        /// 快速预约短信模板
        /// </summary>
        public string GetCNQuickTemp
        {
            get { return GetAppSetting("CNQuickTemp", ""); }
        }

        /// <summary>
        /// 预约推送到助手--周日18点~周六17点59分59秒
        /// </summary>
        public string GetWXServOpenIdWeekDay
        {
            get { return GetAppSetting("WXServOpenIdWeekDay", ""); }
        }
        /// <summary>
        /// 预约推送到助手
        /// </summary>
        public string GetWXServOpenIdWeekEnd
        {
            get { return GetAppSetting("WXServOpenIdWeekEnd", ""); }
        }
        /// <summary>
        /// 预约推送到助手
        /// </summary>
        public string GetWXServAptTempId
        {
            get { return GetAppSetting("WXServAptTempId", ""); }
        }


        /// <summary>
        /// 3.预约推送到助手
        /// </summary>
        public string GetWXServAptTitleCode
        {
            get { return GetAppSetting("WXServAptTitleCode", ""); }
        }
        /// <summary>
        /// 3.预约推送到助手
        /// </summary>
        public string GetWXServAptTitle
        {
            get { return GetAppSetting("WXServAptTitle", ""); }
        }
        /// <summary>
        /// 3.预约推送到助手
        /// </summary>
        public string GetWXServAptNameCode
        {
            get { return GetAppSetting("WXServAptNameCode", ""); }
        }
        /// <summary>
        /// 3.预约推送到助手
        /// </summary>
        public string GetWXServAptPhoneCode
        {
            get { return GetAppSetting("WXServAptPhoneCode", ""); }
        }
        /// <summary>
        /// 3.预约推送到助手
        /// </summary>
        public string GetWXServAptTimeCode
        {
            get { return GetAppSetting("WXServAptTimeCode", ""); }
        }
        /// <summary>
        /// 3.预约推送到助手
        /// </summary>
        public string GetWXServAptRemarkCode
        {
            get { return GetAppSetting("WXServAptRemarkCode", ""); }
        }
        /// <summary>
        /// 中台基础数据URL
        /// </summary>
        public string GetBasicdataURL
        {
            get { return GetAppSetting("Basicdata", ""); }
        }

        /// <summary>
        /// 视频问诊
        /// </summary>
        public string AptType1
        {
            get { return GetAppSetting("AptType1", ""); }
        }
        public string AptType2
        {
            get { return GetAppSetting("AptType2", ""); }
        }
        public string AptType3
        {
            get { return GetAppSetting("AptType3", ""); }
        }

        public string GetCignaAddress
        {
            get { return GetAppSetting("CignaAddress", ""); }
        }
        public string GetSinoPrivateKey
        {
            get { return GetAppSetting("SinoPrivateKey", ""); }
        }
        public string GetSinoPublicKey
        {
            get { return GetAppSetting("SinoPublicKey", ""); }
        }
        public string GetCignaPublicKey
        {
            get { return GetAppSetting("CignaPublicKey", ""); }
        }
        /// <summary>
        /// 获取微信小程序appId
        /// </summary>
        public string GetWXAppletId
        {
            get { return GetAppSetting("WXAppletId", ""); }
        }
        /// <summary>
        /// 获取小程序secret
        /// </summary>
        public string GetWXAppletSecret
        {
            get { return GetAppSetting("WXAppletSecret", ""); }
        }

        /// <summary>
        /// Android最低接口版本号
        /// </summary>
        public string GetInterfaceAndVersion
        {
            get { return GetAppSetting("InterfaceAndVersion", ""); }
        }

        /// <summary>
        /// IOS最低接口版本号
        /// </summary>
        public string GetInterfaceIosVersion
        {
            get { return GetAppSetting("InterfaceIosVersion", ""); }
        }
        /// <summary>
        /// 就诊前一天12点短信
        /// </summary>
        public string GetAptTheDayBeforeCn
        {
            get { return GetAppSetting("AptTheDayBeforeCn", ""); }
        }
        /// <summary>
        /// 就诊前一天12点短信
        /// </summary>
        public string GetAptTheDayBeforeEn
        {
            get { return GetAppSetting("AptTheDayBeforeEn", ""); }
        }
        /// <summary>
        /// 就诊前一天12点短信
        /// </summary>
        public string GetAptUserTomorrowConfirmSmsTemplateEN
        {
            get { return GetAppSetting("AptUserTomorrowConfirmSmsTemplateEN", ""); }
        }
        /// <summary>
        /// 就诊前一天12点短信
        /// </summary>
        public string GetAptUserTomorrowConfirmSmsTemplateCN
        {
            get { return GetAppSetting("AptUserTomorrowConfirmSmsTemplateCN", ""); }
        }

        /// <summary>
        /// 获取APPH5域名
        /// </summary>
        public string GetSionViewDomain
        {
            get { return GetAppSetting("SionViewDomain", ""); }
        }

    }
}
