init lserp cs 5.0
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using Zhaizj.Framework.ORM;
|
||||
|
||||
namespace Zhaizj.Framework.Data {
|
||||
|
||||
internal class AccessTableBuilder : TableBuilderBase {
|
||||
|
||||
private Boolean isAddIdentityKey( Type t ) {
|
||||
if (OrmHelper.IsEntityBase( t.BaseType )) return true;
|
||||
if (t.BaseType.IsAbstract) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
protected override void addColumn_Decimal( EntityInfo entity, StringBuilder sb, EntityPropertyInfo ep, String columnName ) {
|
||||
if (ep.MoneyAttribute != null) {
|
||||
sb.Append( columnName );
|
||||
sb.Append( " currency default 0, " );
|
||||
}
|
||||
else {
|
||||
|
||||
DecimalAttribute da = ep.DecimalAttribute;
|
||||
if (da == null) throw new Exception( "DecimalAttribute not found=" + entity.FullName + "_" + ep.Name );
|
||||
|
||||
sb.Append( columnName );
|
||||
sb.Append( " decimal(" + da.Precision + "," + da.Scale + ") default 0, " );
|
||||
}
|
||||
}
|
||||
|
||||
protected override void addColumn_MiddleText( EntityInfo entity, StringBuilder sb, EntityPropertyInfo temP, string columnName ) {
|
||||
addColumn_LongText( entity, sb, columnName );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user