You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

246 lines
5.9 KiB

using Furion.ConfigurableOptions;
using System.Collections.Generic;
namespace GDZZ.Core;
/// <summary>
/// 缓存配置
/// </summary>
public class CacheOptions : IConfigurableOptions
{
/// <summary>
/// 缓存类型
/// </summary>
public CacheType CacheType { get; set; }
/// <summary>
/// Redis配置
/// </summary>
public string RedisConnectionString { get; set; }
}
/// <summary>
/// 系统配置
/// </summary>
public class SystemSettingsOptions : IConfigurableOptions
{
/// <summary>
/// 超管是否可以查看所有租户的数据
/// </summary>
public bool SuperAdminViewAllData { get; set; }
/// <summary>
/// 是否开启全局请求日志
/// </summary>
public bool IsGlobalRequestLog { get; set; }
}
/// <summary>
/// 雪花Id配置
/// </summary>
public class SnowIdOptions : IConfigurableOptions
{
/// <summary>
/// 取值范围0~63,默认1
/// </summary>
public string WorkerId { get; set; } = "1";
}
/// <summary>
/// 第三方配置
/// </summary>
public class OAuthOptions : IConfigurableOptions
{
/// <summary>
///微信
/// </summary>
public ThirdParty Wechat { get; set; }
/// <summary>
/// 微信支付
/// </summary>
public SenparcWeixinSetting SenparcWeixin { get; set; }
}
/// <summary>
/// 上传文件
/// </summary>
public class UploadFileOptions : IConfigurableOptions
{
/// <summary>
/// 阿里云
/// </summary>
public FileDescription Aliyun { get; set; }
/// <summary>
/// 头像
/// </summary>
public FileDescription Avatar { get; set; }
/// <summary>
/// 文档
/// </summary>
public FileDescription Document { get; set; }
/// <summary>
/// 商店
/// </summary>
public FileDescription Shop { get; set; }
/// <summary>
/// 编辑器
/// </summary>
public FileDescription Editor { get; set; }
/// <summary>
/// 默认
/// </summary>
public FileDescription Default { get; set; }
}
/// <summary>
/// 数据库配置
/// </summary>
public class ConnectionStringsOptions : IConfigurableOptions
{
/// <summary>
/// 默认数据库编号
/// </summary>
public string DefaultDbNumber { get; set; }
/// <summary>
/// 默认数据库类型
/// </summary>
public string DefaultDbType { get; set; }
/// <summary>
/// 默认数据库连接字符串
/// </summary>
public string DefaultDbString { get; set; }
/// <summary>
/// 业务库集合
/// </summary>
public List<DbConfig> DbConfigs { get; set; }
}
/// <summary>
/// JWT配置
/// </summary>
public class JWTSettingsOptions : IConfigurableOptions
{
/// <summary>
/// 是否验证密钥
/// </summary>
public bool ValidateIssuerSigningKey { get; set; }
/// <summary>
/// 密钥
/// </summary>
public string IssuerSigningKey { get; set; }
/// <summary>
/// 是否验证签发方
/// </summary>
public bool ValidateIssuer { get; set; }
/// <summary>
/// 签发方
/// </summary>
public string ValidIssuer { get; set; }
/// <summary>
/// 是否验证签收方
/// </summary>
public bool ValidateAudience { get; set; }
/// <summary>
/// 签收方
/// </summary>
public string ValidAudience { get; set; }
/// <summary>
/// 是否验证过期时间
/// </summary>
public bool ValidateLifetime { get; set; }
/// <summary>
/// 过期时间
/// </summary>
public long ExpiredTime { get; set; }
/// <summary>
/// 过期时间容错值
/// </summary>
public long ClockSkew { get; set; }
}
/// <summary>
/// 数据库参数
/// </summary>
public class DbConfig
{
/// <summary>
/// 数据库编号
/// </summary>
public string DbNumber { get; set; }
/// <summary>
/// 数据库类型
/// </summary>
public string DbType { get; set; }
/// <summary>
/// 数据库连接字符串
/// </summary>
public string DbString { get; set; }
}
/// <summary>
/// 文件参数
/// </summary>
public class FileDescription
{
/// <summary>
/// 路径
/// </summary>
public string path { get; set; }
/// <summary>
/// 大小
/// </summary>
public long maxSize { get; set; }
/// <summary>
/// 类型
/// </summary>
public string[] contentType { get; set; }
}
/// <summary>
/// 第三方参数
/// </summary>
public class ThirdParty
{
/// <summary>
/// id
/// </summary>
public string app_id { get; set; }
/// <summary>
/// key
/// </summary>
public string app_key { get; set; }
/// <summary>
/// 回调地址
/// </summary>
public string redirect_uri { get; set; }
/// <summary>
/// scope
/// </summary>
public string scope { get; set; }
}
public class SenparcWeixinSetting
{
public bool IsDebug { get; set; }
public string Token { get; set; }
public string EncodingAESKey { get; set; }
public string WeixinAppId { get; set; }
public string WeixinAppSecret { get; set; }
2 years ago
public string WxOpenAppId { get; set; }
public string WxOpenAppSecret { get; set; }
public string WxOpenToken { get; set; }
public string WxOpenEncodingAESKey { get; set; }
public string TenPayV3_AppId { get; set; }
public string TenPayV3_AppSecret { get; set; }
2 years ago
public string TenPayV3_MchId { get; set; }
public string TenPayV3_Key { get; set; }
public string TenPayV3_TenpayNotify { get; set; }
public string TenPayV3_WxOpenTenpayNotify { get; set; }
public string TenPayV3_SubAppId { get; set; }
public string TenPayV3_SubAppSecret { get; set; }
public string TenPayV3_SubMchId { get; set; }
public string TenPayV3_CertPath { get; set; }
public string TenPayV3_CertSecret { get; set; }
public string TenPayV3_PrivateKey { get; set; }
public string TenPayV3_SerialNumber { get; set; }
public string TenPayV3_ApiV3Key { get; set; }
}
2 years ago