using Learn.Archives.Core.Common.Expand;
using SqlSugar.IOC;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Learn.Archives.Core.Common
{
///
/// 应用程序配置
///
public class AppConfig
{
///
/// 程序ID
///
public string ID { get; set; } = string.Empty;
///
/// Admin
///
public AdminConfig Admin { get; set; } = new AdminConfig();
///
/// 子系统
///
public SubsystemConfig Subsystem { get; set; } = new SubsystemConfig();
///
/// redis
///
public RedisConfig Redis { get; set; } = new RedisConfig();
///
/// Whisper AI
///
public WhisperConfig Whisper { get; set; } = new WhisperConfig();
///
/// FFmpeg
///
public FFmpegConfig FFmpeg { get; set; } = new FFmpegConfig();
///
/// ChatGpt
///
public ChatGptConfig ChatGpt { get; set; } = new ChatGptConfig();
///
/// 阿里云视频点播配置
///
public AlibabaCloudVodConfig AlibabaCloudVod { get; set; } = new AlibabaCloudVodConfig();
public AliyunOSSConfig AliyunOSS { get; set; } = new AliyunOSSConfig();
///
/// 数据库配置
///
public DBConfig DB { get; set; } = new DBConfig();
///
/// 其他数据库配置
///
public DBConfig[] OtherDBArr { get; set; } = Array.Empty();
///
/// 系统接收任务设置配置
///
public TaskSettingConfig TaskSetting { get; set; } = new TaskSettingConfig();
///
/// SimpLetex配置
///
public SimpLetexConfig SimpLetex { get; set; } = new SimpLetexConfig();
}
public class SimpLetexConfig
{
///
/// 请求 公开的服务地址
///
public string Host { get; set; } = string.Empty;
///
/// api的密钥
///
public string AppSecret { get; set; } = string.Empty;
///
/// 应用ID
///
public string AppId { get; set; } = string.Empty;
}
public class TaskSettingConfig
{
///
/// 下载速度MB/S
///
public int DownloadSpeed { get; set; }
///
/// 是服务端
/// 不执行任务,不回调接口
///
public bool IS_Server { get; set; }
}
///
/// ffmpeg配置
///
public class GptConfig
{
///
/// 请求 公开的服务地址
///
public string Host { get; set; } = string.Empty;
///
/// api的密钥
///
public string ApiKey { get; set; } = string.Empty;
}
///
/// 文本模型 配置
///
public class ChatGptConfig
{
///
/// KIMI
///
///
public GptConfig ChatGpt { get; set; } = new GptConfig();
public GptConfig DeepSeek { get; set; } = new GptConfig();
public GptConfig KIMI { get; set; } = new GptConfig();
public GptConfig aliyun { get; set; } = new GptConfig();
}
///
/// ffmpeg配置
///
public class FFmpegConfig
{
///
/// 音频切片时间段
/// 0不切片
///
public int TimeSlice { get; set; } = 0;
}
///
/// Whisper配置
///
public class WhisperConfig
{
///
/// 模型名称
///
public string ModelName { get; set; } = string.Empty;
}
///
/// 管理界面Admin账号
///
public class AdminConfig
{
///
/// 账号
///
public string Account { get; set; } = string.Empty;
///
/// 密码
///
public string Password { get; set; } = string.Empty;
}
///
/// redis配置
///
public class RedisConfig
{
///
/// redis连接字符串
///
public string ConnectionString { get; set; } = string.Empty;
}
public class DBConfig
{
///
/// 主库链接
///
public string ConnectionString { get; set; } = string.Empty;
///
/// 数据库类型
///
public IocDbType SqlType { get; set; }
///
/// 启动时更新表结构
///
public bool UpdateTable { get; set; }
///
/// 配置ID
///
public long ConfigId { get; set; }
}
///
/// 子系统配置
///
public class SubsystemInfo
{
public string APIUrl { get; set; } = string.Empty;
public string Token { get; set; } = string.Empty;
}
///
/// 子系统配置
///
public class SubsystemConfig
{
public SubsystemInfo 蓝鲸智库 { get; set; } = new SubsystemInfo();
}
}