mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
Synchronization code
This commit is contained in:
parent
27bdc2f7d7
commit
de0446270a
@ -285,6 +285,10 @@ namespace SqlSugar
|
||||
if (ConstructorText.HasValue() && item.DefaultValue != null)
|
||||
{
|
||||
var hasDefaultValue = columns.Skip(index + 1).Any(it => it.DefaultValue.HasValue());
|
||||
if (item.DefaultValue.EqualCase("CURRENT_TIMESTAMP"))
|
||||
{
|
||||
item.DefaultValue = "DateTime.Now";
|
||||
}
|
||||
ConstructorText = ConstructorText.Replace(DbFirstTemplate.KeyPropertyName, propertyName);
|
||||
ConstructorText = ConstructorText.Replace(DbFirstTemplate.KeyDefaultValue, GetPropertyTypeConvert(item)) + (!hasDefaultValue ? "" : this.ConstructorTemplate);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user