项目重命名
This commit is contained in:
52
MesETL.App/Options/DataTransformOptions.cs
Normal file
52
MesETL.App/Options/DataTransformOptions.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using ConsoleApp2.Cache;
|
||||
using ConsoleApp2.HostedServices;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace ConsoleApp2.Options;
|
||||
|
||||
public enum ColumnType
|
||||
{
|
||||
Blob,
|
||||
Text,
|
||||
Json,
|
||||
UnDefine,
|
||||
}
|
||||
|
||||
public class DataTransformOptions
|
||||
{
|
||||
public bool StrictMode { get; set; } = true;
|
||||
public bool EnableFilter { get; set; } = true;
|
||||
public bool EnableReplacer { get; set; } = true;
|
||||
public bool EnableReBuilder { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// yyyyMM
|
||||
/// </summary>
|
||||
public string CleanDate { get; set; } = "202301";
|
||||
|
||||
/// <summary>
|
||||
/// Record -> Database name
|
||||
/// 对记录进行数据库过滤
|
||||
/// </summary>
|
||||
public Func<DataRecord, string>? DatabaseFilter { get; set; }
|
||||
/// <summary>
|
||||
/// Context -> Should output
|
||||
/// 配置对数据过滤的条件
|
||||
/// </summary>
|
||||
public Func<DataTransformContext, Task<bool>>? RecordFilter { get; set; }//数据过滤方法
|
||||
/// <summary>
|
||||
/// Context -> New record
|
||||
/// 对当前记录进行修改或完整替换
|
||||
/// </summary>
|
||||
public Func<DataTransformContext, Task<DataRecord>>? RecordModify { get; set; }//数据替换
|
||||
/// <summary>
|
||||
/// Context -> New rebuild records
|
||||
/// 使用当前记录对某些数据进行重建
|
||||
/// </summary>
|
||||
public Func<DataTransformContext, IList<DataRecord>?>? RecordReBuild { get; set; }//新增数据
|
||||
/// <summary>
|
||||
/// Context -> void
|
||||
/// 对数据的某些字段进行缓存
|
||||
/// </summary>
|
||||
public Func<DataTransformContext, Task>? RecordCache { get; set; }//数据缓存
|
||||
}
|
Reference in New Issue
Block a user