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 string[] InitTables { get; set; }
///
/// 邮箱配置
///
public List MailOptions { get; set; }
///
/// 上传配置
///
public Upload Upload { get; set; }
///
/// 阿里云oss
///
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; }
///
/// Reids配置
///
public RedisServerConfig RedisServer { get; set; }
///
/// plc地址
///
public PlcAddress plcAddress { 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; }
///
/// vue前端生成路径
///
public string VuePath { get; set; }
///
/// 作者
///
public string Author { get; set; }
public string TablePrefix { get; set; }
///
/// 模块名,默认值:business
///
public string ModuleName { get; set; }
public int FrontTpl { get; set; }
///
/// unipap vue版本号可选值2/3
///
public int UniappVersion { get; set; } = 2;
///
/// unipap前端存储路径
///
public string UniappPath { 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; }
}
public class RedisServerConfig
{
public int Open { get; set; }
public bool DbCache { get; set; }
}
public class PlcAddress
{
public string IP { get; set; }
public ReadAddress Read { get; set; }
public WriteAddress Write { get; set; }
}
public class ReadAddress
{
///
/// 出站申请
///
public string OutStationAsk { get; set; } = "DB1000.DBX38.0";
///
/// 工站
///
public string WorkStation { get; set; } = "DB1000.DBW38";
///
/// 产品型号id
///
public string ProductModelId { get; set; } = "DB1000.DBW42";
///
/// 温度
///
public string Temperature { get; set; } = "DB1000.DBR44";
///
/// 水压
///
public string WaterPressure { get; set; } = "DB1000.DBR48";
///
/// 气压
///
public string AirPressure { get; set; } = "DB1000.DBR52";
///
/// 工作时间
///
public string WorkTime { get; set; } = "DB1000.DBW56";
///
/// 读取心跳
///
public string ReadHeartBeat { get; set; } = "DB1000.DBX58.0";
}
public class WriteAddress
{
///
/// 扫码的产品型号ID
///
public string ScanProductModelId { get; set; } = "DB1000.DBW0";
///
/// 扫码结果 - OK
///
public string ScanOk { get; set; } = "DB1000.DBX2.0";
///
/// 扫码结果 - NG
///
public string ScanNg { get; set; } = "DB1000.DBX2.1";
///
/// 出站响应
///
public string Resp { get; set; } = "DB1000.DBX2.2";
///
/// 写入心跳
///
public string WriteHeartBeat { get; set; } = "DB1000.DBX2.3";
}
}