Update Oracle CodeFirst default Type

This commit is contained in:
sunkaixuan
2023-10-04 12:43:11 +08:00
parent c75b470be5
commit d90e147a5e

View File

@@ -19,6 +19,18 @@ namespace SqlSugar
{
result.DataType = item.DataType;
}
else if (item.DataType==null&&item.UnderType == UtilConstants.LongType)
{
result.Length = 0;
result.DecimalDigits = 0;
result.DataType = "NUMBER(19,0)";
}
else if (item.DataType == null && item.UnderType == UtilConstants.IntType)
{
result.Length = 0;
result.DecimalDigits = 0;
result.DataType = "NUMBER(9,0)";
}
else if (propertyType.IsEnum())
{
result.DataType = this.Context.Ado.DbBind.GetDbTypeName(item.Length > 9 ? UtilConstants.LongType.Name : UtilConstants.IntType.Name);