SugarColumn add "UpdateSql" and "UpdateServerTime"

This commit is contained in:
sunkaixuan
2022-12-20 15:12:49 +08:00
parent 98426de8b6
commit 588c23d60a
5 changed files with 11 additions and 1 deletions

View File

@@ -293,6 +293,8 @@ namespace SqlSugar
column.CreateTableFieldSort = sugarColumn.CreateTableFieldSort;
column.InsertServerTime = sugarColumn.InsertServerTime;
column.InsertSql = sugarColumn.InsertSql;
column.UpdateServerTime= sugarColumn.UpdateServerTime;
column.UpdateSql= sugarColumn.UpdateSql;
if (sugarColumn.IsJson && String.IsNullOrEmpty(sugarColumn.ColumnDataType))
{
if (this.Context.CurrentConnectionConfig.DbType == DbType.PostgreSQL)

View File

@@ -206,7 +206,9 @@ namespace SqlSugar
PropertyName = column.PropertyName,
PropertyType = UtilMethods.GetUnderType(column.PropertyInfo),
SqlParameterDbType = column.SqlParameterDbType,
TableId = i
TableId = i,
UpdateSql=column.UpdateSql,
UpdateServerTime= column.UpdateServerTime
};
if (columnInfo.PropertyType.IsEnum() && columnInfo.Value != null)
{

View File

@@ -28,6 +28,8 @@ namespace SqlSugar
public int CreateTableFieldSort { get; set; }
public bool InsertServerTime { get; set; }
public string InsertSql { get; set; }
public bool UpdateServerTime { get; set; }
public string UpdateSql { get; set; }
internal object SqlParameterDbType { get; set; }
}
}

View File

@@ -43,5 +43,7 @@ namespace SqlSugar
public object SqlParameterSize { get; set; }
public string InsertSql { get; set; }
public bool InsertServerTime { get; set; }
public bool UpdateServerTime { get; set; }
public string UpdateSql { get; set; }
}
}

View File

@@ -209,6 +209,8 @@ namespace SqlSugar
public int CreateTableFieldSort { get; set; }
public bool InsertServerTime { get; set; }
public string InsertSql { get; set; }
public bool UpdateServerTime { get; set; }
public string UpdateSql { get; set; }
}