Browse Source

Merge branch 'master' of https://github.com/abpframework/abp

pull/691/head
JiYuhang 7 years ago
parent
commit
659c3b9cfc
  1. 8
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpInputTagHelperService.cs
  2. 15
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelperService.cs
  3. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Components/TenantSwitch/Default.cshtml
  4. 3
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Components/_ViewImports.cshtml
  5. 25
      framework/src/Volo.Abp.Core/System/AbpTypeExtensions.cs
  6. 112
      framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs
  7. 41
      framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/Modeling/AbpEntityTypeBuilderExtensions.cs
  8. 60
      framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/AbpGlobalBsonClassMap.cs
  9. 2
      framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/MongoModelSource.cs
  10. 2
      framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/StandardMenus.cs
  11. 2
      modules/blogging/src/Volo.Blogging.HttpApi/Volo/Blogging/BlogsController.cs
  12. 10
      modules/docs/Volo.Docs.sln
  13. 6
      modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/DocsTestAppDbContext.cs
  14. 6
      modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/DocsTestAppEntityFrameworkCoreModule.cs
  15. 39
      modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20180530161822_Create_Project.Designer.cs
  16. 30
      modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20180530161822_Create_Project.cs
  17. 45
      modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20180531111707_Added_ShortName_And_DocumentStoreType_To_Project.Designer.cs
  18. 35
      modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20180531111707_Added_ShortName_And_DocumentStoreType_To_Project.cs
  19. 50
      modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20180531125653_Added_ExtraProperties_To_Project.Designer.cs
  20. 24
      modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20180531125653_Added_ExtraProperties_To_Project.cs
  21. 54
      modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20180531130753_Added_DefaultDocumentName_To_Project.Designer.cs
  22. 26
      modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20180531130753_Added_DefaultDocumentName_To_Project.cs
  23. 58
      modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20180531134117_Added_NavigationDocumentName_To_Project.Designer.cs
  24. 26
      modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20180531134117_Added_NavigationDocumentName_To_Project.cs
  25. 59
      modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20180601150905_Added_GoogleCustomSearchId_To_Project.Designer.cs
  26. 22
      modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20180601150905_Added_GoogleCustomSearchId_To_Project.cs
  27. 61
      modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20180605212013_Added_Format_To_Project.Designer.cs
  28. 22
      modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20180605212013_Added_Format_To_Project.cs
  29. 63
      modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20180925162715_Added_MainWebsiteUrl.Designer.cs
  30. 22
      modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20180925162715_Added_MainWebsiteUrl.cs
  31. 68
      modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20181030125213_Added_Project_MinimumVersion.Designer.cs
  32. 32
      modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20181030125213_Added_Project_MinimumVersion.cs
  33. 66
      modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20181205154143_Removed_GoogleCustomSearchId.Designer.cs
  34. 22
      modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20181205154143_Removed_GoogleCustomSearchId.cs
  35. 68
      modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20181211141818_AggregateRoot_Changes.Designer.cs
  36. 22
      modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20181211141818_AggregateRoot_Changes.cs
  37. 465
      modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20181225134002_Initial20181225.Designer.cs
  38. 338
      modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20181225134002_Initial20181225.cs
  39. 399
      modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/DocsTestAppDbContextModelSnapshot.cs
  40. 7
      modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Volo.DocsTestApp.EntityFrameworkCore.csproj
  41. 4
      modules/docs/app/Volo.DocsTestApp/Controllers/HomeController.cs
  42. 25
      modules/docs/app/Volo.DocsTestApp/DocsTestAppModule.cs
  43. 4
      modules/docs/app/Volo.DocsTestApp/Pages/Index.cshtml
  44. 16
      modules/docs/app/Volo.DocsTestApp/Pages/Index.cshtml.cs
  45. 4
      modules/docs/app/Volo.DocsTestApp/Pages/_ViewImports.cshtml
  46. 5
      modules/docs/app/Volo.DocsTestApp/Volo.DocsTestApp.csproj
  47. 10
      modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo.Docs.Admin.Application.Contracts.csproj
  48. 24
      modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/DocsAdminApplicationContractsModule.cs
  49. 24
      modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/DocsAdminPermissionDefinitionProvider.cs
  50. 31
      modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/DocsAdminPermissions.cs
  51. 10
      modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/Localization/Resources/Docs/ApplicationContracts/en.json
  52. 10
      modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/Localization/Resources/Docs/ApplicationContracts/tr.json
  53. 9
      modules/docs/src/Volo.Docs.Admin.Application/Volo/Docs/Admin/Projects/ProjectAdminAppService.cs
  54. 50
      modules/docs/src/Volo.Docs.Admin.HttpApi/Volo/Docs/Admin/Projects/DocsAdminProjectController.cs
  55. 57
      modules/docs/src/Volo.Docs.Admin.HttpApi/Volo/Docs/Admin/ProjectsAdminController.cs
  56. 7
      modules/docs/src/Volo.Docs.Admin.Web/DocsAdminWebAutoMapperProfile.cs
  57. 19
      modules/docs/src/Volo.Docs.Admin.Web/DocsAdminWebModule.cs
  58. 41
      modules/docs/src/Volo.Docs.Admin.Web/DocsMenuContributor.cs
  59. 25
      modules/docs/src/Volo.Docs.Admin.Web/Localization/Resources/Docs/Web/en.json
  60. 26
      modules/docs/src/Volo.Docs.Admin.Web/Localization/Resources/Docs/Web/tr.json
  61. 13
      modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/DocsAdminPage.cs
  62. 22
      modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Projects/Create.cshtml
  63. 112
      modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Projects/Create.cshtml.cs
  64. 22
      modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Projects/Edit.cshtml
  65. 119
      modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Projects/Edit.cshtml.cs
  66. 49
      modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Projects/Index.cshtml
  67. 11
      modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Projects/Index.cshtml.cs
  68. 14
      modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Projects/create.js
  69. 14
      modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Projects/edit.js
  70. 98
      modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Projects/index.js
  71. 22
      modules/docs/src/Volo.Docs.Admin.Web/Volo.Docs.Admin.Web.csproj
  72. 7
      modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/IdentityDbContextModelBuilderExtensions.cs
  73. 1
      modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/AbpIdentityBsonClassMap.cs
  74. 6
      modules/identity/src/Volo.Abp.Identity.Web/Navigation/AbpIdentityWebMainMenuContributor.cs
  75. 10
      modules/identity/src/Volo.Abp.Identity.Web/Navigation/IdentityMenuNames.cs
  76. 10
      modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/Index.cshtml
  77. 30
      modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/Index.cshtml
  78. 2
      modules/setting-management/src/Volo.Abp.SettingManagement.Web/Navigation/SettingManagementMainMenuContributor.cs
  79. 14
      modules/setting-management/src/Volo.Abp.SettingManagement.Web/Navigation/SettingManagementMenuNames.cs
  80. 38
      modules/setting-management/src/Volo.Abp.SettingManagement.Web/Pages/SettingManagement/Index.cshtml
  81. 4
      modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Navigation/AbpTenantManagementWebMainMenuContributor.cs
  82. 9
      modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Navigation/TenantManagementMenuNames.cs
  83. 10
      modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/Index.cshtml

8
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpInputTagHelperService.cs

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text.Encodings.Web;
using Microsoft.AspNetCore.Mvc.TagHelpers;
@ -60,7 +61,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
var inputTag = GetInputTagHelperOutput(context, output, out isCheckbox);
var inputHtml = RenderTagHelperOutput(inputTag, _encoder);
var label = GetLabelAsHtml(context, output, inputTag, isCheckbox);
var label = GetLabelAsHtml(context, output, inputTag, isCheckbox) + GetRequiredSymbol(context, output);
var info = GetInfoAsHtml(context, output, inputTag, isCheckbox);
var validation = isCheckbox ? "" : GetValidationAsHtml(context, output, inputTag);
@ -251,6 +252,11 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
"</label>";
}
protected virtual string GetRequiredSymbol(TagHelperContext context, TagHelperOutput output)
{
return GetAttribute<RequiredAttribute>(TagHelper.AspFor.ModelExplorer) != null ? "<span> (*) </span>":"";
}
protected virtual string GetInfoAsHtml(TagHelperContext context, TagHelperOutput output, TagHelperOutput inputTag, bool isCheckbox)
{
if (isCheckbox)

15
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelperService.cs

@ -1,6 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Reflection;
using System.Text.Encodings.Web;
@ -56,11 +57,11 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
{
var selectTag = GetSelectTag(context, output);
var selectAsHtml = RenderTagHelperOutput(selectTag, _encoder);
var label = GetLabelAsHtml(context, output, selectTag);
var validation = GetValidationAsHtml(context, output, selectTag);
var label = GetLabelAsHtml(context, output, selectTag) + GetRequiredSymbol(context, output);
var validation = GetValidationAsHtml(context, output, selectTag);
var infoText = GetInfoAsHtml(context, output, selectTag);
return label + Environment.NewLine + selectAsHtml + Environment.NewLine + infoText+ Environment.NewLine + validation;
return label + Environment.NewLine + selectAsHtml + Environment.NewLine + infoText + Environment.NewLine + validation;
}
protected virtual string SurroundInnerHtmlAndGet(TagHelperContext context, TagHelperOutput output, string innerHtml)
@ -80,7 +81,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
var selectTagHelperOutput = GetInnerTagHelper(GetInputAttributes(context, output), context, selectTagHelper, "select", TagMode.StartTagAndEndTag);
selectTagHelperOutput.Attributes.AddClass("form-control");
selectTagHelperOutput.Attributes.AddClass(GetSize(context,output));
selectTagHelperOutput.Attributes.AddClass(GetSize(context, output));
AddDisabledAttribute(selectTagHelperOutput);
AddInfoTextId(selectTagHelperOutput);
@ -121,6 +122,12 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
return GetLabelAsHtmlUsingTagHelper(context, output);
}
protected virtual string GetRequiredSymbol(TagHelperContext context, TagHelperOutput output)
{
return GetAttribute<RequiredAttribute>(TagHelper.AspFor.ModelExplorer) != null ? "<span> (*) </span>" : "";
}
protected virtual void AddInfoTextId(TagHelperOutput inputTagHelperOutput)
{
if (GetAttribute<InputInfoText>(TagHelper.AspFor.ModelExplorer) == null)

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Components/TenantSwitch/Default.cshtml

@ -1,7 +1,7 @@
@using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy.Components.TenantSwitch
@model TenantSwitchViewComponent.TenantSwitchViewModel
<li class="nav-item">
<a id="TenantSwitchToolbarLink" href="#">
<a abp-button="Link" id="TenantSwitchToolbarLink" href="#">
@if (Model.Tenant == null)
{
<text>@@host</text>

3
framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Components/_ViewImports.cshtml

@ -0,0 +1,3 @@
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling

25
framework/src/Volo.Abp.Core/System/AbpTypeExtensions.cs

@ -6,5 +6,30 @@
{
return type.FullName + ", " + type.Assembly.GetName().Name;
}
/// <summary>
/// Determines whether an instance of this type can be assigned to
/// an instance of the <typeparamref name="TTarget"></typeparamref>.
///
/// Internally uses <see cref="Type.IsAssignableFrom"/>.
/// </summary>
/// <typeparam name="TTarget">Target type</typeparam> (as reverse).
public static bool IsAssignableTo<TTarget>(this Type type)
{
return type.IsAssignableTo(typeof(TTarget));
}
/// <summary>
/// Determines whether an instance of this type can be assigned to
/// an instance of the <paramref name="targetType"></paramref>.
///
/// Internally uses <see cref="Type.IsAssignableFrom"/> (as reverse).
/// </summary>
/// <param name="type">this type</param>
/// <param name="targetType">Target type</param>
public static bool IsAssignableTo(this Type type, Type targetType)
{
return targetType.IsAssignableFrom(type);
}
}
}

112
framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs

@ -9,6 +9,7 @@ using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.ChangeTracking;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Newtonsoft.Json;
@ -315,15 +316,17 @@ namespace Volo.Abp.EntityFrameworkCore
protected virtual void ConfigureBaseProperties<TEntity>(ModelBuilder modelBuilder, IMutableEntityType mutableEntityType)
where TEntity : class
{
ConfigureConcurrencyStamp<TEntity>(modelBuilder, mutableEntityType);
ConfigureConcurrencyStampProperty<TEntity>(modelBuilder, mutableEntityType);
ConfigureExtraProperties<TEntity>(modelBuilder, mutableEntityType);
ConfigureAuditProperties<TEntity>(modelBuilder, mutableEntityType);
ConfigureTenantIdProperty<TEntity>(modelBuilder, mutableEntityType);
ConfigureGlobalFilters<TEntity>(modelBuilder, mutableEntityType);
}
protected virtual void ConfigureConcurrencyStamp<TEntity>(ModelBuilder modelBuilder, IMutableEntityType mutableEntityType)
protected virtual void ConfigureConcurrencyStampProperty<TEntity>(ModelBuilder modelBuilder, IMutableEntityType mutableEntityType)
where TEntity : class
{
if (!typeof(IHasConcurrencyStamp).GetTypeInfo().IsAssignableFrom(typeof(TEntity)))
if (!typeof(IHasConcurrencyStamp).IsAssignableFrom(typeof(TEntity)))
{
return;
}
@ -339,7 +342,7 @@ namespace Volo.Abp.EntityFrameworkCore
protected virtual void ConfigureExtraProperties<TEntity>(ModelBuilder modelBuilder, IMutableEntityType mutableEntityType)
where TEntity : class
{
if (!typeof(IHasExtraProperties).GetTypeInfo().IsAssignableFrom(typeof(TEntity)))
if (!typeof(IHasExtraProperties).IsAssignableFrom(typeof(TEntity)))
{
return;
}
@ -355,6 +358,107 @@ namespace Volo.Abp.EntityFrameworkCore
});
}
protected virtual void ConfigureAuditProperties<TEntity>(ModelBuilder modelBuilder, IMutableEntityType mutableEntityType)
where TEntity : class
{
if (typeof(TEntity).IsAssignableTo<IHasCreationTime>())
{
modelBuilder.Entity<TEntity>(b =>
{
b.Property(x => ((IHasCreationTime)x).CreationTime)
.IsRequired()
.HasColumnName(nameof(IHasCreationTime.CreationTime));
});
}
if (typeof(TEntity).IsAssignableTo<IMayHaveCreator>())
{
modelBuilder.Entity<TEntity>(b =>
{
b.Property(x => ((IMayHaveCreator)x).CreatorId)
.IsRequired(false)
.HasColumnName(nameof(IMayHaveCreator.CreatorId));
});
}
if (typeof(TEntity).IsAssignableTo<IMustHaveCreator>())
{
modelBuilder.Entity<TEntity>(b =>
{
b.Property(x => ((IMustHaveCreator)x).CreatorId)
.IsRequired()
.HasColumnName(nameof(IMustHaveCreator.CreatorId));
});
}
if (typeof(TEntity).IsAssignableTo<IHasModificationTime>())
{
modelBuilder.Entity<TEntity>(b =>
{
b.Property(x => ((IHasModificationTime)x).LastModificationTime)
.IsRequired(false)
.HasColumnName(nameof(IHasModificationTime.LastModificationTime));
});
}
if (typeof(TEntity).IsAssignableTo<IModificationAuditedObject>())
{
modelBuilder.Entity<TEntity>(b =>
{
b.Property(x => ((IModificationAuditedObject)x).LastModifierId)
.IsRequired(false)
.HasColumnName(nameof(IModificationAuditedObject.LastModifierId));
});
}
if (typeof(TEntity).IsAssignableTo<ISoftDelete>())
{
modelBuilder.Entity<TEntity>(b =>
{
b.Property(x => ((ISoftDelete) x).IsDeleted)
.IsRequired()
.HasDefaultValue(false)
.HasColumnName(nameof(ISoftDelete.IsDeleted));
});
}
if (typeof(TEntity).IsAssignableTo<IHasDeletionTime>())
{
modelBuilder.Entity<TEntity>(b =>
{
b.Property(x => ((IHasDeletionTime)x).DeletionTime)
.IsRequired(false)
.HasColumnName(nameof(IHasDeletionTime.DeletionTime));
});
}
if (typeof(TEntity).IsAssignableTo<IDeletionAuditedObject>())
{
modelBuilder.Entity<TEntity>(b =>
{
b.Property(x => ((IDeletionAuditedObject)x).DeleterId)
.IsRequired(false)
.HasColumnName(nameof(IDeletionAuditedObject.DeleterId));
});
}
}
protected virtual void ConfigureTenantIdProperty<TEntity>(ModelBuilder modelBuilder, IMutableEntityType mutableEntityType)
where TEntity : class
{
if (!typeof(TEntity).IsAssignableTo<IMultiTenant>())
{
return;
}
modelBuilder.Entity<TEntity>(b =>
{
b.Property(x => ((IMultiTenant)x).TenantId)
.IsRequired(false)
.HasColumnName(nameof(IMultiTenant.TenantId));
});
}
protected virtual void ConfigureGlobalFilters<TEntity>(ModelBuilder modelBuilder, IMutableEntityType mutableEntityType)
where TEntity : class
{

41
framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/Modeling/AbpEntityTypeBuilderExtensions.cs

@ -33,59 +33,76 @@ namespace Volo.Abp.EntityFrameworkCore.Modeling
public static void ConfigureSoftDelete<T>(this EntityTypeBuilder<T> b)
where T : class, ISoftDelete
{
b.Property(x => x.IsDeleted).IsRequired().HasDefaultValue(false).HasColumnName(nameof(ISoftDelete.IsDeleted));
b.Property(x => x.IsDeleted)
.IsRequired()
.HasDefaultValue(false)
.HasColumnName(nameof(ISoftDelete.IsDeleted));
}
public static void ConfigureDeletionTime<T>(this EntityTypeBuilder<T> b)
where T : class, IHasDeletionTime
{
b.ConfigureSoftDelete();
b.Property(x => x.DeletionTime).IsRequired(false).HasColumnName(nameof(IHasDeletionTime.DeletionTime));
b.Property(x => x.DeletionTime)
.IsRequired(false)
.HasColumnName(nameof(IHasDeletionTime.DeletionTime));
}
public static void ConfigureMayHaveCreator<T>(this EntityTypeBuilder<T> b)
where T : class, IMayHaveCreator
{
b.Property(x => x.CreatorId).IsRequired(false).HasColumnName(nameof(IMayHaveCreator.CreatorId));
b.Property(x => x.CreatorId)
.IsRequired(false)
.HasColumnName(nameof(IMayHaveCreator.CreatorId));
}
public static void ConfigureMustHaveCreator<T>(this EntityTypeBuilder<T> b)
where T : class, IMustHaveCreator
{
b.Property(x => x.CreatorId).IsRequired().HasColumnName(nameof(IMustHaveCreator.CreatorId));
b.Property(x => x.CreatorId)
.IsRequired()
.HasColumnName(nameof(IMustHaveCreator.CreatorId));
}
public static void ConfigureDeletionAudited<T>(this EntityTypeBuilder<T> b)
where T : class, IDeletionAuditedObject
{
b.ConfigureDeletionTime();
b.Property(x => x.DeleterId).IsRequired(false).HasColumnName(nameof(IDeletionAuditedObject.DeleterId));
b.Property(x => x.DeleterId)
.IsRequired(false)
.HasColumnName(nameof(IDeletionAuditedObject.DeleterId));
}
public static void ConfigureCreationTime<T>(this EntityTypeBuilder<T> b)
where T : class, IHasCreationTime
{
b.Property(x => x.CreationTime).IsRequired().HasColumnName(nameof(IHasCreationTime.CreationTime));
b.Property(x => x.CreationTime)
.IsRequired()
.HasColumnName(nameof(IHasCreationTime.CreationTime));
}
public static void ConfigureCreationAudited<T>(this EntityTypeBuilder<T> b)
where T : class, ICreationAuditedObject
{
b.ConfigureCreationTime();
b.Property(x => x.CreatorId).IsRequired(false).HasColumnName(nameof(ICreationAuditedObject.CreatorId));
b.ConfigureMayHaveCreator();
}
public static void ConfigureLastModificationTime<T>(this EntityTypeBuilder<T> b)
where T : class, IHasModificationTime
{
b.Property(x => x.LastModificationTime).IsRequired(false).HasColumnName(nameof(IHasModificationTime.LastModificationTime));
b.Property(x => x.LastModificationTime)
.IsRequired(false)
.HasColumnName(nameof(IHasModificationTime.LastModificationTime));
}
public static void ConfigureModificationAudited<T>(this EntityTypeBuilder<T> b)
where T : class, IModificationAuditedObject
{
b.ConfigureLastModificationTime();
b.Property(x => x.LastModifierId).IsRequired(false).HasColumnName(nameof(IModificationAuditedObject.LastModifierId));
b.Property(x => x.LastModifierId)
.IsRequired(false)
.HasColumnName(nameof(IModificationAuditedObject.LastModifierId));
}
public static void ConfigureAudited<T>(this EntityTypeBuilder<T> b)
@ -105,9 +122,11 @@ namespace Volo.Abp.EntityFrameworkCore.Modeling
public static void ConfigureMultiTenant<T>(this EntityTypeBuilder<T> b)
where T : class, IMultiTenant
{
b.Property(x => x.TenantId).IsRequired(false).HasColumnName(nameof(IMultiTenant.TenantId));
b.Property(x => x.TenantId)
.IsRequired(false)
.HasColumnName(nameof(IMultiTenant.TenantId));
}
//TODO: Add other interfaces (IMultiTenant, IAuditedObject<TUser>...)
//TODO: Add other interfaces (IAuditedObject<TUser>...)
}
}

60
framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/AbpGlobalBsonClassMap.cs

@ -0,0 +1,60 @@
using System;
using System.Collections.Generic;
using MongoDB.Bson.Serialization;
using Volo.Abp.Data;
namespace Volo.Abp.MongoDB
{
public static class AbpGlobalBsonClassMap
{
private static readonly HashSet<Type> PreConfiguredTypes = new HashSet<Type>();
/// <summary>
/// Configure default/base properties for the entity using <see cref="BsonClassMap"/>.
/// This method runs single time for an <typeparamref name="TEntity"/> for the application lifetime.
/// Subsequent calls has no effect for the same <typeparamref name="TEntity"/>.
/// </summary>
public static void ConfigureDefaults<TEntity>()
{
ConfigureDefaults(typeof(TEntity));
}
/// <summary>
/// Configure default/base properties for the entity using <see cref="BsonClassMap"/>.
/// This method runs single time for an <paramref name="entityType"/> for the application lifetime.
/// Subsequent calls has no effect for the same <paramref name="entityType"/>.
/// </summary>
public static void ConfigureDefaults(Type entityType)
{
lock (PreConfiguredTypes)
{
if (PreConfiguredTypes.Contains(entityType))
{
return;
}
ConfigureDefaultsInternal(entityType);
PreConfiguredTypes.Add(entityType);
}
}
private static void ConfigureDefaultsInternal(Type entityType)
{
var map = new BsonClassMap(entityType);
map.AutoMap();
if (entityType.IsAssignableTo<IHasExtraProperties>())
{
map.SetExtraElementsMember(
new BsonMemberMap(
map,
entityType.GetMember(nameof(IHasExtraProperties.ExtraProperties))[0]
)
);
}
BsonClassMap.RegisterClassMap(map);
}
}
}

2
framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/MongoModelSource.cs

@ -58,6 +58,8 @@ namespace Volo.Abp.MongoDB
{
b.CollectionName = collectionAttribute?.CollectionName ?? collectionProperty.Name;
});
AbpGlobalBsonClassMap.ConfigureDefaults(entityType);
}
protected virtual void BuildModelFromDbContextInstance(IMongoModelBuilder modelBuilder, AbpMongoDbContext dbContext)

2
framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/StandardMenus.cs

@ -4,6 +4,6 @@ namespace Volo.Abp.UI.Navigation
{
public const string Main = "Main";
public const string User = "User";
public const string Shortcut = "User";
public const string Shortcut = "Shortcut";
}
}

2
modules/blogging/src/Volo.Blogging.HttpApi/Volo/Blogging/BlogsController.cs

@ -65,7 +65,7 @@ namespace Volo.Blogging
[Route("{id}")]
public async Task<BlogDto> Update(Guid id, UpdateBlogDto input)
{
throw new NotImplementedException();
return await _blogAppService.Update(id, input);
}
[HttpDelete]

10
modules/docs/Volo.Docs.sln

@ -33,15 +33,15 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "admin-app", "admin-app", "{
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "public-app", "public-app", "{8B0CDFC9-E313-4323-9390-59CFFAAC60B5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Docs.Admin.Application.Contracts", "src\Volo.Docs.Admin.Application.Contracts\Volo.Docs.Admin.Application.Contracts.csproj", "{37D483C8-400B-4127-A6D0-2EE4E80CB696}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Docs.Admin.Application.Contracts", "src\Volo.Docs.Admin.Application.Contracts\Volo.Docs.Admin.Application.Contracts.csproj", "{37D483C8-400B-4127-A6D0-2EE4E80CB696}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Docs.Admin.Application", "src\Volo.Docs.Admin.Application\Volo.Docs.Admin.Application.csproj", "{823C51A7-40AB-45D8-8FB8-F212AF7E45F2}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Docs.Admin.Application", "src\Volo.Docs.Admin.Application\Volo.Docs.Admin.Application.csproj", "{823C51A7-40AB-45D8-8FB8-F212AF7E45F2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Docs.Admin.HttpApi", "src\Volo.Docs.Admin.HttpApi\Volo.Docs.Admin.HttpApi.csproj", "{262F38DB-62AF-427F-96E2-C6385C5AB695}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Docs.Admin.HttpApi", "src\Volo.Docs.Admin.HttpApi\Volo.Docs.Admin.HttpApi.csproj", "{262F38DB-62AF-427F-96E2-C6385C5AB695}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Docs.Admin.HttpApi.Client", "src\Volo.Docs.Admin.HttpApi.Client\Volo.Docs.Admin.HttpApi.Client.csproj", "{81EE378A-0DE1-47BA-86D9-08EF6317BB95}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Docs.Admin.HttpApi.Client", "src\Volo.Docs.Admin.HttpApi.Client\Volo.Docs.Admin.HttpApi.Client.csproj", "{81EE378A-0DE1-47BA-86D9-08EF6317BB95}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Docs.Admin.Web", "src\Volo.Docs.Admin.Web\Volo.Docs.Admin.Web.csproj", "{116A6145-9D66-4867-B3EF-A464FAC47946}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Docs.Admin.Web", "src\Volo.Docs.Admin.Web\Volo.Docs.Admin.Web.csproj", "{116A6145-9D66-4867-B3EF-A464FAC47946}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution

6
modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/DocsTestAppDbContext.cs

@ -1,5 +1,8 @@
using Microsoft.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Identity.EntityFrameworkCore;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
using Volo.Docs.EntityFrameworkCore;
namespace Volo.DocsTestApp.EntityFrameworkCore
@ -16,6 +19,9 @@ namespace Volo.DocsTestApp.EntityFrameworkCore
{
base.OnModelCreating(modelBuilder);
modelBuilder.ConfigurePermissionManagement();
modelBuilder.ConfigureSettingManagement();
modelBuilder.ConfigureIdentity();
modelBuilder.ConfigureDocs();
}
}

6
modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/DocsTestAppEntityFrameworkCoreModule.cs

@ -1,11 +1,17 @@
using Volo.Abp.EntityFrameworkCore.SqlServer;
using Volo.Abp.Identity.EntityFrameworkCore;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
using Volo.Docs.EntityFrameworkCore;
namespace Volo.DocsTestApp.EntityFrameworkCore
{
[DependsOn(
typeof(DocsEntityFrameworkCoreModule),
typeof(AbpIdentityEntityFrameworkCoreModule),
typeof(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpSettingManagementEntityFrameworkCoreModule),
typeof(AbpEntityFrameworkCoreSqlServerModule))]
public class DocsTestAppEntityFrameworkCoreModule : AbpModule
{

39
modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20180530161822_Create_Project.Designer.cs

@ -1,39 +0,0 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Metadata.Internal;
using Microsoft.EntityFrameworkCore.Migrations;
using Volo.DocsTestApp.EntityFrameworkCore;
namespace Volo.DocsTestApp.EntityFrameworkCore.Migrations
{
[DbContext(typeof(DocsTestAppDbContext))]
[Migration("20180530161822_Create_Project")]
partial class Create_Project
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.1.0-preview2-30571")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Volo.Docs.Projects.Project", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128);
b.HasKey("Id");
b.ToTable("DocsProjects");
});
#pragma warning restore 612, 618
}
}
}

30
modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20180530161822_Create_Project.cs

@ -1,30 +0,0 @@
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Volo.DocsTestApp.EntityFrameworkCore.Migrations
{
public partial class Create_Project : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "DocsProjects",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
Name = table.Column<string>(maxLength: 128, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_DocsProjects", x => x.Id);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "DocsProjects");
}
}
}

45
modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20180531111707_Added_ShortName_And_DocumentStoreType_To_Project.Designer.cs

@ -1,45 +0,0 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Metadata.Internal;
using Microsoft.EntityFrameworkCore.Migrations;
using Volo.DocsTestApp.EntityFrameworkCore;
namespace Volo.DocsTestApp.EntityFrameworkCore.Migrations
{
[DbContext(typeof(DocsTestAppDbContext))]
[Migration("20180531111707_Added_ShortName_And_DocumentStoreType_To_Project")]
partial class Added_ShortName_And_DocumentStoreType_To_Project
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.1.0-preview2-30571")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Volo.Docs.Projects.Project", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("DocumentStoreType");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("ShortName")
.IsRequired()
.HasMaxLength(32);
b.HasKey("Id");
b.ToTable("DocsProjects");
});
#pragma warning restore 612, 618
}
}
}

35
modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20180531111707_Added_ShortName_And_DocumentStoreType_To_Project.cs

@ -1,35 +0,0 @@
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Volo.DocsTestApp.EntityFrameworkCore.Migrations
{
public partial class Added_ShortName_And_DocumentStoreType_To_Project : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "DocumentStoreType",
table: "DocsProjects",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "ShortName",
table: "DocsProjects",
maxLength: 32,
nullable: false,
defaultValue: "");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "DocumentStoreType",
table: "DocsProjects");
migrationBuilder.DropColumn(
name: "ShortName",
table: "DocsProjects");
}
}
}

50
modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20180531125653_Added_ExtraProperties_To_Project.Designer.cs

@ -1,50 +0,0 @@
// <auto-generated />
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Metadata.Internal;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Volo.DocsTestApp.EntityFrameworkCore;
namespace Volo.DocsTestApp.EntityFrameworkCore.Migrations
{
[DbContext(typeof(DocsTestAppDbContext))]
[Migration("20180531125653_Added_ExtraProperties_To_Project")]
partial class Added_ExtraProperties_To_Project
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.1.0-preview2-30571")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Volo.Docs.Projects.Project", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("DocumentStoreType");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("ShortName")
.IsRequired()
.HasMaxLength(32);
b.HasKey("Id");
b.ToTable("DocsProjects");
});
#pragma warning restore 612, 618
}
}
}

24
modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20180531125653_Added_ExtraProperties_To_Project.cs

@ -1,24 +0,0 @@
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Volo.DocsTestApp.EntityFrameworkCore.Migrations
{
public partial class Added_ExtraProperties_To_Project : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "ExtraProperties",
table: "DocsProjects",
nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "ExtraProperties",
table: "DocsProjects");
}
}
}

54
modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20180531130753_Added_DefaultDocumentName_To_Project.Designer.cs

@ -1,54 +0,0 @@
// <auto-generated />
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Metadata.Internal;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Volo.DocsTestApp.EntityFrameworkCore;
namespace Volo.DocsTestApp.EntityFrameworkCore.Migrations
{
[DbContext(typeof(DocsTestAppDbContext))]
[Migration("20180531130753_Added_DefaultDocumentName_To_Project")]
partial class Added_DefaultDocumentName_To_Project
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.1.0-preview2-30571")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Volo.Docs.Projects.Project", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("DefaultDocumentName")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("DocumentStoreType");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("ShortName")
.IsRequired()
.HasMaxLength(32);
b.HasKey("Id");
b.ToTable("DocsProjects");
});
#pragma warning restore 612, 618
}
}
}

26
modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20180531130753_Added_DefaultDocumentName_To_Project.cs

@ -1,26 +0,0 @@
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Volo.DocsTestApp.EntityFrameworkCore.Migrations
{
public partial class Added_DefaultDocumentName_To_Project : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "DefaultDocumentName",
table: "DocsProjects",
maxLength: 128,
nullable: false,
defaultValue: "");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "DefaultDocumentName",
table: "DocsProjects");
}
}
}

58
modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20180531134117_Added_NavigationDocumentName_To_Project.Designer.cs

@ -1,58 +0,0 @@
// <auto-generated />
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Metadata.Internal;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Volo.DocsTestApp.EntityFrameworkCore;
namespace Volo.DocsTestApp.EntityFrameworkCore.Migrations
{
[DbContext(typeof(DocsTestAppDbContext))]
[Migration("20180531134117_Added_NavigationDocumentName_To_Project")]
partial class Added_NavigationDocumentName_To_Project
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.1.0-preview2-30571")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Volo.Docs.Projects.Project", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("DefaultDocumentName")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("DocumentStoreType");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("NavigationDocumentName")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("ShortName")
.IsRequired()
.HasMaxLength(32);
b.HasKey("Id");
b.ToTable("DocsProjects");
});
#pragma warning restore 612, 618
}
}
}

26
modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20180531134117_Added_NavigationDocumentName_To_Project.cs

@ -1,26 +0,0 @@
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Volo.DocsTestApp.EntityFrameworkCore.Migrations
{
public partial class Added_NavigationDocumentName_To_Project : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "NavigationDocumentName",
table: "DocsProjects",
maxLength: 128,
nullable: false,
defaultValue: "");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "NavigationDocumentName",
table: "DocsProjects");
}
}
}

59
modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20180601150905_Added_GoogleCustomSearchId_To_Project.Designer.cs

@ -1,59 +0,0 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Volo.DocsTestApp.EntityFrameworkCore;
namespace Volo.DocsTestApp.EntityFrameworkCore.Migrations
{
[DbContext(typeof(DocsTestAppDbContext))]
[Migration("20180601150905_Added_GoogleCustomSearchId_To_Project")]
partial class Added_GoogleCustomSearchId_To_Project
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.1.0-rtm-30799")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Volo.Docs.Projects.Project", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("DefaultDocumentName")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("DocumentStoreType");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<string>("GoogleCustomSearchId");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("NavigationDocumentName")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("ShortName")
.IsRequired()
.HasMaxLength(32);
b.HasKey("Id");
b.ToTable("DocsProjects");
});
#pragma warning restore 612, 618
}
}
}

22
modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20180601150905_Added_GoogleCustomSearchId_To_Project.cs

@ -1,22 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace Volo.DocsTestApp.EntityFrameworkCore.Migrations
{
public partial class Added_GoogleCustomSearchId_To_Project : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "GoogleCustomSearchId",
table: "DocsProjects",
nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "GoogleCustomSearchId",
table: "DocsProjects");
}
}
}

61
modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20180605212013_Added_Format_To_Project.Designer.cs

@ -1,61 +0,0 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Volo.DocsTestApp.EntityFrameworkCore;
namespace Volo.DocsTestApp.EntityFrameworkCore.Migrations
{
[DbContext(typeof(DocsTestAppDbContext))]
[Migration("20180605212013_Added_Format_To_Project")]
partial class Added_Format_To_Project
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.1.0-rtm-30799")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Volo.Docs.Projects.Project", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("DefaultDocumentName")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("DocumentStoreType");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<string>("Format");
b.Property<string>("GoogleCustomSearchId");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("NavigationDocumentName")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("ShortName")
.IsRequired()
.HasMaxLength(32);
b.HasKey("Id");
b.ToTable("DocsProjects");
});
#pragma warning restore 612, 618
}
}
}

22
modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20180605212013_Added_Format_To_Project.cs

@ -1,22 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace Volo.DocsTestApp.EntityFrameworkCore.Migrations
{
public partial class Added_Format_To_Project : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "Format",
table: "DocsProjects",
nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Format",
table: "DocsProjects");
}
}
}

63
modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20180925162715_Added_MainWebsiteUrl.Designer.cs

@ -1,63 +0,0 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Volo.DocsTestApp.EntityFrameworkCore;
namespace Volo.DocsTestApp.EntityFrameworkCore.Migrations
{
[DbContext(typeof(DocsTestAppDbContext))]
[Migration("20180925162715_Added_MainWebsiteUrl")]
partial class Added_MainWebsiteUrl
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.1.3-rtm-32065")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Volo.Docs.Projects.Project", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("DefaultDocumentName")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("DocumentStoreType");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<string>("Format");
b.Property<string>("GoogleCustomSearchId");
b.Property<string>("MainWebsiteUrl");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("NavigationDocumentName")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("ShortName")
.IsRequired()
.HasMaxLength(32);
b.HasKey("Id");
b.ToTable("DocsProjects");
});
#pragma warning restore 612, 618
}
}
}

22
modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20180925162715_Added_MainWebsiteUrl.cs

@ -1,22 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace Volo.DocsTestApp.EntityFrameworkCore.Migrations
{
public partial class Added_MainWebsiteUrl : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "MainWebsiteUrl",
table: "DocsProjects",
nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "MainWebsiteUrl",
table: "DocsProjects");
}
}
}

68
modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20181030125213_Added_Project_MinimumVersion.Designer.cs

@ -1,68 +0,0 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Volo.DocsTestApp.EntityFrameworkCore;
namespace Volo.DocsTestApp.EntityFrameworkCore.Migrations
{
[DbContext(typeof(DocsTestAppDbContext))]
[Migration("20181030125213_Added_Project_MinimumVersion")]
partial class Added_Project_MinimumVersion
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.1.4-rtm-31024")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Volo.Docs.Projects.Project", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("DefaultDocumentName")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("DocumentStoreType");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<string>("Format");
b.Property<string>("GoogleCustomSearchId");
b.Property<string>("LatestVersionBranchName")
.HasMaxLength(128);
b.Property<string>("MainWebsiteUrl");
b.Property<string>("MinimumVersion");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("NavigationDocumentName")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("ShortName")
.IsRequired()
.HasMaxLength(32);
b.HasKey("Id");
b.ToTable("DocsProjects");
});
#pragma warning restore 612, 618
}
}
}

32
modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20181030125213_Added_Project_MinimumVersion.cs

@ -1,32 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace Volo.DocsTestApp.EntityFrameworkCore.Migrations
{
public partial class Added_Project_MinimumVersion : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "LatestVersionBranchName",
table: "DocsProjects",
maxLength: 128,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "MinimumVersion",
table: "DocsProjects",
nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "LatestVersionBranchName",
table: "DocsProjects");
migrationBuilder.DropColumn(
name: "MinimumVersion",
table: "DocsProjects");
}
}
}

66
modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20181205154143_Removed_GoogleCustomSearchId.Designer.cs

@ -1,66 +0,0 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Volo.DocsTestApp.EntityFrameworkCore;
namespace Volo.DocsTestApp.EntityFrameworkCore.Migrations
{
[DbContext(typeof(DocsTestAppDbContext))]
[Migration("20181205154143_Removed_GoogleCustomSearchId")]
partial class Removed_GoogleCustomSearchId
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.1.1-rtm-30846")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Volo.Docs.Projects.Project", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("DefaultDocumentName")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("DocumentStoreType");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<string>("Format");
b.Property<string>("LatestVersionBranchName")
.HasMaxLength(128);
b.Property<string>("MainWebsiteUrl");
b.Property<string>("MinimumVersion");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("NavigationDocumentName")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("ShortName")
.IsRequired()
.HasMaxLength(32);
b.HasKey("Id");
b.ToTable("DocsProjects");
});
#pragma warning restore 612, 618
}
}
}

22
modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20181205154143_Removed_GoogleCustomSearchId.cs

@ -1,22 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace Volo.DocsTestApp.EntityFrameworkCore.Migrations
{
public partial class Removed_GoogleCustomSearchId : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "GoogleCustomSearchId",
table: "DocsProjects");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "GoogleCustomSearchId",
table: "DocsProjects",
nullable: true);
}
}
}

68
modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20181211141818_AggregateRoot_Changes.Designer.cs

@ -1,68 +0,0 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Volo.DocsTestApp.EntityFrameworkCore;
namespace Volo.DocsTestApp.EntityFrameworkCore.Migrations
{
[DbContext(typeof(DocsTestAppDbContext))]
[Migration("20181211141818_AggregateRoot_Changes")]
partial class AggregateRoot_Changes
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.1.1-rtm-30846")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Volo.Docs.Projects.Project", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ConcurrencyStamp");
b.Property<string>("DefaultDocumentName")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("DocumentStoreType");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<string>("Format");
b.Property<string>("LatestVersionBranchName")
.HasMaxLength(128);
b.Property<string>("MainWebsiteUrl");
b.Property<string>("MinimumVersion");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("NavigationDocumentName")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("ShortName")
.IsRequired()
.HasMaxLength(32);
b.HasKey("Id");
b.ToTable("DocsProjects");
});
#pragma warning restore 612, 618
}
}
}

22
modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20181211141818_AggregateRoot_Changes.cs

@ -1,22 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace Volo.DocsTestApp.EntityFrameworkCore.Migrations
{
public partial class AggregateRoot_Changes : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "ConcurrencyStamp",
table: "DocsProjects",
nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "ConcurrencyStamp",
table: "DocsProjects");
}
}
}

465
modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20181225134002_Initial20181225.Designer.cs

@ -0,0 +1,465 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Volo.DocsTestApp.EntityFrameworkCore;
namespace Volo.DocsTestApp.EntityFrameworkCore.Migrations
{
[DbContext(typeof(DocsTestAppDbContext))]
[Migration("20181225134002_Initial20181225")]
partial class Initial20181225
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.1.1-rtm-30846")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasColumnName("ConcurrencyStamp")
.HasMaxLength(256);
b.Property<string>("Description")
.HasMaxLength(256);
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsStatic");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(256);
b.Property<string>("Regex")
.HasMaxLength(512);
b.Property<string>("RegexDescription")
.HasMaxLength(128);
b.Property<bool>("Required");
b.Property<int>("ValueType");
b.HasKey("Id");
b.ToTable("AbpClaimTypes");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasColumnName("ConcurrencyStamp")
.HasMaxLength(256);
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDefault")
.HasColumnName("IsDefault");
b.Property<bool>("IsPublic")
.HasColumnName("IsPublic");
b.Property<bool>("IsStatic")
.HasColumnName("IsStatic");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(256);
b.Property<string>("NormalizedName")
.IsRequired()
.HasMaxLength(256);
b.Property<Guid?>("TenantId");
b.HasKey("Id");
b.HasIndex("NormalizedName");
b.ToTable("AbpRoles");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ClaimType")
.IsRequired()
.HasMaxLength(256);
b.Property<string>("ClaimValue")
.HasMaxLength(1024);
b.Property<Guid>("RoleId");
b.Property<Guid?>("TenantId");
b.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("AbpRoleClaims");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<int>("AccessFailedCount")
.ValueGeneratedOnAdd()
.HasColumnName("AccessFailedCount")
.HasDefaultValue(0);
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime");
b.Property<string>("Email")
.HasColumnName("Email")
.HasMaxLength(256);
b.Property<bool>("EmailConfirmed")
.ValueGeneratedOnAdd()
.HasColumnName("EmailConfirmed")
.HasDefaultValue(false);
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId");
b.Property<bool>("LockoutEnabled")
.ValueGeneratedOnAdd()
.HasColumnName("LockoutEnabled")
.HasDefaultValue(false);
b.Property<DateTimeOffset?>("LockoutEnd");
b.Property<string>("Name")
.HasColumnName("Name")
.HasMaxLength(64);
b.Property<string>("NormalizedEmail")
.HasColumnName("NormalizedEmail")
.HasMaxLength(256);
b.Property<string>("NormalizedUserName")
.IsRequired()
.HasColumnName("NormalizedUserName")
.HasMaxLength(256);
b.Property<string>("PasswordHash")
.HasColumnName("PasswordHash")
.HasMaxLength(256);
b.Property<string>("PhoneNumber")
.HasColumnName("PhoneNumber")
.HasMaxLength(16);
b.Property<bool>("PhoneNumberConfirmed")
.ValueGeneratedOnAdd()
.HasColumnName("PhoneNumberConfirmed")
.HasDefaultValue(false);
b.Property<string>("SecurityStamp")
.IsRequired()
.HasColumnName("SecurityStamp")
.HasMaxLength(256);
b.Property<string>("Surname")
.HasColumnName("Surname")
.HasMaxLength(64);
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId");
b.Property<bool>("TwoFactorEnabled")
.ValueGeneratedOnAdd()
.HasColumnName("TwoFactorEnabled")
.HasDefaultValue(false);
b.Property<string>("UserName")
.IsRequired()
.HasColumnName("UserName")
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("Email");
b.HasIndex("NormalizedEmail");
b.HasIndex("NormalizedUserName");
b.HasIndex("UserName");
b.ToTable("AbpUsers");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ClaimType")
.IsRequired()
.HasMaxLength(256);
b.Property<string>("ClaimValue")
.HasMaxLength(1024);
b.Property<Guid?>("TenantId");
b.Property<Guid>("UserId");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("AbpUserClaims");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b =>
{
b.Property<Guid>("UserId");
b.Property<string>("LoginProvider")
.HasMaxLength(64);
b.Property<string>("ProviderDisplayName")
.HasMaxLength(128);
b.Property<string>("ProviderKey")
.IsRequired()
.HasMaxLength(196);
b.Property<Guid?>("TenantId");
b.HasKey("UserId", "LoginProvider");
b.HasIndex("LoginProvider", "ProviderKey");
b.ToTable("AbpUserLogins");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b =>
{
b.Property<Guid>("UserId");
b.Property<Guid>("RoleId");
b.Property<Guid?>("TenantId");
b.HasKey("UserId", "RoleId");
b.HasIndex("RoleId", "UserId");
b.ToTable("AbpUserRoles");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b =>
{
b.Property<Guid>("UserId");
b.Property<string>("LoginProvider")
.HasMaxLength(64);
b.Property<string>("Name")
.HasMaxLength(128);
b.Property<Guid?>("TenantId");
b.Property<string>("Value");
b.HasKey("UserId", "LoginProvider", "Name");
b.ToTable("AbpUserTokens");
});
modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("ProviderKey")
.IsRequired()
.HasMaxLength(64);
b.Property<string>("ProviderName")
.IsRequired()
.HasMaxLength(64);
b.Property<Guid?>("TenantId");
b.HasKey("Id");
b.HasIndex("Name", "ProviderName", "ProviderKey");
b.ToTable("AbpPermissionGrants");
});
modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("ProviderKey")
.HasMaxLength(64);
b.Property<string>("ProviderName")
.HasMaxLength(64);
b.Property<string>("Value")
.IsRequired()
.HasMaxLength(2048);
b.HasKey("Id");
b.HasIndex("Name", "ProviderName", "ProviderKey");
b.ToTable("AbpSettings");
});
modelBuilder.Entity("Volo.Docs.Projects.Project", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp");
b.Property<string>("DefaultDocumentName")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("DocumentStoreType");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<string>("Format");
b.Property<string>("LatestVersionBranchName")
.HasMaxLength(128);
b.Property<string>("MainWebsiteUrl");
b.Property<string>("MinimumVersion");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("NavigationDocumentName")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("ShortName")
.IsRequired()
.HasMaxLength(32);
b.HasKey("Id");
b.ToTable("DocsProjects");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityRole")
.WithMany("Claims")
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityUser")
.WithMany("Claims")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityUser")
.WithMany("Logins")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityRole")
.WithMany()
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("Volo.Abp.Identity.IdentityUser")
.WithMany("Roles")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityUser")
.WithMany("Tokens")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
#pragma warning restore 612, 618
}
}
}

338
modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/20181225134002_Initial20181225.cs

@ -0,0 +1,338 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Volo.DocsTestApp.EntityFrameworkCore.Migrations
{
public partial class Initial20181225 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "AbpClaimTypes",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(maxLength: 256, nullable: false),
Name = table.Column<string>(maxLength: 256, nullable: false),
Required = table.Column<bool>(nullable: false),
IsStatic = table.Column<bool>(nullable: false),
Regex = table.Column<string>(maxLength: 512, nullable: true),
RegexDescription = table.Column<string>(maxLength: 128, nullable: true),
Description = table.Column<string>(maxLength: 256, nullable: true),
ValueType = table.Column<int>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpClaimTypes", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AbpPermissionGrants",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
TenantId = table.Column<Guid>(nullable: true),
Name = table.Column<string>(maxLength: 128, nullable: false),
ProviderName = table.Column<string>(maxLength: 64, nullable: false),
ProviderKey = table.Column<string>(maxLength: 64, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpPermissionGrants", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AbpRoles",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(maxLength: 256, nullable: false),
TenantId = table.Column<Guid>(nullable: true),
Name = table.Column<string>(maxLength: 256, nullable: false),
NormalizedName = table.Column<string>(maxLength: 256, nullable: false),
IsDefault = table.Column<bool>(nullable: false),
IsStatic = table.Column<bool>(nullable: false),
IsPublic = table.Column<bool>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpRoles", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AbpSettings",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
Name = table.Column<string>(maxLength: 128, nullable: false),
Value = table.Column<string>(maxLength: 2048, nullable: false),
ProviderName = table.Column<string>(maxLength: 64, nullable: true),
ProviderKey = table.Column<string>(maxLength: 64, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpSettings", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AbpUsers",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
LastModificationTime = table.Column<DateTime>(nullable: true),
LastModifierId = table.Column<Guid>(nullable: true),
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(nullable: true),
DeletionTime = table.Column<DateTime>(nullable: true),
TenantId = table.Column<Guid>(nullable: true),
UserName = table.Column<string>(maxLength: 256, nullable: false),
NormalizedUserName = table.Column<string>(maxLength: 256, nullable: false),
Name = table.Column<string>(maxLength: 64, nullable: true),
Surname = table.Column<string>(maxLength: 64, nullable: true),
Email = table.Column<string>(maxLength: 256, nullable: true),
NormalizedEmail = table.Column<string>(maxLength: 256, nullable: true),
EmailConfirmed = table.Column<bool>(nullable: false, defaultValue: false),
PasswordHash = table.Column<string>(maxLength: 256, nullable: true),
SecurityStamp = table.Column<string>(maxLength: 256, nullable: false),
PhoneNumber = table.Column<string>(maxLength: 16, nullable: true),
PhoneNumberConfirmed = table.Column<bool>(nullable: false, defaultValue: false),
TwoFactorEnabled = table.Column<bool>(nullable: false, defaultValue: false),
LockoutEnd = table.Column<DateTimeOffset>(nullable: true),
LockoutEnabled = table.Column<bool>(nullable: false, defaultValue: false),
AccessFailedCount = table.Column<int>(nullable: false, defaultValue: 0)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpUsers", x => x.Id);
});
migrationBuilder.CreateTable(
name: "DocsProjects",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
Name = table.Column<string>(maxLength: 128, nullable: false),
ShortName = table.Column<string>(maxLength: 32, nullable: false),
Format = table.Column<string>(nullable: true),
DefaultDocumentName = table.Column<string>(maxLength: 128, nullable: false),
NavigationDocumentName = table.Column<string>(maxLength: 128, nullable: false),
MinimumVersion = table.Column<string>(nullable: true),
DocumentStoreType = table.Column<string>(nullable: true),
MainWebsiteUrl = table.Column<string>(nullable: true),
LatestVersionBranchName = table.Column<string>(maxLength: 128, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_DocsProjects", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AbpRoleClaims",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
TenantId = table.Column<Guid>(nullable: true),
ClaimType = table.Column<string>(maxLength: 256, nullable: false),
ClaimValue = table.Column<string>(maxLength: 1024, nullable: true),
RoleId = table.Column<Guid>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpRoleClaims", x => x.Id);
table.ForeignKey(
name: "FK_AbpRoleClaims_AbpRoles_RoleId",
column: x => x.RoleId,
principalTable: "AbpRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AbpUserClaims",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
TenantId = table.Column<Guid>(nullable: true),
ClaimType = table.Column<string>(maxLength: 256, nullable: false),
ClaimValue = table.Column<string>(maxLength: 1024, nullable: true),
UserId = table.Column<Guid>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpUserClaims", x => x.Id);
table.ForeignKey(
name: "FK_AbpUserClaims_AbpUsers_UserId",
column: x => x.UserId,
principalTable: "AbpUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AbpUserLogins",
columns: table => new
{
TenantId = table.Column<Guid>(nullable: true),
UserId = table.Column<Guid>(nullable: false),
LoginProvider = table.Column<string>(maxLength: 64, nullable: false),
ProviderKey = table.Column<string>(maxLength: 196, nullable: false),
ProviderDisplayName = table.Column<string>(maxLength: 128, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpUserLogins", x => new { x.UserId, x.LoginProvider });
table.ForeignKey(
name: "FK_AbpUserLogins_AbpUsers_UserId",
column: x => x.UserId,
principalTable: "AbpUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AbpUserRoles",
columns: table => new
{
TenantId = table.Column<Guid>(nullable: true),
UserId = table.Column<Guid>(nullable: false),
RoleId = table.Column<Guid>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpUserRoles", x => new { x.UserId, x.RoleId });
table.ForeignKey(
name: "FK_AbpUserRoles_AbpRoles_RoleId",
column: x => x.RoleId,
principalTable: "AbpRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_AbpUserRoles_AbpUsers_UserId",
column: x => x.UserId,
principalTable: "AbpUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AbpUserTokens",
columns: table => new
{
TenantId = table.Column<Guid>(nullable: true),
UserId = table.Column<Guid>(nullable: false),
LoginProvider = table.Column<string>(maxLength: 64, nullable: false),
Name = table.Column<string>(maxLength: 128, nullable: false),
Value = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpUserTokens", x => new { x.UserId, x.LoginProvider, x.Name });
table.ForeignKey(
name: "FK_AbpUserTokens_AbpUsers_UserId",
column: x => x.UserId,
principalTable: "AbpUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey",
table: "AbpPermissionGrants",
columns: new[] { "Name", "ProviderName", "ProviderKey" });
migrationBuilder.CreateIndex(
name: "IX_AbpRoleClaims_RoleId",
table: "AbpRoleClaims",
column: "RoleId");
migrationBuilder.CreateIndex(
name: "IX_AbpRoles_NormalizedName",
table: "AbpRoles",
column: "NormalizedName");
migrationBuilder.CreateIndex(
name: "IX_AbpSettings_Name_ProviderName_ProviderKey",
table: "AbpSettings",
columns: new[] { "Name", "ProviderName", "ProviderKey" });
migrationBuilder.CreateIndex(
name: "IX_AbpUserClaims_UserId",
table: "AbpUserClaims",
column: "UserId");
migrationBuilder.CreateIndex(
name: "IX_AbpUserLogins_LoginProvider_ProviderKey",
table: "AbpUserLogins",
columns: new[] { "LoginProvider", "ProviderKey" });
migrationBuilder.CreateIndex(
name: "IX_AbpUserRoles_RoleId_UserId",
table: "AbpUserRoles",
columns: new[] { "RoleId", "UserId" });
migrationBuilder.CreateIndex(
name: "IX_AbpUsers_Email",
table: "AbpUsers",
column: "Email");
migrationBuilder.CreateIndex(
name: "IX_AbpUsers_NormalizedEmail",
table: "AbpUsers",
column: "NormalizedEmail");
migrationBuilder.CreateIndex(
name: "IX_AbpUsers_NormalizedUserName",
table: "AbpUsers",
column: "NormalizedUserName");
migrationBuilder.CreateIndex(
name: "IX_AbpUsers_UserName",
table: "AbpUsers",
column: "UserName");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "AbpClaimTypes");
migrationBuilder.DropTable(
name: "AbpPermissionGrants");
migrationBuilder.DropTable(
name: "AbpRoleClaims");
migrationBuilder.DropTable(
name: "AbpSettings");
migrationBuilder.DropTable(
name: "AbpUserClaims");
migrationBuilder.DropTable(
name: "AbpUserLogins");
migrationBuilder.DropTable(
name: "AbpUserRoles");
migrationBuilder.DropTable(
name: "AbpUserTokens");
migrationBuilder.DropTable(
name: "DocsProjects");
migrationBuilder.DropTable(
name: "AbpRoles");
migrationBuilder.DropTable(
name: "AbpUsers");
}
}
}

399
modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Migrations/DocsTestAppDbContextModelSnapshot.cs

@ -19,12 +19,364 @@ namespace Volo.DocsTestApp.EntityFrameworkCore.Migrations
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasColumnName("ConcurrencyStamp")
.HasMaxLength(256);
b.Property<string>("Description")
.HasMaxLength(256);
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsStatic");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(256);
b.Property<string>("Regex")
.HasMaxLength(512);
b.Property<string>("RegexDescription")
.HasMaxLength(128);
b.Property<bool>("Required");
b.Property<int>("ValueType");
b.HasKey("Id");
b.ToTable("AbpClaimTypes");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasColumnName("ConcurrencyStamp")
.HasMaxLength(256);
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDefault")
.HasColumnName("IsDefault");
b.Property<bool>("IsPublic")
.HasColumnName("IsPublic");
b.Property<bool>("IsStatic")
.HasColumnName("IsStatic");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(256);
b.Property<string>("NormalizedName")
.IsRequired()
.HasMaxLength(256);
b.Property<Guid?>("TenantId");
b.HasKey("Id");
b.HasIndex("NormalizedName");
b.ToTable("AbpRoles");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ClaimType")
.IsRequired()
.HasMaxLength(256);
b.Property<string>("ClaimValue")
.HasMaxLength(1024);
b.Property<Guid>("RoleId");
b.Property<Guid?>("TenantId");
b.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("AbpRoleClaims");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<int>("AccessFailedCount")
.ValueGeneratedOnAdd()
.HasColumnName("AccessFailedCount")
.HasDefaultValue(0);
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime");
b.Property<string>("Email")
.HasColumnName("Email")
.HasMaxLength(256);
b.Property<bool>("EmailConfirmed")
.ValueGeneratedOnAdd()
.HasColumnName("EmailConfirmed")
.HasDefaultValue(false);
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId");
b.Property<bool>("LockoutEnabled")
.ValueGeneratedOnAdd()
.HasColumnName("LockoutEnabled")
.HasDefaultValue(false);
b.Property<DateTimeOffset?>("LockoutEnd");
b.Property<string>("Name")
.HasColumnName("Name")
.HasMaxLength(64);
b.Property<string>("NormalizedEmail")
.HasColumnName("NormalizedEmail")
.HasMaxLength(256);
b.Property<string>("NormalizedUserName")
.IsRequired()
.HasColumnName("NormalizedUserName")
.HasMaxLength(256);
b.Property<string>("PasswordHash")
.HasColumnName("PasswordHash")
.HasMaxLength(256);
b.Property<string>("PhoneNumber")
.HasColumnName("PhoneNumber")
.HasMaxLength(16);
b.Property<bool>("PhoneNumberConfirmed")
.ValueGeneratedOnAdd()
.HasColumnName("PhoneNumberConfirmed")
.HasDefaultValue(false);
b.Property<string>("SecurityStamp")
.IsRequired()
.HasColumnName("SecurityStamp")
.HasMaxLength(256);
b.Property<string>("Surname")
.HasColumnName("Surname")
.HasMaxLength(64);
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId");
b.Property<bool>("TwoFactorEnabled")
.ValueGeneratedOnAdd()
.HasColumnName("TwoFactorEnabled")
.HasDefaultValue(false);
b.Property<string>("UserName")
.IsRequired()
.HasColumnName("UserName")
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("Email");
b.HasIndex("NormalizedEmail");
b.HasIndex("NormalizedUserName");
b.HasIndex("UserName");
b.ToTable("AbpUsers");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ClaimType")
.IsRequired()
.HasMaxLength(256);
b.Property<string>("ClaimValue")
.HasMaxLength(1024);
b.Property<Guid?>("TenantId");
b.Property<Guid>("UserId");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("AbpUserClaims");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b =>
{
b.Property<Guid>("UserId");
b.Property<string>("LoginProvider")
.HasMaxLength(64);
b.Property<string>("ProviderDisplayName")
.HasMaxLength(128);
b.Property<string>("ProviderKey")
.IsRequired()
.HasMaxLength(196);
b.Property<Guid?>("TenantId");
b.HasKey("UserId", "LoginProvider");
b.HasIndex("LoginProvider", "ProviderKey");
b.ToTable("AbpUserLogins");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b =>
{
b.Property<Guid>("UserId");
b.Property<Guid>("RoleId");
b.Property<Guid?>("TenantId");
b.HasKey("UserId", "RoleId");
b.HasIndex("RoleId", "UserId");
b.ToTable("AbpUserRoles");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b =>
{
b.Property<Guid>("UserId");
b.Property<string>("LoginProvider")
.HasMaxLength(64);
b.Property<string>("Name")
.HasMaxLength(128);
b.Property<Guid?>("TenantId");
b.Property<string>("Value");
b.HasKey("UserId", "LoginProvider", "Name");
b.ToTable("AbpUserTokens");
});
modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("ProviderKey")
.IsRequired()
.HasMaxLength(64);
b.Property<string>("ProviderName")
.IsRequired()
.HasMaxLength(64);
b.Property<Guid?>("TenantId");
b.HasKey("Id");
b.HasIndex("Name", "ProviderName", "ProviderKey");
b.ToTable("AbpPermissionGrants");
});
modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("ProviderKey")
.HasMaxLength(64);
b.Property<string>("ProviderName")
.HasMaxLength(64);
b.Property<string>("Value")
.IsRequired()
.HasMaxLength(2048);
b.HasKey("Id");
b.HasIndex("Name", "ProviderName", "ProviderKey");
b.ToTable("AbpSettings");
});
modelBuilder.Entity("Volo.Docs.Projects.Project", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ConcurrencyStamp");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp");
b.Property<string>("DefaultDocumentName")
.IsRequired()
@ -60,6 +412,51 @@ namespace Volo.DocsTestApp.EntityFrameworkCore.Migrations
b.ToTable("DocsProjects");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityRole")
.WithMany("Claims")
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityUser")
.WithMany("Claims")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityUser")
.WithMany("Logins")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityRole")
.WithMany()
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("Volo.Abp.Identity.IdentityUser")
.WithMany("Roles")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityUser")
.WithMany("Tokens")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
#pragma warning restore 612, 618
}
}

7
modules/docs/app/Volo.DocsTestApp.EntityFrameworkCore/Volo.DocsTestApp.EntityFrameworkCore.csproj

@ -4,10 +4,6 @@
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Migrations\20181101121126_Added_LatestVersionBranchName.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="2.1.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.1.0" />
@ -17,6 +13,9 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Volo.Docs.EntityFrameworkCore\Volo.Docs.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.EntityFrameworkCore.SqlServer\Volo.Abp.EntityFrameworkCore.SqlServer.csproj" />
<ProjectReference Include="..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.EntityFrameworkCore\Volo.Abp.PermissionManagement.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\modules\setting-management\src\Volo.Abp.SettingManagement.EntityFrameworkCore\Volo.Abp.SettingManagement.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.EntityFrameworkCore\Volo.Abp.Identity.EntityFrameworkCore.csproj" />
</ItemGroup>
</Project>

4
modules/docs/app/Volo.DocsTestApp/Controllers/HomeController.cs

@ -5,9 +5,9 @@ namespace Volo.DocsTestApp.Controllers
{
public class HomeController : AbpController
{
public ActionResult Index()
public void Index()
{
return Redirect("/Documents/");
}
}
}

25
modules/docs/app/Volo.DocsTestApp/DocsTestAppModule.cs

@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Localization;
@ -9,6 +10,7 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Swashbuckle.AspNetCore.Swagger;
using Volo.Abp;
using Volo.Abp.Account.Web;
using Volo.Abp.AspNetCore.Modularity;
using Volo.Abp.AspNetCore.Mvc.UI;
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap;
@ -18,19 +20,28 @@ using Volo.Abp.AspNetCore.Mvc.UI.Theming;
using Volo.Abp.Autofac;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Identity;
using Volo.Abp.Identity.Web;
using Volo.Abp.Modularity;
using Volo.Abp.Threading;
using Volo.Abp.UI;
using Volo.Abp.VirtualFileSystem;
using Volo.Docs;
using Volo.Docs.Admin;
using Volo.DocsTestApp.EntityFrameworkCore;
namespace Volo.DocsTestApp
{
[DependsOn(
typeof(DocsWebModule),
typeof(DocsAdminWebModule),
typeof(DocsApplicationModule),
typeof(DocsAdminApplicationModule),
typeof(DocsTestAppEntityFrameworkCoreModule),
typeof(AbpAutofacModule),
typeof(AbpAccountWebModule),
typeof(AbpIdentityWebModule),
typeof(AbpIdentityApplicationModule),
typeof(AbpAspNetCoreMvcUiBasicThemeModule)
)]
public class DocsTestAppModule : AbpModule
@ -62,6 +73,7 @@ namespace Volo.DocsTestApp
options.FileSets.ReplaceEmbeddedByPyhsical<AbpAspNetCoreMvcUiBasicThemeModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic", Path.DirectorySeparatorChar)));
options.FileSets.ReplaceEmbeddedByPyhsical<DocsDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Volo.Docs.Domain", Path.DirectorySeparatorChar)));
options.FileSets.ReplaceEmbeddedByPyhsical<DocsWebModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Volo.Docs.Web", Path.DirectorySeparatorChar)));
options.FileSets.ReplaceEmbeddedByPyhsical<DocsWebModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Volo.Docs.Admin.Web", Path.DirectorySeparatorChar)));
});
}
@ -72,7 +84,6 @@ namespace Volo.DocsTestApp
options.DocInclusionPredicate((docName, description) => true);
});
var cultures = new List<CultureInfo> { new CultureInfo("en"), new CultureInfo("tr") };
Configure<RequestLocalizationOptions>(options =>
{
@ -94,7 +105,7 @@ namespace Volo.DocsTestApp
app.UseDeveloperExceptionPage();
app.UseVirtualFiles();
app.UseSwagger();
app.UseSwaggerUI(options =>
{
@ -115,6 +126,16 @@ namespace Volo.DocsTestApp
name: "default",
template: "{controller=Home}/{action=Index}/{id?}");
});
AsyncHelper.RunSync(async () =>
{
await context.ServiceProvider
.GetRequiredService<IIdentityDataSeeder>()
.SeedAsync(
"1q2w3E*",
IdentityPermissions.GetAll().Union(DocsAdminPermissions.GetAll())
);
});
}
}
}

4
modules/docs/app/Volo.DocsTestApp/Pages/Index.cshtml

@ -0,0 +1,4 @@
@page
@model Volo.DocsTestApp.Pages.IndexModel
<h3>Welcome to the Docs demo application.</h3>
<a href="/Documents/">Go to Docs</a>

16
modules/docs/app/Volo.DocsTestApp/Pages/Index.cshtml.cs

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace Volo.DocsTestApp.Pages
{
public class IndexModel : PageModel
{
public void OnGet()
{
}
}
}

4
modules/docs/app/Volo.DocsTestApp/Pages/_ViewImports.cshtml

@ -1,4 +1,6 @@
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap
@addTagHelper *, Volo.Docs.Web
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling
@addTagHelper *, Volo.Docs.Web
@addTagHelper *, Volo.Docs.Admin.Web

5
modules/docs/app/Volo.DocsTestApp/Volo.DocsTestApp.csproj

@ -18,10 +18,15 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Volo.Docs.Application\Volo.Docs.Application.csproj" />
<ProjectReference Include="..\..\src\Volo.Docs.Admin.Application\Volo.Docs.Admin.Application.csproj" />
<ProjectReference Include="..\..\src\Volo.Docs.Web\Volo.Docs.Web.csproj" />
<ProjectReference Include="..\..\src\Volo.Docs.Admin.Web\Volo.Docs.Admin.Web.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj" />
<ProjectReference Include="..\Volo.DocsTestApp.EntityFrameworkCore\Volo.DocsTestApp.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.Application\Volo.Abp.Identity.Application.csproj" />
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.Web\Volo.Abp.Identity.Web.csproj" />
<ProjectReference Include="..\..\..\..\modules\account\src\Volo.Abp.Account.Web\Volo.Abp.Account.Web.csproj" />
</ItemGroup>
</Project>

10
modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo.Docs.Admin.Application.Contracts.csproj

@ -9,6 +9,16 @@
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<None Remove="Volo\Docs\Admin\Localization\Resources\Docs\ApplicationContracts\en.json" />
<None Remove="Volo\Docs\Admin\Localization\Resources\Docs\ApplicationContracts\tr.json" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Volo\Docs\Admin\Localization\Resources\Docs\ApplicationContracts\en.json" />
<EmbeddedResource Include="Volo\Docs\Admin\Localization\Resources\Docs\ApplicationContracts\tr.json" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Volo.Docs.Domain.Shared\Volo.Docs.Domain.Shared.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Ddd.Application\Volo.Abp.Ddd.Application.csproj" />

24
modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/DocsAdminApplicationContractsModule.cs

@ -1,5 +1,9 @@
using Volo.Abp.Application;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
using Volo.Abp.VirtualFileSystem;
using Volo.Docs.Localization;
namespace Volo.Docs.Admin
{
@ -9,6 +13,24 @@ namespace Volo.Docs.Admin
)]
public class DocsAdminApplicationContractsModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<PermissionOptions>(options =>
{
options.DefinitionProviders.Add<DocsAdminPermissionDefinitionProvider>();
});
Configure<VirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<DocsAdminApplicationContractsModule>();
});
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Get<DocsResource>()
.AddVirtualJson("Volo/Docs/Admin/Localization/Resources/Docs/ApplicationContracts");
});
}
}
}

24
modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/DocsAdminPermissionDefinitionProvider.cs

@ -0,0 +1,24 @@
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Localization;
using Volo.Docs.Localization;
namespace Volo.Docs.Admin
{
public class DocsAdminPermissionDefinitionProvider : PermissionDefinitionProvider
{
public override void Define(IPermissionDefinitionContext context)
{
var group = context.AddGroup(DocsAdminPermissions.GroupName, L("Permission:DocumentManagement"));
var projects = group.AddPermission(DocsAdminPermissions.Projects.Default, L("Permission:Projects"));
projects.AddChild(DocsAdminPermissions.Projects.Update, L("Permission:Edit"));
projects.AddChild(DocsAdminPermissions.Projects.Delete, L("Permission:Delete"));
projects.AddChild(DocsAdminPermissions.Projects.Create, L("Permission:Create"));
}
private static LocalizableString L(string name)
{
return LocalizableString.Create<DocsResource>(name);
}
}
}

31
modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/DocsAdminPermissions.cs

@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Volo.Docs.Admin
{
public class DocsAdminPermissions
{
public const string GroupName = "Docs.Admin";
public static class Projects
{
public const string Default = GroupName + ".Projects";
public const string Delete = Default + ".Delete";
public const string Update = Default + ".Update";
public const string Create = Default + ".Create";
}
public static string[] GetAll()
{
return new[]
{
GroupName,
Projects.Default,
Projects.Delete,
Projects.Update,
Projects.Create,
};
}
}
}

10
modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/Localization/Resources/Docs/ApplicationContracts/en.json

@ -0,0 +1,10 @@
{
"culture": "en",
"texts": {
"Permission:DocumentManagement": "Document Management",
"Permission:Projects": "Projects",
"Permission:Edit": "Edit",
"Permission:Delete": "Delete",
"Permission:Create": "Create"
}
}

10
modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/Localization/Resources/Docs/ApplicationContracts/tr.json

@ -0,0 +1,10 @@
{
"culture": "tr",
"texts": {
"Permission:DocumentManagement": "Döküman yönetimi",
"Permission:Projects": "Projeler",
"Permission:Edit": "Düzenle",
"Permission:Delete": "Sil",
"Permission:Create": "Oluştur"
}
}

9
modules/docs/src/Volo.Docs.Admin.Application/Volo/Docs/Admin/Projects/ProjectAdminAppService.cs

@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.Guids;
@ -8,6 +9,7 @@ using Volo.Docs.Projects;
namespace Volo.Docs.Admin.Projects
{
[Authorize(DocsAdminPermissions.Projects.Default)]
public class ProjectAdminAppService : ApplicationService, IProjectAdminAppService
{
private readonly IProjectRepository _projectRepository;
@ -22,11 +24,11 @@ namespace Volo.Docs.Admin.Projects
public async Task<PagedResultDto<ProjectDto>> GetListAsync(PagedAndSortedResultRequestDto input)
{
var blogs = await _projectRepository.GetListAsync(input.Sorting, input.MaxResultCount, input.SkipCount);
var projects = await _projectRepository.GetListAsync(input.Sorting, input.MaxResultCount, input.SkipCount);
var totalCount = await _projectRepository.GetTotalProjectCount();
var dtos = ObjectMapper.Map<List<Project>, List<ProjectDto>>(blogs);
var dtos = ObjectMapper.Map<List<Project>, List<ProjectDto>>(projects);
return new PagedResultDto<ProjectDto>(totalCount, dtos);
}
@ -38,6 +40,7 @@ namespace Volo.Docs.Admin.Projects
return ObjectMapper.Map<Project, ProjectDto>(project);
}
[Authorize(DocsAdminPermissions.Projects.Create)]
public async Task<ProjectDto> CreateAsync(CreateProjectDto input)
{
var project = new Project(_guidGenerator.Create(),
@ -64,6 +67,7 @@ namespace Volo.Docs.Admin.Projects
return ObjectMapper.Map<Project, ProjectDto>(project);
}
[Authorize(DocsAdminPermissions.Projects.Update)]
public async Task<ProjectDto> UpdateAsync(Guid id, UpdateProjectDto input)
{
var project = await _projectRepository.GetAsync(id);
@ -87,6 +91,7 @@ namespace Volo.Docs.Admin.Projects
return ObjectMapper.Map<Project, ProjectDto>(project);
}
[Authorize(DocsAdminPermissions.Projects.Delete)]
public async Task DeleteAsync(Guid id)
{
await _projectRepository.DeleteAsync(id);

50
modules/docs/src/Volo.Docs.Admin.HttpApi/Volo/Docs/Admin/Projects/DocsAdminProjectController.cs

@ -1,50 +0,0 @@
using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.AspNetCore.Mvc;
namespace Volo.Docs.Admin.Projects
{
[RemoteService]
[Area("docs")]
[ControllerName("Project")]
[Route("api/docs/admin/projects")]
public class DocsAdminProjectController : AbpController, IProjectAdminAppService
{
protected IProjectAdminAppService ProjectAppService { get; }
public DocsAdminProjectController(IProjectAdminAppService projectAppService)
{
ProjectAppService = projectAppService;
}
public Task<PagedResultDto<ProjectDto>> GetListAsync(PagedAndSortedResultRequestDto input)
{
return ProjectAppService.GetListAsync(input);
}
[HttpGet]
[Route("{id}")]
public Task<ProjectDto> GetAsync(Guid id)
{
return ProjectAppService.GetAsync(id);
}
public Task<ProjectDto> CreateAsync(CreateProjectDto input)
{
return ProjectAppService.CreateAsync(input);
}
public Task<ProjectDto> UpdateAsync(Guid id, UpdateProjectDto input)
{
return ProjectAppService.UpdateAsync(id, input);
}
public Task DeleteAsync(Guid id)
{
return ProjectAppService.DeleteAsync(id);
}
}
}

57
modules/docs/src/Volo.Docs.Admin.HttpApi/Volo/Docs/Admin/ProjectsAdminController.cs

@ -0,0 +1,57 @@
using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Docs.Admin.Projects;
namespace Volo.Docs.Admin
{
[RemoteService]
[Area("docs")]
[ControllerName("ProjectsAdmin")]
[Route("api/docs/admin/projects")]
public class ProjectsAdminController : AbpController, IProjectAdminAppService
{
private readonly IProjectAdminAppService _projectAppService;
public ProjectsAdminController(IProjectAdminAppService projectAdminAppService)
{
_projectAppService = projectAdminAppService;
}
[HttpGet]
[Route("")]
public Task<PagedResultDto<ProjectDto>> GetListAsync(PagedAndSortedResultRequestDto input)
{
return _projectAppService.GetListAsync(input);
}
[HttpGet]
[Route("{id}")]
public Task<ProjectDto> GetAsync(Guid id)
{
return _projectAppService.GetAsync(id);
}
[HttpPost]
public Task<ProjectDto> CreateAsync(CreateProjectDto input)
{
return _projectAppService.CreateAsync(input);
}
[HttpPut]
[Route("{id}")]
public Task<ProjectDto> UpdateAsync(Guid id, UpdateProjectDto input)
{
return _projectAppService.UpdateAsync(id, input);
}
[HttpDelete]
public Task DeleteAsync(Guid id)
{
return _projectAppService.DeleteAsync(id);
}
}
}

7
modules/docs/src/Volo.Docs.Admin.Web/DocsAdminWebAutoMapperProfile.cs

@ -1,5 +1,7 @@
using AutoMapper;
using Volo.Abp.AutoMapper;
using Volo.Docs.Admin.Pages.Docs.Admin.Projects;
using Volo.Docs.Admin.Projects;
namespace Volo.Docs.Admin
{
@ -7,7 +9,12 @@ namespace Volo.Docs.Admin
{
public DocsAdminWebAutoMapperProfile()
{
CreateMap<CreateModel.CreateGithubProjectViewModel, CreateProjectDto>().Ignore(x => x.ExtraProperties);
CreateMap<EditModel.EditGithubProjectViewModel, UpdateProjectDto>().Ignore(x => x.ExtraProperties);
CreateMap<ProjectDto, EditModel.EditGithubProjectViewModel > ()
.Ignore(x => x.GitHubAccessToken).Ignore(x => x.GitHubRootUrl);
}
}
}

19
modules/docs/src/Volo.Docs.Admin.Web/DocsAdminWebModule.cs

@ -1,7 +1,11 @@
using Volo.Abp.AspNetCore.Mvc.Localization;
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap;
using Volo.Abp.AutoMapper;
using Volo.Abp.Localization;
using Volo.Abp.Localization.Resources.AbpValidation;
using Volo.Abp.Modularity;
using Volo.Abp.UI;
using Volo.Abp.UI.Navigation;
using Volo.Abp.VirtualFileSystem;
using Volo.Docs.Localization;
@ -23,11 +27,26 @@ namespace Volo.Docs.Admin
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<NavigationOptions>(options =>
{
options.MenuContributors.Add(new DocsMenuContributor());
});
Configure<VirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<DocsAdminWebModule>("Volo.Docs.Admin");
});
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Get<DocsResource>()
.AddBaseTypes(typeof(AbpValidationResource))
.AddBaseTypes(typeof(AbpUiModule))
.AddVirtualJson("/Localization/Resources/Docs/Web");
});
Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<DocsAdminWebAutoMapperProfile>(validate: true);

41
modules/docs/src/Volo.Docs.Admin.Web/DocsMenuContributor.cs

@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Localization;
using Volo.Abp.UI.Navigation;
using Volo.Docs.Localization;
namespace Volo.Docs.Admin
{
public class DocsMenuContributor : IMenuContributor
{
public async Task ConfigureMenuAsync(MenuConfigurationContext context)
{
if (context.Menu.Name == StandardMenus.Main)
{
await ConfigureMainMenu(context);
}
}
private async Task ConfigureMainMenu(MenuConfigurationContext context)
{
var authorizationService = context.ServiceProvider.GetRequiredService<IAuthorizationService>();
var l = context.ServiceProvider.GetRequiredService<IStringLocalizer<DocsResource>>();
//if (await authorizationService.IsGrantedAsync(DocsAdminPermissions.GroupName))
{
var rootMenuItem = new ApplicationMenuItem("DocumentManagement", l["Menu:DocumentManagement"], "/Docs/Admin");
if (await authorizationService.IsGrantedAsync(DocsAdminPermissions.Projects.Default))
{
rootMenuItem.AddItem(new ApplicationMenuItem("ProjectManagement", l["Menu:ProjectManagement"], "/Docs/Admin/Projects"));
}
context.Menu.AddItem(rootMenuItem);
}
}
}
}

25
modules/docs/src/Volo.Docs.Admin.Web/Localization/Resources/Docs/Web/en.json

@ -0,0 +1,25 @@
{
"culture": "en",
"texts": {
"Menu:DocumentManagement": "Documents",
"Menu:ProjectManagement": "Projects",
"CreateANewProject": "Create new project",
"Edit": "Edit",
"Create": "Create",
"Projects": "Projects",
"Name": "Name",
"ShortName": "ShortName",
"DocumentStoreType": "DocumentStoreType",
"Format": "Format",
"DisplayName:Name": "Name",
"DisplayName:ShortName": "Short name",
"DisplayName:Format": "Format",
"DisplayName:DefaultDocumentName": "Default documentName",
"DisplayName:NavigationDocumentName": "Navigation document name",
"DisplayName:MinimumVersion": "Minimum version",
"DisplayName:MainWebsiteUrl": "Main web site url",
"DisplayName:LatestVersionBranchName": "Latest version branch name",
"DisplayName:GitHubRootUrl": "GitHub root url",
"DisplayName:GitHubAccessToken": "GitHub access token"
}
}

26
modules/docs/src/Volo.Docs.Admin.Web/Localization/Resources/Docs/Web/tr.json

@ -0,0 +1,26 @@
{
"culture": "tr",
"texts": {
"Menu:DocumentManagement": "Dökümanlar",
"Menu:ProjectManagement": "Projeler",
"CreateANewProject": "Yeni proje oluştur",
"Edit": "Düzenle",
"Create": "Yeni oluştur",
"Projects": "Projeler",
"Name": "İsim",
"ShortName": "Kısa isim",
"DocumentStoreType": "Döküman saklama tipi",
"Format": "Format",
"Actions": "İşlemler",
"DisplayName:Name": "Adı",
"DisplayName:ShortName": "Kısa adı",
"DisplayName:Format": "Format",
"DisplayName:DefaultDocumentName": "Varsayılan döküman adı",
"DisplayName:NavigationDocumentName": "Navigasyon dökümanı adı",
"DisplayName:MinimumVersion": "Minimum versiyon",
"DisplayName:MainWebsiteUrl": "Ana web site url'i",
"DisplayName:LatestVersionBranchName": "Son versiyon Branch adı",
"DisplayName:GitHubRootUrl": "GitHub kök url'i",
"DisplayName:GitHubAccessToken": "GitHub erişim jetonu"
}
}

13
modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/DocsAdminPage.cs

@ -0,0 +1,13 @@
using Microsoft.AspNetCore.Mvc.Localization;
using Microsoft.AspNetCore.Mvc.Razor.Internal;
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
using Volo.Docs.Localization;
namespace Volo.Docs.Admin.Pages.Docs.Admin
{
public abstract class DocsAdminPage : AbpPage
{
[RazorInject]
public IHtmlLocalizer<DocsResource> L { get; set; }
}
}

22
modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Projects/Create.cshtml

@ -0,0 +1,22 @@
@page
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal
@using Volo.Docs.Admin.Pages.Docs.Admin.Projects
@inherits Volo.Docs.Admin.Pages.Docs.Admin.DocsAdminPage
@model Volo.Docs.Admin.Pages.Docs.Admin.Projects.CreateModel
@{
Layout = null;
}
@if (Model.GithubProject != null)
{
<abp-dynamic-form submit-button="false" abp-model="@Model.GithubProject" asp-page="/Docs/Admin/Projects/Create">
<abp-modal size="@(AbpModalSize.Default)">
<abp-modal-header title="@L["Create"].Value"></abp-modal-header>
<abp-modal-body>
<abp-form-content />
</abp-modal-body>
<abp-modal-footer buttons="@(AbpModalButtons.Cancel|AbpModalButtons.Save)">
</abp-modal-footer>
</abp-modal>
</abp-dynamic-form>
}

112
modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Projects/Create.cshtml.cs

@ -0,0 +1,112 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.AspNetCore.Mvc.Rendering;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form;
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
using Volo.Docs.Admin.Projects;
using Volo.Docs.Projects;
namespace Volo.Docs.Admin.Pages.Docs.Admin.Projects
{
public class CreateModel : AbpPageModel
{
[BindProperty]
public CreateGithubProjectViewModel GithubProject { get; set; }
private readonly IProjectAdminAppService _projectAppService;
public List<SelectListItem> FormatTypes { get; set; }
= new List<SelectListItem> {new SelectListItem("markdown", "md")};
public CreateModel(IProjectAdminAppService projectAppService)
{
_projectAppService = projectAppService;
}
public async Task<ActionResult> OnGetAsync(string source)
{
if (source == "GitHub")
{
GithubProject = new CreateGithubProjectViewModel();
return Page();
}
else
{
throw new BusinessException("UnknowDocumentSourceExceptionMessage");
}
}
public async void OnPostAsync()
{
if (GithubProject != null)
{
var dto = GetGithubProjectAsDto();
await _projectAppService.CreateAsync(dto);
}
}
public CreateProjectDto GetGithubProjectAsDto()
{
var dto = ObjectMapper.Map<CreateGithubProjectViewModel, CreateProjectDto>(GithubProject);
dto.ExtraProperties = new Dictionary<string, object>
{
{nameof(GithubProject.GitHubRootUrl), GithubProject.GitHubRootUrl},
{nameof(GithubProject.GitHubAccessToken), GithubProject.GitHubAccessToken}
};
return dto;
}
public abstract class CreateProjectViewModelBase
{
[Required]
[StringLength(ProjectConsts.MaxNameLength)]
public string Name { get; set; }
[Required]
[StringLength(ProjectConsts.MaxShortNameLength)]
public string ShortName { get; set; }
[Required]
[SelectItems(nameof(FormatTypes))]
public string Format { get; set; }
[StringLength(ProjectConsts.MaxDefaultDocumentNameLength)]
public string DefaultDocumentName { get; set; }
[StringLength(ProjectConsts.MaxNavigationDocumentNameLength)]
public string NavigationDocumentName { get; set; }
[StringLength(ProjectConsts.MaxVersionNameLength)]
public string MinimumVersion { get; set; }
public string MainWebsiteUrl { get; set; }
[StringLength(ProjectConsts.MaxLatestVersionBranchNameLength)]
public string LatestVersionBranchName { get; set; }
[HiddenInput]
public string DocumentStoreType { get; set; } = "GitHub";
}
public class CreateGithubProjectViewModel : CreateProjectViewModelBase
{
[DisplayOrder(10001)]
[Required]
[StringLength(256)]
public string GitHubRootUrl { get; set; }
[DisplayOrder(10001)]
[StringLength(512)]
public string GitHubAccessToken { get; set; }
}
}
}

22
modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Projects/Edit.cshtml

@ -0,0 +1,22 @@
@page
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal
@using Volo.Docs.Admin.Pages.Docs.Admin.Projects
@inherits Volo.Docs.Admin.Pages.Docs.Admin.DocsAdminPage
@model Volo.Docs.Admin.Pages.Docs.Admin.Projects.EditModel
@{
Layout = null;
}
@if (Model.GithubProject != null)
{
<abp-dynamic-form submit-button="false" abp-model="@Model.GithubProject" asp-page="/Docs/Admin/Projects/Edit">
<abp-modal size="@(AbpModalSize.Default)">
<abp-modal-header title="@L["Edit"].Value"></abp-modal-header>
<abp-modal-body>
<abp-form-content />
</abp-modal-body>
<abp-modal-footer buttons="@(AbpModalButtons.Cancel|AbpModalButtons.Save)">
</abp-modal-footer>
</abp-modal>
</abp-dynamic-form>
}

119
modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Projects/Edit.cshtml.cs

@ -0,0 +1,119 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.AspNetCore.Mvc.Rendering;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form;
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
using Volo.Docs.Admin.Projects;
using Volo.Docs.Projects;
namespace Volo.Docs.Admin.Pages.Docs.Admin.Projects
{
public class EditModel : AbpPageModel
{
[BindProperty]
public EditGithubProjectViewModel GithubProject { get; set; }
private readonly IProjectAdminAppService _projectAppService;
public List<SelectListItem> FormatTypes { get; set; }
= new List<SelectListItem> { new SelectListItem("markdown", "md") };
public EditModel(IProjectAdminAppService projectAppService)
{
_projectAppService = projectAppService;
}
public async Task<ActionResult> OnGetAsync(Guid id)
{
var project = await _projectAppService.GetAsync(id);
if (project.DocumentStoreType == "GitHub")
{
SetGithubProjectFromDto(project);
return Page();
}
else
{
throw new BusinessException("UnknowDocumentSourceExceptionMessage");
}
}
public async void OnPostAsync()
{
if (GithubProject != null)
{
var dto = GetGithubProjectAsDto();
await _projectAppService.UpdateAsync(GithubProject.Id, dto);
}
}
public UpdateProjectDto GetGithubProjectAsDto()
{
var dto = ObjectMapper.Map<EditGithubProjectViewModel, UpdateProjectDto>(GithubProject);
dto.ExtraProperties = new Dictionary<string, object>
{
{nameof(GithubProject.GitHubRootUrl), GithubProject.GitHubRootUrl},
{nameof(GithubProject.GitHubAccessToken), GithubProject.GitHubAccessToken}
};
return dto;
}
public void SetGithubProjectFromDto(ProjectDto dto)
{
GithubProject = ObjectMapper.Map<ProjectDto,EditGithubProjectViewModel>(dto);
GithubProject.GitHubAccessToken = (string) dto.ExtraProperties[nameof(GithubProject.GitHubAccessToken)];
GithubProject.GitHubRootUrl = (string) dto.ExtraProperties[nameof(GithubProject.GitHubRootUrl)];
}
public abstract class EditProjectViewModelBase
{
[Required]
[HiddenInput]
public Guid Id { get; set; }
[Required]
[StringLength(ProjectConsts.MaxNameLength)]
public string Name { get; set; }
[Required]
[SelectItems(nameof(FormatTypes))]
public string Format { get; set; }
[StringLength(ProjectConsts.MaxDefaultDocumentNameLength)]
public string DefaultDocumentName { get; set; }
[StringLength(ProjectConsts.MaxNavigationDocumentNameLength)]
public string NavigationDocumentName { get; set; }
[StringLength(ProjectConsts.MaxVersionNameLength)]
public string MinimumVersion { get; set; }
public string MainWebsiteUrl { get; set; }
[StringLength(ProjectConsts.MaxLatestVersionBranchNameLength)]
public string LatestVersionBranchName { get; set; }
}
public class EditGithubProjectViewModel : EditProjectViewModelBase
{
[DisplayOrder(10001)]
[Required]
[StringLength(256)]
public string GitHubRootUrl { get; set; }
[DisplayOrder(10001)]
[StringLength(512)]
public string GitHubAccessToken { get; set; }
}
}
}

49
modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Projects/Index.cshtml

@ -0,0 +1,49 @@
@page
@using Microsoft.AspNetCore.Authorization
@using Volo.Docs.Admin
@inherits Volo.Docs.Admin.Pages.Docs.Admin.DocsAdminPage
@model Volo.Docs.Admin.Pages.Docs.Admin.Projects.IndexModel
@inject IAuthorizationService Authorization
@{
ViewBag.PageTitle = "Projects";
}
@section scripts {
<abp-script src="/Pages/Docs/Admin/Projects/index.js" />
<abp-script src="/Pages/Docs/Admin/Projects/create.js" />
<abp-script src="/Pages/Docs/Admin/Projects/edit.js" />
}
<abp-card>
<abp-card-header>
<abp-row>
<abp-column size-md="_6">
<h2>@L["Projects"]</h2>
</abp-column>
<abp-column size-md="_6" class="text-right">
@if (await Authorization.IsGrantedAsync(DocsAdminPermissions.Projects.Create))
{
<abp-dropdown>
<abp-dropdown-button button-type="Primary" icon="plus" text="@L["CreateANewProject"].Value"/>
<abp-dropdown-menu align="Right">
<abp-dropdown-item href="#" id="CreateNewGithubProjectButtonId">Github</abp-dropdown-item>
</abp-dropdown-menu>
</abp-dropdown>
}
</abp-column>
</abp-row>
</abp-card-header>
<abp-card-body>
<abp-table striped-rows="true" id="ProjectsTable" class="nowrap">
<thead>
<tr>
<th>@L["Actions"]</th>
<th>@L["Name"]</th>
<th>@L["ShortName"]</th>
<th>@L["DocumentStoreType"]</th>
<th>@L["Format"]</th>
</tr>
</thead>
</abp-table>
</abp-card-body>
</abp-card>

11
modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Projects/Index.cshtml.cs

@ -0,0 +1,11 @@
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
namespace Volo.Docs.Admin.Pages.Docs.Admin.Projects
{
public class IndexModel : AbpPageModel
{
public void OnGet()
{
}
}
}

14
modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Projects/create.js

@ -0,0 +1,14 @@
var abp = abp || {};
$(function () {
abp.modals.projectCreate = function () {
var initModal = function (publicApi, args) {
var $form = publicApi.getForm();
};
return {
initModal: initModal
}
};
});

14
modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Projects/edit.js

@ -0,0 +1,14 @@
var abp = abp || {};
$(function () {
abp.modals.projectEdit = function () {
var initModal = function (publicApi, args) {
var $form = publicApi.getForm();
};
return {
initModal: initModal
}
};
});

98
modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Projects/index.js

@ -0,0 +1,98 @@
$(function () {
var l = abp.localization.getResource('Docs');
var _createModal = new abp.ModalManager({
viewUrl: abp.appPath + 'Docs/Admin/Projects/Create',
modalClass: 'projectCreate'
});
var _editModal = new abp.ModalManager({
viewUrl: abp.appPath + 'Docs/Admin/Projects/Edit',
modalClass: 'projectEdit'
});
var _dataTable = $('#ProjectsTable').DataTable(abp.libs.datatables.normalizeConfiguration({
processing: true,
serverSide: true,
paging: true,
searching: false,
autoWidth: false,
scrollCollapse: true,
order: [[2, "desc"]],
ajax: abp.libs.datatables.createAjax(volo.docs.admin.projectsAdmin.getList),
columnDefs: [
{
rowAction: {
items:
[
{
text: l('Edit'),
visible: function () {
return true; //TODO: Check permission
},
action: function (data) {
_editModal.open({
Id: data.record.id
});
}
},
{
text: l('Delete'),
visible: function () {
return true; //TODO: Check permission
},
confirmMessage: function (data) { return l('ProjectDeletionWarningMessage') },
action: function (data) {
volo.docs.admin.projectsAdmin
.delete(data.record.id)
.then(function () {
_dataTable.ajax.reload();
});
}
}
]
}
},
{
target: 1,
data: "name"
},
{
target: 2,
data: "shortName"
},
{
target: 3,
data: "documentStoreType"
},
{
target: 4,
data: "format",
render: function (data) {
if (data === 'md') {
return 'markdown';
}
return data;
}
}
]
}));
$("#CreateNewGithubProjectButtonId").click(function (event) {
event.preventDefault();
_createModal.open({source:"GitHub"});
});
_createModal.onClose(function () {
_dataTable.ajax.reload();
});
_editModal.onResult(function () {
_dataTable.ajax.reload();
});
});

22
modules/docs/src/Volo.Docs.Admin.Web/Volo.Docs.Admin.Web.csproj

@ -33,17 +33,17 @@
<ItemGroup>
<Content Remove="wwwroot\**\*.*" />
<Content Remove="Pages\**\*.cshtml" />
<Content Remove="Pages\**\*.css" />
<Content Remove="Pages\**\*.js" />
<Content Remove="Localization\Resources\**\*.json" />
<Content Remove="Localization\Resources\Docs\Web\en.json" />
<Content Remove="Localization\Resources\Docs\Web\tr.json" />
<Content Remove="Pages\Docs\Admin\Projects\Create.cshtml" />
<Content Remove="Pages\Docs\Admin\Projects\Edit.cshtml" />
<Content Remove="Pages\Docs\Admin\Projects\Index.cshtml" />
<Content Remove="Properties\launchSettings.json" />
<Content Remove="compilerconfig.json" />
<Content Remove="compilerconfig.json.defaults" />
<None Remove="Pages\Documents\Project\bootstrap-toc.js" />
<None Remove="Pages\Documents\Project\index - Copy.css" />
<None Remove="Pages\Documents\Project\index - Copy.min.css" />
<None Remove="Pages\Documents\Project\vs.js" />
<None Remove="Pages\Docs\Admin\Projects\create.js" />
<None Remove="Pages\Docs\Admin\Projects\edit.js" />
<None Remove="Pages\Docs\Admin\Projects\index.js" />
<None Include="compilerconfig.json" />
<None Include="Properties\launchSettings.json" />
</ItemGroup>
@ -52,4 +52,10 @@
<Folder Include="wwwroot\" />
</ItemGroup>
<ItemGroup>
<Compile Update="Pages\Docs\Admin\Projects\Edit.cshtml.cs">
<DependentUpon>Edit.cshtml</DependentUpon>
</Compile>
</ItemGroup>
</Project>

7
modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/IdentityDbContextModelBuilderExtensions.cs

@ -22,15 +22,15 @@ namespace Volo.Abp.Identity.EntityFrameworkCore
{
b.ToTable(options.TablePrefix + "Users", options.Schema);
b.ConfigureAbpUser(options);
b.ConfigureFullAudited();
b.ConfigureExtraProperties();
b.ConfigureConcurrencyStamp();
b.ConfigureAbpUser(options);
b.Property(u => u.NormalizedUserName).IsRequired().HasMaxLength(IdentityUserConsts.MaxNormalizedUserNameLength).HasColumnName(nameof(IdentityUser.NormalizedUserName));
b.Property(u => u.NormalizedEmail).HasMaxLength(IdentityUserConsts.MaxNormalizedEmailLength).HasColumnName(nameof(IdentityUser.NormalizedEmail));
b.Property(u => u.PasswordHash).HasMaxLength(IdentityUserConsts.MaxPasswordHashLength).HasColumnName(nameof(IdentityUser.PasswordHash));
b.Property(u => u.SecurityStamp).IsRequired().HasMaxLength(IdentityUserConsts.MaxSecurityStampLength).HasColumnName(nameof(IdentityUser.SecurityStamp));
b.Property(u => u.ConcurrencyStamp).IsRequired().IsConcurrencyToken().HasMaxLength(IdentityUserConsts.MaxConcurrencyStampLength).HasColumnName(nameof(IdentityUser.ConcurrencyStamp));
b.Property(u => u.TwoFactorEnabled).HasDefaultValue(false).HasColumnName(nameof(IdentityUser.TwoFactorEnabled));
b.Property(u => u.LockoutEnabled).HasDefaultValue(false).HasColumnName(nameof(IdentityUser.LockoutEnabled));
b.Property(u => u.AccessFailedCount).HasDefaultValue(0).HasColumnName(nameof(IdentityUser.AccessFailedCount));
@ -95,6 +95,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore
{
b.ToTable(options.TablePrefix + "Roles", options.Schema);
b.ConfigureConcurrencyStamp();
b.ConfigureExtraProperties();
b.Property(r => r.Name).IsRequired().HasMaxLength(IdentityRoleConsts.MaxNameLength);

1
modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/AbpIdentityBsonClassMap.cs

@ -27,6 +27,7 @@ namespace Volo.Abp.Identity.MongoDB
BsonClassMap.RegisterClassMap<IdentityClaimType>(map =>
{
map.AutoMap();
map.ConfigureExtraProperties();
});
});
}

6
modules/identity/src/Volo.Abp.Identity.Web/Navigation/AbpIdentityWebMainMenuContributor.cs

@ -19,17 +19,17 @@ namespace Volo.Abp.Identity.Web.Navigation
var authorizationService = context.ServiceProvider.GetRequiredService<IAuthorizationService>();
var l = context.ServiceProvider.GetRequiredService<IStringLocalizer<IdentityResource>>();
var identityMenuItem = new ApplicationMenuItem("Identity", l["Menu:IdentityManagement"], icon: "fa fa-id-card-o");
var identityMenuItem = new ApplicationMenuItem(IdentityMenuNames.GroupName, l["Menu:IdentityManagement"], icon: "fa fa-id-card-o");
context.Menu.AddItem(identityMenuItem);
if (await authorizationService.IsGrantedAsync(IdentityPermissions.Roles.Default))
{
identityMenuItem.AddItem(new ApplicationMenuItem("Roles", l["Roles"], url: "/Identity/Roles"));
identityMenuItem.AddItem(new ApplicationMenuItem(IdentityMenuNames.Roles, l["Roles"], url: "/Identity/Roles"));
}
if (await authorizationService.IsGrantedAsync(IdentityPermissions.Users.Default))
{
identityMenuItem.AddItem(new ApplicationMenuItem("Users", l["Users"], url: "/Identity/Users"));
identityMenuItem.AddItem(new ApplicationMenuItem(IdentityMenuNames.Users, l["Users"], url: "/Identity/Users"));
}
}
}

10
modules/identity/src/Volo.Abp.Identity.Web/Navigation/IdentityMenuNames.cs

@ -0,0 +1,10 @@
namespace Volo.Abp.Identity.Web.Navigation
{
public class IdentityMenuNames
{
public const string GroupName = "AbpIdentity";
public const string Roles = GroupName + ".Roles";
public const string Users = GroupName + ".Users";
}
}

10
modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/Index.cshtml

@ -1,9 +1,17 @@
@page
@using Microsoft.AspNetCore.Mvc.Localization
@using Volo.Abp.AspNetCore.Mvc.UI.Layout
@using Volo.Abp.Identity.Localization
@using Volo.Abp.Identity.Web.Navigation
@using Volo.Abp.Identity.Web.Pages.Identity.Roles
@model IndexModel
@inject IHtmlLocalizer<IdentityResource> L
@inject IPageLayout PageLayout
@{
PageLayout.Content.Title = L["Roles"].Value;
PageLayout.Content.BreadCrumb.Add(L["Menu:IdentityManagement"].Value);
PageLayout.Content.MenuItemName = IdentityMenuNames.Roles;
}
@section scripts {
<abp-script-bundle name="@typeof(IndexModel).FullName">
<abp-script src="/Pages/AbpPermissionManagement/permission-management-modal.js" />
@ -14,7 +22,7 @@
<abp-card-header>
<abp-row>
<abp-column size-md="_6">
<h2>@L["Roles"]</h2>
<abp-card-title>@L["Roles"]</abp-card-title>
</abp-column>
<abp-column size-md="_6" class="text-right">
<abp-button button-type="Primary" name="CreateRole" text="@L["NewRole"].Value" icon="plus" />

30
modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/Index.cshtml

@ -1,12 +1,20 @@
@page
@using Microsoft.AspNetCore.Authorization
@using Microsoft.AspNetCore.Mvc.Localization
@using Volo.Abp.AspNetCore.Mvc.UI.Layout
@using Volo.Abp.Identity
@using Volo.Abp.Identity.Localization
@using Volo.Abp.Identity.Web.Navigation
@using Volo.Abp.Identity.Web.Pages.Identity.Users
@model IndexModel
@inject IHtmlLocalizer<IdentityResource> L
@inject IAuthorizationService Authorization
@inject IPageLayout PageLayout
@{
PageLayout.Content.Title = L["Users"].Value;
PageLayout.Content.BreadCrumb.Add(L["Menu:IdentityManagement"].Value);
PageLayout.Content.MenuItemName = IdentityMenuNames.Users;
}
@section scripts {
<abp-script-bundle name="@typeof(IndexModel).FullName">
<abp-script src="/Pages/AbpPermissionManagement/permission-management-modal.js" />
@ -18,26 +26,26 @@
<abp-card-header>
<abp-row>
<abp-column size-md="_6">
<h2>@L["Users"]</h2>
<abp-card-title>@L["Users"]</abp-card-title>
</abp-column>
<abp-column size-md="_6" class="text-right">
<abp-column size-md="_6" class="text-right">
@if (await Authorization.IsGrantedAsync(IdentityPermissions.Users.Create))
{
<abp-button button-type="Primary" name="CreateUser" text="@L["NewUser"].Value" icon="plus"/>
<abp-button button-type="Primary" name="CreateUser" text="@L["NewUser"].Value" icon="plus" />
}
</abp-column>
</abp-row>
</abp-card-header>
<abp-card-body>
<abp-table striped-rows="true" class="nowrap">
<thead>
<tr>
<th>@L["Actions"]</th>
<th>@L["UserName"]</th>
<th>@L["EmailAddress"]</th>
<th>@L["PhoneNumber"]</th>
</tr>
</thead>
<thead>
<tr>
<th>@L["Actions"]</th>
<th>@L["UserName"]</th>
<th>@L["EmailAddress"]</th>
<th>@L["PhoneNumber"]</th>
</tr>
</thead>
</abp-table>
</abp-card-body>
</abp-card>

2
modules/setting-management/src/Volo.Abp.SettingManagement.Web/Navigation/SettingManagementMainMenuContributor.cs

@ -25,7 +25,7 @@ namespace Volo.Abp.SettingManagement.Web.Navigation
//TODO: Localize
//var l = context.ServiceProvider.GetRequiredService<IStringLocalizer<IdentityResource>>();
context.Menu.AddItem(new ApplicationMenuItem("Volo.Abp.SettingManagement", "Settings", "/SettingManagement", icon: "fa fa-cog", order: int.MaxValue - 1000));
context.Menu.AddItem(new ApplicationMenuItem(SettingManagementMenuNames.GroupName, "Settings", "/SettingManagement", icon: "fa fa-cog", order: int.MaxValue - 1000));
return Task.CompletedTask;
}

14
modules/setting-management/src/Volo.Abp.SettingManagement.Web/Navigation/SettingManagementMenuNames.cs

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Volo.Abp.SettingManagement.Web.Navigation
{
public class SettingManagementMenuNames
{
public const string GroupName = "SettingManagement";
public const string Settings = GroupName + ".Settings";
}
}

38
modules/setting-management/src/Volo.Abp.SettingManagement.Web/Pages/SettingManagement/Index.cshtml

@ -1,19 +1,37 @@
@page
@using Volo.Abp.AspNetCore.Mvc.UI.Layout
@using Volo.Abp.SettingManagement.Web.Navigation
@using Volo.Abp.SettingManagement.Web.Pages.SettingManagement
@model IndexModel
@inject IPageLayout PageLayout
@{
PageLayout.Content.Title = /*L["Settings"].Value*/ "Settings";
PageLayout.Content.MenuItemName = SettingManagementMenuNames.GroupName;
}
@section scripts {
<abp-script-bundle name="@typeof(IndexModel).FullName">
<abp-script src="/Pages/SettingManagement/Index.js" />
</abp-script-bundle>
}
<abp-tabs tab-style="PillVertical" vertical-header-size="_2">
@foreach (var group in Model.SettingPageCreationContext.Groups)
{
<abp-tab title="@group.DisplayName">
<h2>@group.DisplayName</h2>
@await Component.InvokeAsync(group.ComponentType)
</abp-tab>
}
</abp-tabs>
<abp-card id="SettingManagementWrapper">
<abp-card-header>
<abp-row>
<abp-column size-md="_6">
<abp-card-title>@*@L["Settings"]*@Settings</abp-card-title>
</abp-column>
</abp-row>
</abp-card-header>
<abp-card-body>
<abp-tabs tab-style="PillVertical" vertical-header-size="_2">
@foreach (var group in Model.SettingPageCreationContext.Groups)
{
<abp-tab title="@group.DisplayName">
<h2>@group.DisplayName</h2>
@await Component.InvokeAsync(group.ComponentType)
</abp-tab>
}
</abp-tabs>
</abp-card-body>
</abp-card>

4
modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Navigation/AbpTenantManagementWebMainMenuContributor.cs

@ -19,12 +19,12 @@ namespace Volo.Abp.TenantManagement.Web.Navigation
var authorizationService = context.ServiceProvider.GetRequiredService<IAuthorizationService>();
var l = context.ServiceProvider.GetRequiredService<IStringLocalizer<AbpTenantManagementResource>>();
var tenantManagementMenuItem = new ApplicationMenuItem("TenantManagement", l["Menu:TenantManagement"]);
var tenantManagementMenuItem = new ApplicationMenuItem(TenantManagementMenuNames.GroupName, l["Menu:TenantManagement"], icon: "fa fa-users");
context.Menu.AddItem(tenantManagementMenuItem);
if (await authorizationService.IsGrantedAsync(TenantManagementPermissions.Tenants.Default))
{
tenantManagementMenuItem.AddItem(new ApplicationMenuItem("Tenants", l["Tenants"], url: "/TenantManagement/Tenants"));
tenantManagementMenuItem.AddItem(new ApplicationMenuItem(TenantManagementMenuNames.Tenants, l["Tenants"], url: "/TenantManagement/Tenants"));
}
}
}

9
modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Navigation/TenantManagementMenuNames.cs

@ -0,0 +1,9 @@
namespace Volo.Abp.TenantManagement.Web.Navigation
{
public class TenantManagementMenuNames
{
public const string GroupName = "TenantManagement";
public const string Tenants = GroupName + ".Tenants";
}
}

10
modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/Index.cshtml

@ -1,9 +1,17 @@
@page
@using Microsoft.AspNetCore.Mvc.Localization
@using Volo.Abp.AspNetCore.Mvc.UI.Layout
@using Volo.Abp.TenantManagement.Localization
@using Volo.Abp.TenantManagement.Web.Navigation
@using Volo.Abp.TenantManagement.Web.Pages.TenantManagement.Tenants
@model IndexModel
@inject IHtmlLocalizer<AbpTenantManagementResource> L
@inject IPageLayout PageLayout
@{
PageLayout.Content.Title = L["Tenants"].Value;
PageLayout.Content.BreadCrumb.Add(L["Menu:TenantManagement"].Value);
PageLayout.Content.MenuItemName = TenantManagementMenuNames.Tenants;
}
@section scripts {
<script type="text/javascript" src="~/modules/multi-tenancy/views/tenants/index.js"></script>
}
@ -11,7 +19,7 @@
<abp-card-header>
<abp-row>
<abp-column size-md="_6">
<h2>@L["Tenants"]</h2>
<abp-card-title>@L["Tenants"]</abp-card-title>
</abp-column>
<abp-column size-md="_6" class="text-right">
<abp-button button-type="Primary" name="CreateTenant" icon="plus" text="@L["NewTenant"].Value" />

Loading…
Cancel
Save