2023-07-20 18:20:59 +08:00
|
|
|
|
namespace ZR.Model.System
|
|
|
|
|
|
{
|
2023-07-21 18:17:58 +08:00
|
|
|
|
[SugarTable("SqlDiffLog", "数据差异日志")]
|
|
|
|
|
|
[Tenant("0")]
|
2023-07-20 18:20:59 +08:00
|
|
|
|
public class SqlDiffLog
|
|
|
|
|
|
{
|
2023-07-21 18:17:58 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 主键
|
|
|
|
|
|
/// </summary>
|
2023-07-20 18:20:59 +08:00
|
|
|
|
[SugarColumn(IsPrimaryKey = true)]
|
2023-07-21 18:17:58 +08:00
|
|
|
|
[JsonConverter(typeof(ValueToStringConverter))]
|
2023-07-20 18:20:59 +08:00
|
|
|
|
public long PId { get; set; }
|
2023-07-21 18:17:58 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 表名
|
|
|
|
|
|
/// </summary>
|
2023-07-20 18:20:59 +08:00
|
|
|
|
public string TableName { get; set; }
|
2023-07-21 18:17:58 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 业务数据内容
|
|
|
|
|
|
/// </summary>
|
2023-07-20 18:20:59 +08:00
|
|
|
|
[SugarColumn(Length = 4000)]
|
2023-07-21 18:17:58 +08:00
|
|
|
|
public string BusinessData { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 差异类型insert,update,delete
|
|
|
|
|
|
/// </summary>
|
2023-07-20 18:20:59 +08:00
|
|
|
|
public string DiffType { get; set; }
|
2023-07-21 18:17:58 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 执行sql语句
|
|
|
|
|
|
/// </summary>
|
2023-07-20 18:20:59 +08:00
|
|
|
|
[SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
|
|
|
|
|
public string Sql { get; set; }
|
2023-07-21 18:17:58 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 变更前数据
|
|
|
|
|
|
/// </summary>
|
2023-07-20 18:20:59 +08:00
|
|
|
|
[SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
|
|
|
|
|
public string BeforeData { get; set; }
|
2023-07-21 18:17:58 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 变更后数据
|
|
|
|
|
|
/// </summary>
|
2023-07-20 18:20:59 +08:00
|
|
|
|
[SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
|
|
|
|
|
public string AfterData { get; set; }
|
2023-07-21 18:17:58 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 操作用户名
|
|
|
|
|
|
/// </summary>
|
2023-07-20 18:20:59 +08:00
|
|
|
|
public string UserName { get; set; }
|
|
|
|
|
|
public DateTime AddTime { get; set; }
|
2023-07-21 18:17:58 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 数据库配置id
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string ConfigId { get; set; }
|
2023-07-20 18:20:59 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|