Example #1
0
 private void AppendBaseTypes(ClassElement entity, StringBuilder builder)
 {
     // 扩展属性
     if (entity.BaseTypes.Contains("ExtendBase"))
     {
         builder.AppendLine("               .Column(x => x.ExtendProperties)");
     }
     else if (entity.BaseTypes.Contains("CategoryBase"))
     {
         builder.AppendLine("               .Column(x => x.Id)");
         builder.AppendLine("               .Column(x => x.Name)");
         if (_file.IsUsing("Gentings.Saas.Categories"))
         {
             builder.AppendLine("               .Column(x => x.SiteId)");
         }
     }
     else if (entity.BaseTypes.Any(x => x.StartsWith("GroupBase<")))
     {
         builder.AppendLine("               .Column(x => x.Id)");
         builder.AppendLine("               .Column(x => x.Name)");
         builder.AppendLine("               .Column(x => x.ParentId)");
         if (_file.IsUsing("Gentings.Saas.Groups"))
         {
             builder.AppendLine("               .Column(x => x.SiteId)");
         }
     }
 }