diff --git a/Src/Asp.Net/SqlSugar/Abstract/EntityMaintenance/EntityMaintenance.cs b/Src/Asp.Net/SqlSugar/Abstract/EntityMaintenance/EntityMaintenance.cs index 5de5242e6..bc0927f70 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/EntityMaintenance/EntityMaintenance.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/EntityMaintenance/EntityMaintenance.cs @@ -291,6 +291,8 @@ namespace SqlSugar column.SqlParameterDbType = sugarColumn.SqlParameterDbType; column.SqlParameterSize = sugarColumn.SqlParameterSize; column.CreateTableFieldSort = sugarColumn.CreateTableFieldSort; + column.InsertServerTime = sugarColumn.InsertServerTime; + column.InsertSql = sugarColumn.InsertSql; if (sugarColumn.IsJson && String.IsNullOrEmpty(sugarColumn.ColumnDataType)) { if (this.Context.CurrentConnectionConfig.DbType == DbType.PostgreSQL) diff --git a/Src/Asp.Net/SqlSugar/Abstract/InsertableProvider/InsertableHelper.cs b/Src/Asp.Net/SqlSugar/Abstract/InsertableProvider/InsertableHelper.cs index 9fd4f0d9e..629950782 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/InsertableProvider/InsertableHelper.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/InsertableProvider/InsertableHelper.cs @@ -210,7 +210,9 @@ namespace SqlSugar DbColumnName = column.DbColumnName, PropertyName = column.PropertyName, PropertyType = UtilMethods.GetUnderType(column.PropertyInfo), - TableId = i + TableId = i, + InsertSql = column.InsertSql, + InsertServerTime = column.InsertServerTime }; if (column.DbColumnName == null) { diff --git a/Src/Asp.Net/SqlSugar/Entities/DbColumnInfo.cs b/Src/Asp.Net/SqlSugar/Entities/DbColumnInfo.cs index 427fdf3aa..4ca2daad7 100644 --- a/Src/Asp.Net/SqlSugar/Entities/DbColumnInfo.cs +++ b/Src/Asp.Net/SqlSugar/Entities/DbColumnInfo.cs @@ -26,6 +26,8 @@ namespace SqlSugar public bool IsJson { get; set; } public bool? IsUnsigned { get; set; } public int CreateTableFieldSort { get; set; } + public string InsertServerTime { get; set; } + public string InsertSql { get; set; } internal object SqlParameterDbType { get; set; } } } diff --git a/Src/Asp.Net/SqlSugar/Entities/EntityColumnInfo.cs b/Src/Asp.Net/SqlSugar/Entities/EntityColumnInfo.cs index 43970f829..6e9c25cd8 100644 --- a/Src/Asp.Net/SqlSugar/Entities/EntityColumnInfo.cs +++ b/Src/Asp.Net/SqlSugar/Entities/EntityColumnInfo.cs @@ -41,5 +41,7 @@ namespace SqlSugar public Navigate Navigat { get; set; } public int CreateTableFieldSort { get; set; } public object SqlParameterSize { get; set; } + public string InsertSql { get; set; } + public string InsertServerTime { get; set; } } } diff --git a/Src/Asp.Net/SqlSugar/Entities/Mapping/SugarMappingAttribute.cs b/Src/Asp.Net/SqlSugar/Entities/Mapping/SugarMappingAttribute.cs index 4066226b6..18b8d21a3 100644 --- a/Src/Asp.Net/SqlSugar/Entities/Mapping/SugarMappingAttribute.cs +++ b/Src/Asp.Net/SqlSugar/Entities/Mapping/SugarMappingAttribute.cs @@ -207,6 +207,8 @@ namespace SqlSugar public object SqlParameterDbType { get; set; } public object SqlParameterSize { get; set; } public int CreateTableFieldSort { get; set; } + public string InsertServerTime { get; set; } + public string InsertSql { get; set; } }