using Microsoft.Extensions.Configuration;
using MoYu.ConfigurableOptions;

namespace SafeCampus.Core.Options;

public class TXSmsOptions : IConfigurableOptionsListener<TXSmsOptions>
{
    /// <summary>
    /// 腾讯云API密钥 SecretId
    /// </summary>
    public string SecretId { get; set; }

    /// <summary>
    /// 腾讯云API密钥 SecretKey
    /// </summary>
    public string SecretKey { get; set; }

    /// <summary>
    /// 腾讯云短信 Appid
    /// </summary>
    public string SmsAppId { get; set; }

    /// <summary>
    /// 腾讯云短信 签名
    /// </summary>
    public string SmsSn { get; set; }

    /// <summary>
    /// 验证码模板id
    /// </summary>
    public string VerificationCodeId { get; set; }

    public void PostConfigure(TXSmsOptions options, IConfiguration configuration)
    {
       
    }

    public void OnListener(TXSmsOptions options, IConfiguration configuration)
    {
        SecretId=options.SecretId;
        SecretKey=options.SecretKey;
        SmsAppId=options.SmsAppId;
        SmsSn=options.SmsSn;
        VerificationCodeId = options.VerificationCodeId;
    }
}