2024-02-02 17:14:41 +08:00
|
|
|
|
using MesETL.App.HostedServices;
|
2024-01-12 16:50:37 +08:00
|
|
|
|
|
2024-02-02 17:14:41 +08:00
|
|
|
|
namespace MesETL.App.Options
|
2024-01-12 16:50:37 +08:00
|
|
|
|
{
|
|
|
|
|
public class DataInputOptions
|
|
|
|
|
{
|
2024-01-29 09:29:16 +08:00
|
|
|
|
public string? InputDir { get; set; }
|
2024-01-12 16:50:37 +08:00
|
|
|
|
|
2024-01-29 09:29:16 +08:00
|
|
|
|
#region CSV
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 字符串的包围符号,默认为双引号"
|
|
|
|
|
/// </summary>
|
|
|
|
|
public char QuoteChar { get; set; } = '"';
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 每个字段的分割符,默认逗号,
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string Delimiter { get; set; } = ",";
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region Mock
|
|
|
|
|
|
|
|
|
|
public bool UseMock { get; set; }
|
|
|
|
|
|
|
|
|
|
public double MockCountMultiplier { get; set; } = 1;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Table -> Mock Count 暂时为手动配置
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Dictionary<string, TableMockConfig>? TableMockConfig { get; set; }
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region ManualSet
|
|
|
|
|
|
|
|
|
|
public string[]? TableOrder { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 配置如何从文件名转换为表名和表头
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Func<string, FileInputInfo?>? FileInputMetaBuilder { get; set; } //TODO: 抽离
|
|
|
|
|
|
|
|
|
|
#endregion
|
2024-01-12 16:50:37 +08:00
|
|
|
|
}
|
|
|
|
|
}
|