ZrAdminNetCore/Infrastructure/OptionsSetting.cs
2022-04-10 09:46:55 +08:00

76 lines
2.1 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

namespace Infrastructure
{
/// <summary>
/// 获取配置文件POCO实体类
/// </summary>
public class OptionsSetting
{
public static string ConnAdmin = "conn_zrAdmin";
public static string ConnDbType = "conn_zrAdmin_type";
public static string ConnBus = "conn_bus";
public static string ConnBusDbType = "conn_bus_type";
public string Redis { get; set; }
public string Database { get; set; }
/// <summary>
/// 是否演示模式
/// </summary>
public bool DemoMode { get; set; }
public MailOptions MailOptions { get; set; }
public Upload Upload { get; set; }
public ALYUN_OCS ALYUN_OCS { get; set; }
public JwtSettings JwtSettings { get; set; }
}
/// <summary>
/// 发送邮件数据配置
/// </summary>
public class MailOptions
{
public string From { get; set; }
public string Password { get; set; }
public string Smtp { get; set; }
public int Port { get; set; }
}
/// <summary>
/// 上传
/// </summary>
public class Upload
{
public string UploadDirectory { get; set; }
public string UploadUrl { get; set; }
}
/// <summary>
/// 阿里云存储
/// </summary>
public class ALYUN_OCS
{
public string REGIONID { get; set; }
public string KEY { get; set; }
public string SECRET { get; set; }
}
/// <summary>
/// Jwt
/// </summary>
public class JwtSettings
{
/// <summary>
/// token是谁颁发的
/// </summary>
public string Issuer { get; set; }
/// <summary>
/// token可以给那些客户端使用
/// </summary>
public string Audience { get; set; }
/// <summary>
/// 加密的keySecretKey必须大于16个,是大于,不是大于等于)
/// </summary>
public string SecretKey { get; set; }
/// <summary>
/// token时间
/// </summary>
public int Expire { get; set; } = 1440;
}
}