using System.Collections.Generic;
namespace Infrastructure.Model
{
///
/// 获取配置文件POCO实体类
///
public class OptionsSetting
{
///
/// 是否单点登录
///
public bool SingleLogin { get; set; }
///
/// 是否演示模式
///
public bool DemoMode { get; set; }
///
/// 初始化db
///
public bool InitDb { get; set; }
public MailOptions MailOptions { get; set; }
public Upload Upload { get; set; }
public ALIYUN_OSS ALIYUN_OSS { get; set; }
public JwtSettings JwtSettings { get; set; }
public CodeGen CodeGen { get; set; }
public List DbConfigs { get; set; }
public DbConfigs CodeGenDbConfig { get; set; }
}
///
/// 发送邮件数据配置
///
public class MailOptions
{
public string FromName { get; set; }
public string FromEmail { get; set; }
public string Password { get; set; }
public string Smtp { get; set; }
public int Port { get; set; }
public bool UseSsl { get; set; }
public string Signature { get; set; }
}
///
/// 上传
///
public class Upload
{
public string UploadUrl { get; set; }
public string LocalSavePath { get; set; }
public int MaxSize { get; set; }
public string[] NotAllowedExt { get; set; } = new string[0];
}
///
/// 阿里云存储
///
public class ALIYUN_OSS
{
public string REGIONID { get; set; }
public string KEY { get; set; }
public string SECRET { get; set; }
public string BucketName { get; set; }
public string DomainUrl { get; set; }
public int MaxSize { get; set; } = 100;
}
///
/// Jwt
///
public class JwtSettings
{
///
/// token是谁颁发的
///
public string Issuer { get; set; }
///
/// token可以给那些客户端使用
///
public string Audience { get; set; }
///
/// 加密的key(SecretKey必须大于16个,是大于,不是大于等于)
///
public string SecretKey { get; set; }
///
/// token时间(分)
///
public int Expire { get; set; } = 1440;
///
/// 刷新token时长
///
public int RefreshTokenTime { get; set; }
///
/// token类型
///
public string TokenType { get; set; } = "Bearer";
}
public class CodeGen
{
public bool ShowApp { get; set; }
public bool AutoPre { get; set; }
public string VuePath { get; set; }
public string Author { get; set; }
public string TablePrefix { get; set; }
public string ModuleName { get; set; }
public int FrontTpl { get; set; }
public CsharpTypeArr CsharpTypeArr { get; set; }
}
public class DbConfigs
{
public string Conn { get; set; }
public int DbType { get; set; }
public string ConfigId { get; set; }
public bool IsAutoCloseConnection { get; set; }
public string DbName { get; set; }
}
public class CsharpTypeArr
{
public string[] String { get; set; }
public string[] Int { get; set; }
public string[] Long { get; set; }
public string[] DateTime { get; set; }
public string[] Float { get; set; }
public string[] Decimal { get; set; }
public string[] Bool { get; set; }
}
}