mirror of https://github.com/abpframework/abp.git
333 changed files with 63574 additions and 34 deletions
@ -0,0 +1,27 @@ |
|||
{ |
|||
"iisSettings": { |
|||
"windowsAuthentication": false, |
|||
"anonymousAuthentication": true, |
|||
"iisExpress": { |
|||
"applicationUrl": "http://localhost:57333/", |
|||
"sslPort": 0 |
|||
} |
|||
}, |
|||
"profiles": { |
|||
"IIS Express": { |
|||
"commandName": "IISExpress", |
|||
"launchBrowser": true, |
|||
"environmentVariables": { |
|||
"ASPNETCORE_ENVIRONMENT": "Development" |
|||
} |
|||
}, |
|||
"Volo.Abp.AspNetCore.Mvc.UI.Dashboards": { |
|||
"commandName": "Project", |
|||
"launchBrowser": true, |
|||
"environmentVariables": { |
|||
"ASPNETCORE_ENVIRONMENT": "Development" |
|||
}, |
|||
"applicationUrl": "http://localhost:57343/" |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,34 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk.Web"> |
|||
|
|||
<Import Project="..\..\..\common.props" /> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>netstandard2.0</TargetFramework> |
|||
<AssemblyName>Volo.Abp.AspNetCore.Mvc.UI.Dashboards</AssemblyName> |
|||
<PackageId>Volo.Abp.AspNetCore.Mvc.UI.Dashboards</PackageId> |
|||
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> |
|||
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute> |
|||
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute> |
|||
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute> |
|||
<IsPackable>true</IsPackable> |
|||
<OutputType>Library</OutputType> |
|||
<RootNamespace /> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<EmbeddedResource Include="Volo\Abp\AspNetCore\Mvc\UI\Dashboards\Components\**\*.cshtml" /> |
|||
<Content Remove="Volo\Abp\AspNetCore\Mvc\UI\Dashboards\Components\**\*.cshtml" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<Content Remove="Volo\Abp\AspNetCore\Mvc\UI\Dashboards\_ViewImports.cshtml" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<EmbeddedResource Include="Volo\Abp\AspNetCore\Mvc\UI\Dashboards\_ViewImports.cshtml" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\Volo.Abp.AspNetCore.Mvc.UI.Widgets\Volo.Abp.AspNetCore.Mvc.UI.Widgets.csproj" /> |
|||
</ItemGroup> |
|||
</Project> |
|||
@ -0,0 +1,20 @@ |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Widgets; |
|||
using Volo.Abp.Modularity; |
|||
using Volo.Abp.VirtualFileSystem; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Dashboards |
|||
{ |
|||
[DependsOn( |
|||
typeof(AbpAspNetCoreMvcUiWidgetsModule) |
|||
)] |
|||
public class AbpAspNetCoreMvcUiDashboardsModule : AbpModule |
|||
{ |
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
Configure<VirtualFileSystemOptions>(options => |
|||
{ |
|||
options.FileSets.AddEmbedded<AbpAspNetCoreMvcUiDashboardsModule>(); |
|||
}); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,17 @@ |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Microsoft.Extensions.Options; |
|||
using System.Linq; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Widgets; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Dashboards.Components.Dashboard |
|||
{ |
|||
public class DashboardViewComponent : AbpViewComponent |
|||
{ |
|||
public async Task<IViewComponentResult> InvokeAsync(string dashboardName, DashboardOptions dashboardOptions, WidgetOptions widgetOptions) |
|||
{ |
|||
var model = new DashboardViewModel(dashboardName, dashboardOptions, widgetOptions); |
|||
return View("~/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/Components/Dashboard/Default.cshtml", model); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,27 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Widgets; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Dashboards.Components.Dashboard |
|||
{ |
|||
public class DashboardViewModel |
|||
{ |
|||
public DashboardDefinition Dashboard { get; set; } |
|||
public DashboardOptions DashboardOptions { get; set; } |
|||
public WidgetOptions WidgetOptions { get; set; } |
|||
|
|||
public DashboardViewModel(string dashboardName, DashboardOptions dashboardOptions, WidgetOptions widgetOptions) |
|||
{ |
|||
Dashboard = dashboardOptions.Dashboards.Single(d => d.Name.Equals(dashboardName)); |
|||
DashboardOptions = dashboardOptions; |
|||
WidgetOptions = widgetOptions; |
|||
} |
|||
|
|||
public WidgetDefinition GetWidget(string name) |
|||
{ |
|||
return WidgetOptions.Widgets.Single(d => d.Name.Equals(name)); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,21 @@ |
|||
@using Microsoft.Extensions.Localization |
|||
@using Volo.Abp.AspNetCore.Mvc.UI.Widgets |
|||
@inject IWidgetRenderer WidgetRenderer |
|||
@inject IStringLocalizerFactory localizer |
|||
@model Volo.Abp.AspNetCore.Mvc.UI.Dashboards.Components.Dashboard.DashboardViewModel |
|||
@{ |
|||
} |
|||
<abp-row> |
|||
@foreach (var widgetConfiguration in Model.Dashboard.AvailableWidgets) |
|||
{ |
|||
var widgetDefinition = Model.GetWidget(widgetConfiguration.WidgetName); |
|||
widgetDefinition.DefaultDimensions = widgetConfiguration.Dimensions ?? widgetDefinition.DefaultDimensions ?? new WidgetDimensions(5, 5); |
|||
|
|||
<abp-column class="col-@widgetDefinition.DefaultDimensions.Width" |
|||
style="height: @(widgetDefinition.DefaultDimensions.Height * 100)px" |
|||
abp-border="Danger"> |
|||
|
|||
@await WidgetRenderer.RenderAsync(Component, widgetDefinition.Name) |
|||
</abp-column> |
|||
} |
|||
</abp-row> |
|||
@ -0,0 +1,49 @@ |
|||
using System.Collections.Generic; |
|||
using JetBrains.Annotations; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Widgets; |
|||
using Volo.Abp.Localization; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Dashboards |
|||
{ |
|||
public class DashboardDefinition |
|||
{ |
|||
/// <summary>
|
|||
/// Unique name of the dashboard.
|
|||
/// </summary>
|
|||
[NotNull] |
|||
public string Name { get; } |
|||
|
|||
/// <summary>
|
|||
/// A list of Widgets available for this dashboard.
|
|||
/// </summary>
|
|||
public List<DashboardWidgetConfiguration> AvailableWidgets { get; } |
|||
|
|||
/// <summary>
|
|||
/// Display name of the widget.
|
|||
/// </summary>
|
|||
[NotNull] |
|||
public ILocalizableString DisplayName |
|||
{ |
|||
get => _displayName; |
|||
set => _displayName = Check.NotNull(value, nameof(value)); |
|||
} |
|||
private ILocalizableString _displayName; |
|||
|
|||
public DashboardDefinition( |
|||
[NotNull] string name, |
|||
[CanBeNull] ILocalizableString displayName) |
|||
{ |
|||
Name = Check.NotNullOrWhiteSpace(name, nameof(name)); |
|||
DisplayName = displayName ?? new FixedLocalizableString(name); |
|||
|
|||
AvailableWidgets = new List<DashboardWidgetConfiguration>(); |
|||
} |
|||
|
|||
public DashboardDefinition WithWidget(string widgetName, WidgetLocation location = null, WidgetDimensions dimensions = null) |
|||
{ |
|||
AvailableWidgets.Add( new DashboardWidgetConfiguration(widgetName, dimensions, location)); |
|||
|
|||
return this; |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,14 @@ |
|||
using System.Collections.Generic; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Dashboards |
|||
{ |
|||
public class DashboardOptions |
|||
{ |
|||
public List<DashboardDefinition> Dashboards { get; } |
|||
|
|||
public DashboardOptions() |
|||
{ |
|||
Dashboards = new List<DashboardDefinition>(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,15 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Html; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Dashboards.Components.Dashboard; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Dashboards |
|||
{ |
|||
public class DashboardRenderer : IDashboardRenderer |
|||
{ |
|||
public async Task<IHtmlContent> RenderAsync(IViewComponentHelper componentHelper, object args = null) |
|||
{ |
|||
return await componentHelper.InvokeAsync(typeof(DashboardViewComponent), args ?? new object()); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,28 @@ |
|||
using JetBrains.Annotations; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Widgets; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Dashboards |
|||
{ |
|||
public class DashboardWidgetConfiguration |
|||
{ |
|||
[NotNull] |
|||
public string WidgetName { get; } |
|||
|
|||
[CanBeNull] |
|||
public WidgetDimensions Dimensions { get; set; } |
|||
|
|||
[CanBeNull] |
|||
public WidgetLocation Location { get; set; } |
|||
|
|||
public DashboardWidgetConfiguration( |
|||
[NotNull] string widgetName, |
|||
[CanBeNull] WidgetDimensions dimensions = null, |
|||
[CanBeNull] WidgetLocation location = null |
|||
) |
|||
{ |
|||
WidgetName = Check.NotNullOrWhiteSpace(widgetName, nameof(widgetName)); |
|||
Dimensions = dimensions; |
|||
Location = location; |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,15 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Html; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp.DependencyInjection; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Dashboards |
|||
{ |
|||
public interface IDashboardRenderer : ITransientDependency |
|||
{ |
|||
Task<IHtmlContent> RenderAsync(IViewComponentHelper componentHelper, object args = null); |
|||
} |
|||
} |
|||
@ -0,0 +1,15 @@ |
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Dashboards |
|||
{ |
|||
public class WidgetLocation |
|||
{ |
|||
public int X { get; set; } |
|||
|
|||
public int Y { get; set; } |
|||
|
|||
public WidgetLocation(int x, int y) |
|||
{ |
|||
X = x; |
|||
Y = y; |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,3 @@ |
|||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers |
|||
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap |
|||
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling |
|||
@ -0,0 +1,16 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<Import Project="..\..\..\common.props" /> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>netstandard2.0</TargetFramework> |
|||
<AssemblyName>Volo.Abp.AspNetCore.Mvc.UI.Widgets</AssemblyName> |
|||
<PackageId>Volo.Abp.AspNetCore.Mvc.UI.Widgets</PackageId> |
|||
<RootNamespace /> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\Volo.Abp.AspNetCore.Mvc.UI.Bootstrap\Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -0,0 +1,13 @@ |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap; |
|||
using Volo.Abp.Modularity; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Widgets |
|||
{ |
|||
[DependsOn( |
|||
typeof(AbpAspNetCoreMvcUiBootstrapModule) |
|||
)] |
|||
public class AbpAspNetCoreMvcUiWidgetsModule : AbpModule |
|||
{ |
|||
|
|||
} |
|||
} |
|||
@ -0,0 +1,12 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Html; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp.DependencyInjection; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Widgets |
|||
{ |
|||
public interface IWidgetRenderer : ITransientDependency |
|||
{ |
|||
Task<IHtmlContent> RenderAsync(IViewComponentHelper componentHelper, string widgetName, object args = null); |
|||
} |
|||
} |
|||
@ -0,0 +1,44 @@ |
|||
using System; |
|||
using JetBrains.Annotations; |
|||
using Volo.Abp.Localization; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Widgets |
|||
{ |
|||
public class WidgetDefinition |
|||
{ |
|||
/// <summary>
|
|||
/// Unique name of the widget.
|
|||
/// </summary>
|
|||
[NotNull] |
|||
public string Name { get; } |
|||
|
|||
/// <summary>
|
|||
/// Display name of the widget.
|
|||
/// </summary>
|
|||
[NotNull] |
|||
public ILocalizableString DisplayName |
|||
{ |
|||
get => _displayName; |
|||
set => _displayName = Check.NotNull(value, nameof(value)); |
|||
} |
|||
private ILocalizableString _displayName; |
|||
|
|||
[NotNull] |
|||
public Type ViewComponentType { get; } |
|||
|
|||
[CanBeNull] |
|||
public WidgetDimensions DefaultDimensions { get; set; } |
|||
|
|||
public WidgetDefinition( |
|||
[NotNull] string name, |
|||
[NotNull] Type viewComponentType, |
|||
[CanBeNull] ILocalizableString displayName, |
|||
[CanBeNull] WidgetDimensions defaultDimensions = null) |
|||
{ |
|||
DefaultDimensions = defaultDimensions; |
|||
Name = Check.NotNullOrWhiteSpace(name, nameof(name)); |
|||
ViewComponentType = Check.NotNull(viewComponentType, nameof(viewComponentType)); |
|||
DisplayName = displayName ?? new FixedLocalizableString(name); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,15 @@ |
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Widgets |
|||
{ |
|||
public class WidgetDimensions |
|||
{ |
|||
public int Width { get; } |
|||
|
|||
public int Height { get; } |
|||
|
|||
public WidgetDimensions(int width, int height) |
|||
{ |
|||
Width = width; |
|||
Height = height; |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,14 @@ |
|||
using System.Collections.Generic; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Widgets |
|||
{ |
|||
public class WidgetOptions |
|||
{ |
|||
public List<WidgetDefinition> Widgets { get; } |
|||
|
|||
public WidgetOptions() |
|||
{ |
|||
Widgets = new List<WidgetDefinition>(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,25 @@ |
|||
using System.Linq; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Html; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Microsoft.Extensions.Options; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Widgets |
|||
{ |
|||
public class WidgetRenderer : IWidgetRenderer |
|||
{ |
|||
private readonly WidgetOptions _widgetOptions; |
|||
|
|||
public WidgetRenderer(IOptions<WidgetOptions> widgetOptions) |
|||
{ |
|||
_widgetOptions = widgetOptions.Value; |
|||
} |
|||
|
|||
public async Task<IHtmlContent> RenderAsync(IViewComponentHelper componentHelper, string widgetName, object args = null) |
|||
{ |
|||
var componentType = _widgetOptions.Widgets.Single(w=>w.Name.Equals(widgetName)).ViewComponentType; |
|||
|
|||
return await componentHelper.InvokeAsync(componentType, args ?? new object()); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,18 @@ |
|||
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2-alpine AS base |
|||
WORKDIR /app |
|||
EXPOSE 80 |
|||
|
|||
FROM mcr.microsoft.com/dotnet/core/sdk:2.2-alpine AS build |
|||
WORKDIR /src |
|||
COPY . . |
|||
WORKDIR "/src/modules/docs/app/VoloDocs.Migrator" |
|||
RUN dotnet restore -nowarn:msb3202,nu1503 |
|||
RUN dotnet build --no-restore -c Release -o /app |
|||
|
|||
FROM build AS publish |
|||
RUN dotnet publish --no-restore -c Release -o /app |
|||
|
|||
FROM base AS final |
|||
WORKDIR /app |
|||
COPY --from=publish /app . |
|||
ENTRYPOINT ["dotnet", "VoloDocs.Migrator.dll"] |
|||
@ -0,0 +1,18 @@ |
|||
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2-alpine AS base |
|||
WORKDIR /app |
|||
EXPOSE 80 |
|||
|
|||
FROM mcr.microsoft.com/dotnet/core/sdk:2.2-alpine AS build |
|||
WORKDIR /src |
|||
COPY . . |
|||
WORKDIR "/src/modules/docs/app/VoloDocs.Web" |
|||
RUN dotnet restore -nowarn:msb3202,nu1503 |
|||
RUN dotnet build --no-restore -c Release -o /app |
|||
|
|||
FROM build AS publish |
|||
RUN dotnet publish --no-restore -c Release -o /app |
|||
|
|||
FROM base AS final |
|||
WORKDIR /app |
|||
COPY --from=publish /app . |
|||
ENTRYPOINT ["dotnet", "VoloDocs.Web.dll"] |
|||
@ -0,0 +1,12 @@ |
|||
version: '3.4' |
|||
|
|||
services: |
|||
volo-docs-migrator: |
|||
image: 'volosoft/volo-docs-migrator:${TAG:-latest}' |
|||
build: |
|||
context: ../../ |
|||
dockerfile: modules/docs/app/VoloDocs.Migrator/Dockerfile |
|||
environment: |
|||
- ConnectionString=Server=sqlserver;Database=VoloDocs;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false |
|||
depends_on: |
|||
- sqlserver |
|||
@ -0,0 +1,17 @@ |
|||
version: '3.4' |
|||
|
|||
services: |
|||
sqlserver: |
|||
environment: |
|||
- SA_PASSWORD=yourStrong(!)Password |
|||
- ACCEPT_EULA=Y |
|||
ports: |
|||
- "1433:1433" |
|||
|
|||
volo-docs: |
|||
environment: |
|||
- ConnectionString=Server=sqlserver;Database=VoloDocs;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false |
|||
- Title=VoloDocs |
|||
- LogoUrl=/assets/images/Logo.png |
|||
ports: |
|||
- "80:80" |
|||
@ -0,0 +1,18 @@ |
|||
version: '3.4' |
|||
|
|||
services: |
|||
sqlserver: |
|||
image: mcr.microsoft.com/mssql/server |
|||
volumes: |
|||
- dbdata:/var/opt/mssql |
|||
|
|||
volo-docs: |
|||
image: 'volosoft/volo-docs:${TAG:-latest}' |
|||
build: |
|||
context: ../../ |
|||
dockerfile: modules/docs/app/VoloDocs.Web/Dockerfile |
|||
depends_on: |
|||
- sqlserver |
|||
|
|||
volumes: |
|||
dbdata: |
|||
@ -0,0 +1 @@ |
|||
**/wwwroot/libs/** linguist-vendored |
|||
@ -0,0 +1,255 @@ |
|||
## Ignore Visual Studio temporary files, build results, and |
|||
## files generated by popular Visual Studio add-ons. |
|||
|
|||
# User-specific files |
|||
*.suo |
|||
*.user |
|||
*.userosscache |
|||
*.sln.docstates |
|||
|
|||
# User-specific files (MonoDevelop/Xamarin Studio) |
|||
*.userprefs |
|||
|
|||
# Build results |
|||
[Dd]ebug/ |
|||
[Dd]ebugPublic/ |
|||
[Rr]elease/ |
|||
[Rr]eleases/ |
|||
x64/ |
|||
x86/ |
|||
bld/ |
|||
[Bb]in/ |
|||
[Oo]bj/ |
|||
[Ll]og/ |
|||
|
|||
# Visual Studio 2015 cache/options directory |
|||
.vs/ |
|||
# Uncomment if you have tasks that create the project's static files in wwwroot |
|||
#wwwroot/ |
|||
|
|||
# MSTest test Results |
|||
[Tt]est[Rr]esult*/ |
|||
[Bb]uild[Ll]og.* |
|||
|
|||
# NUNIT |
|||
*.VisualState.xml |
|||
TestResult.xml |
|||
|
|||
# Build Results of an ATL Project |
|||
[Dd]ebugPS/ |
|||
[Rr]eleasePS/ |
|||
dlldata.c |
|||
|
|||
# DNX |
|||
project.lock.json |
|||
artifacts/ |
|||
|
|||
*_i.c |
|||
*_p.c |
|||
*_i.h |
|||
*.ilk |
|||
*.meta |
|||
*.obj |
|||
*.pch |
|||
*.pdb |
|||
*.pgc |
|||
*.pgd |
|||
*.rsp |
|||
*.sbr |
|||
*.tlb |
|||
*.tli |
|||
*.tlh |
|||
*.tmp |
|||
*.tmp_proj |
|||
*.log |
|||
*.vspscc |
|||
*.vssscc |
|||
.builds |
|||
*.pidb |
|||
*.svclog |
|||
*.scc |
|||
|
|||
# Chutzpah Test files |
|||
_Chutzpah* |
|||
|
|||
# Visual C++ cache files |
|||
ipch/ |
|||
*.aps |
|||
*.ncb |
|||
*.opendb |
|||
*.opensdf |
|||
*.sdf |
|||
*.cachefile |
|||
*.VC.db |
|||
*.VC.VC.opendb |
|||
|
|||
# Visual Studio profiler |
|||
*.psess |
|||
*.vsp |
|||
*.vspx |
|||
*.sap |
|||
|
|||
# TFS 2012 Local Workspace |
|||
$tf/ |
|||
|
|||
# Guidance Automation Toolkit |
|||
*.gpState |
|||
|
|||
# ReSharper is a .NET coding add-in |
|||
_ReSharper*/ |
|||
*.[Rr]e[Ss]harper |
|||
*.DotSettings.user |
|||
|
|||
# JustCode is a .NET coding add-in |
|||
.JustCode |
|||
|
|||
# TeamCity is a build add-in |
|||
_TeamCity* |
|||
|
|||
# DotCover is a Code Coverage Tool |
|||
*.dotCover |
|||
|
|||
# NCrunch |
|||
_NCrunch_* |
|||
.*crunch*.local.xml |
|||
nCrunchTemp_* |
|||
|
|||
# MightyMoose |
|||
*.mm.* |
|||
AutoTest.Net/ |
|||
|
|||
# Web workbench (sass) |
|||
.sass-cache/ |
|||
|
|||
# Installshield output folder |
|||
[Ee]xpress/ |
|||
|
|||
# DocProject is a documentation generator add-in |
|||
DocProject/buildhelp/ |
|||
DocProject/Help/*.HxT |
|||
DocProject/Help/*.HxC |
|||
DocProject/Help/*.hhc |
|||
DocProject/Help/*.hhk |
|||
DocProject/Help/*.hhp |
|||
DocProject/Help/Html2 |
|||
DocProject/Help/html |
|||
|
|||
# Click-Once directory |
|||
publish/ |
|||
|
|||
# Publish Web Output |
|||
*.[Pp]ublish.xml |
|||
*.azurePubxml |
|||
# TODO: Comment the next line if you want to checkin your web deploy settings |
|||
# but database connection strings (with potential passwords) will be unencrypted |
|||
*.pubxml |
|||
*.publishproj |
|||
|
|||
# Microsoft Azure Web App publish settings. Comment the next line if you want to |
|||
# checkin your Azure Web App publish settings, but sensitive information contained |
|||
# in these scripts will be unencrypted |
|||
PublishScripts/ |
|||
|
|||
# NuGet Packages |
|||
*.nupkg |
|||
# The packages folder can be ignored because of Package Restore |
|||
**/packages/* |
|||
# except build/, which is used as an MSBuild target. |
|||
!**/packages/build/ |
|||
# Uncomment if necessary however generally it will be regenerated when needed |
|||
#!**/packages/repositories.config |
|||
# NuGet v3's project.json files produces more ignoreable files |
|||
*.nuget.props |
|||
*.nuget.targets |
|||
|
|||
# Microsoft Azure Build Output |
|||
csx/ |
|||
*.build.csdef |
|||
|
|||
# Microsoft Azure Emulator |
|||
ecf/ |
|||
rcf/ |
|||
|
|||
# Windows Store app package directories and files |
|||
AppPackages/ |
|||
BundleArtifacts/ |
|||
Package.StoreAssociation.xml |
|||
_pkginfo.txt |
|||
|
|||
# Visual Studio cache files |
|||
# files ending in .cache can be ignored |
|||
*.[Cc]ache |
|||
# but keep track of directories ending in .cache |
|||
!*.[Cc]ache/ |
|||
|
|||
# Others |
|||
ClientBin/ |
|||
~$* |
|||
*~ |
|||
*.dbmdl |
|||
*.dbproj.schemaview |
|||
*.pfx |
|||
*.publishsettings |
|||
node_modules/ |
|||
orleans.codegen.cs |
|||
|
|||
# Since there are multiple workflows, uncomment next line to ignore bower_components |
|||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) |
|||
#bower_components/ |
|||
|
|||
# RIA/Silverlight projects |
|||
Generated_Code/ |
|||
|
|||
# Backup & report files from converting an old project file |
|||
# to a newer Visual Studio version. Backup files are not needed, |
|||
# because we have git ;-) |
|||
_UpgradeReport_Files/ |
|||
Backup*/ |
|||
UpgradeLog*.XML |
|||
UpgradeLog*.htm |
|||
|
|||
# SQL Server files |
|||
*.mdf |
|||
*.ldf |
|||
|
|||
# Business Intelligence projects |
|||
*.rdl.data |
|||
*.bim.layout |
|||
*.bim_*.settings |
|||
|
|||
# Microsoft Fakes |
|||
FakesAssemblies/ |
|||
|
|||
# GhostDoc plugin setting file |
|||
*.GhostDoc.xml |
|||
|
|||
# Node.js Tools for Visual Studio |
|||
.ntvs_analysis.dat |
|||
|
|||
# Visual Studio 6 build log |
|||
*.plg |
|||
|
|||
# Visual Studio 6 workspace options file |
|||
*.opt |
|||
|
|||
# Visual Studio LightSwitch build output |
|||
**/*.HTMLClient/GeneratedArtifacts |
|||
**/*.DesktopClient/GeneratedArtifacts |
|||
**/*.DesktopClient/ModelManifest.xml |
|||
**/*.Server/GeneratedArtifacts |
|||
**/*.Server/ModelManifest.xml |
|||
_Pvt_Extensions |
|||
|
|||
# Paket dependency manager |
|||
.paket/paket.exe |
|||
paket-files/ |
|||
|
|||
# FAKE - F# Make |
|||
.fake/ |
|||
|
|||
# JetBrains Rider |
|||
.idea/ |
|||
*.sln.iml |
|||
|
|||
# DashboardDemo |
|||
src/DashboardDemo.Web/Logs/logs.txt |
|||
@ -0,0 +1,74 @@ |
|||
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00 |
|||
# Visual Studio 15 |
|||
VisualStudioVersion = 15.0.27703.1 |
|||
MinimumVisualStudioVersion = 10.0.40219.1 |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DashboardDemo.Domain", "src\DashboardDemo.Domain\DashboardDemo.Domain.csproj", "{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DashboardDemo.Application", "src\DashboardDemo.Application\DashboardDemo.Application.csproj", "{1A94A50E-06DC-43C1-80B5-B662820EC3EB}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DashboardDemo.EntityFrameworkCore", "src\DashboardDemo.EntityFrameworkCore\DashboardDemo.EntityFrameworkCore.csproj", "{C956DD76-69C8-4A9C-83EA-D17DF83340FD}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DashboardDemo.Web", "src\DashboardDemo.Web\DashboardDemo.Web.csproj", "{068855E8-9240-4F1A-910B-CF825794513B}" |
|||
EndProject |
|||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{CA9AC87F-097E-4F15-8393-4BC07735A5B0}" |
|||
EndProject |
|||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{04DBDB01-70F4-4E06-B468-8F87850B22BE}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DashboardDemo.Application.Tests", "test\DashboardDemo.Application.Tests\DashboardDemo.Application.Tests.csproj", "{50B2631D-129C-47B3-A587-029CCD6099BC}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DashboardDemo.Web.Tests", "test\DashboardDemo.Web.Tests\DashboardDemo.Web.Tests.csproj", "{5F1B28C6-8D0C-4155-92D0-252F7EA5F674}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DashboardDemo.EntityFrameworkCore.DbMigrations", "src\DashboardDemo.EntityFrameworkCore.DbMigrations\DashboardDemo.EntityFrameworkCore.DbMigrations.csproj", "{0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0}" |
|||
EndProject |
|||
Global |
|||
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
|||
Debug|Any CPU = Debug|Any CPU |
|||
Release|Any CPU = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
|||
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{068855E8-9240-4F1A-910B-CF825794513B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{068855E8-9240-4F1A-910B-CF825794513B}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{068855E8-9240-4F1A-910B-CF825794513B}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{068855E8-9240-4F1A-910B-CF825794513B}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{50B2631D-129C-47B3-A587-029CCD6099BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{50B2631D-129C-47B3-A587-029CCD6099BC}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{50B2631D-129C-47B3-A587-029CCD6099BC}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{50B2631D-129C-47B3-A587-029CCD6099BC}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{5F1B28C6-8D0C-4155-92D0-252F7EA5F674}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{5F1B28C6-8D0C-4155-92D0-252F7EA5F674}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{5F1B28C6-8D0C-4155-92D0-252F7EA5F674}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{5F1B28C6-8D0C-4155-92D0-252F7EA5F674}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(SolutionProperties) = preSolution |
|||
HideSolutionNode = FALSE |
|||
EndGlobalSection |
|||
GlobalSection(NestedProjects) = preSolution |
|||
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} |
|||
{1A94A50E-06DC-43C1-80B5-B662820EC3EB} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} |
|||
{C956DD76-69C8-4A9C-83EA-D17DF83340FD} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} |
|||
{068855E8-9240-4F1A-910B-CF825794513B} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} |
|||
{50B2631D-129C-47B3-A587-029CCD6099BC} = {04DBDB01-70F4-4E06-B468-8F87850B22BE} |
|||
{5F1B28C6-8D0C-4155-92D0-252F7EA5F674} = {04DBDB01-70F4-4E06-B468-8F87850B22BE} |
|||
{0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} |
|||
EndGlobalSection |
|||
GlobalSection(ExtensibilityGlobals) = postSolution |
|||
SolutionGuid = {28315BFD-90E7-4E14-A2EA-F3D23AF4126F} |
|||
EndGlobalSection |
|||
EndGlobal |
|||
@ -0,0 +1,7 @@ |
|||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> |
|||
<s:Boolean x:Key="/Default/Environment/InjectedLayers/FileInjectedLayer/=59923913AE66194DB837F628B1FC08BE/@KeyIndexDefined">True</s:Boolean> |
|||
<s:String x:Key="/Default/Environment/InjectedLayers/FileInjectedLayer/=59923913AE66194DB837F628B1FC08BE/AbsolutePath/@EntryValue">D:\github\abp\common.DotSettings</s:String> |
|||
<s:String x:Key="/Default/Environment/InjectedLayers/FileInjectedLayer/=59923913AE66194DB837F628B1FC08BE/RelativePath/@EntryValue">..\..\..\common.DotSettings</s:String> |
|||
<s:Boolean x:Key="/Default/Environment/InjectedLayers/InjectedLayerCustomization/=File59923913AE66194DB837F628B1FC08BE/@KeyIndexDefined">True</s:Boolean> |
|||
<s:Double x:Key="/Default/Environment/InjectedLayers/InjectedLayerCustomization/=File59923913AE66194DB837F628B1FC08BE/RelativePriority/@EntryValue">1</s:Double> |
|||
</wpf:ResourceDictionary> |
|||
@ -0,0 +1,7 @@ |
|||
<Project> |
|||
<PropertyGroup> |
|||
<LangVersion>latest</LangVersion> |
|||
<Version>1.0.0</Version> |
|||
<NoWarn>$(NoWarn);CS1591</NoWarn> |
|||
</PropertyGroup> |
|||
</Project> |
|||
@ -0,0 +1,18 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<Import Project="..\..\common.props" /> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>netcoreapp2.2</TargetFramework> |
|||
<RootNamespace>DashboardDemo</RootNamespace> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\DashboardDemo.Domain\DashboardDemo.Domain.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.Application\Volo.Abp.Identity.Application.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.Application\Volo.Abp.TenantManagement.Application.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.Application\Volo.Abp.FeatureManagement.Application.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.Application\Volo.Abp.PermissionManagement.Application.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -0,0 +1,12 @@ |
|||
using AutoMapper; |
|||
|
|||
namespace DashboardDemo |
|||
{ |
|||
public class DashboardDemoApplicationAutoMapperProfile : Profile |
|||
{ |
|||
public DashboardDemoApplicationAutoMapperProfile() |
|||
{ |
|||
//Configure your AutoMapper mapping configuration here...
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,27 @@ |
|||
using Volo.Abp.AutoMapper; |
|||
using Volo.Abp.FeatureManagement; |
|||
using Volo.Abp.Identity; |
|||
using Volo.Abp.Modularity; |
|||
using Volo.Abp.PermissionManagement; |
|||
using Volo.Abp.TenantManagement; |
|||
|
|||
namespace DashboardDemo |
|||
{ |
|||
[DependsOn( |
|||
typeof(DashboardDemoDomainModule), |
|||
typeof(AbpIdentityApplicationModule), |
|||
typeof(AbpPermissionManagementApplicationModule), |
|||
typeof(AbpTenantManagementApplicationModule), |
|||
typeof(AbpFeatureManagementApplicationModule) |
|||
)] |
|||
public class DashboardDemoApplicationModule : AbpModule |
|||
{ |
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
Configure<AbpAutoMapperOptions>(options => |
|||
{ |
|||
options.AddProfile<DashboardDemoApplicationAutoMapperProfile>(); |
|||
}); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,22 @@ |
|||
using DashboardDemo.Localization.DashboardDemo; |
|||
using Volo.Abp.Authorization.Permissions; |
|||
using Volo.Abp.Localization; |
|||
|
|||
namespace DashboardDemo.Permissions |
|||
{ |
|||
public class DashboardDemoPermissionDefinitionProvider : PermissionDefinitionProvider |
|||
{ |
|||
public override void Define(IPermissionDefinitionContext context) |
|||
{ |
|||
var myGroup = context.AddGroup(DashboardDemoPermissions.GroupName); |
|||
|
|||
//Define your own permissions here. Examaple:
|
|||
//myGroup.AddPermission(DashboardDemoPermissions.MyPermission1, L("Permission:MyPermission1"));
|
|||
} |
|||
|
|||
private static LocalizableString L(string name) |
|||
{ |
|||
return LocalizableString.Create<DashboardDemoResource>(name); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,19 @@ |
|||
using System; |
|||
using Volo.Abp.Reflection; |
|||
|
|||
namespace DashboardDemo.Permissions |
|||
{ |
|||
public static class DashboardDemoPermissions |
|||
{ |
|||
public const string GroupName = "DashboardDemo"; |
|||
|
|||
//Add your own permission names. Example:
|
|||
//public const string MyPermission1 = GroupName + ".MyPermission1";
|
|||
|
|||
public static string[] GetAll() |
|||
{ |
|||
//Return an array of all permissions
|
|||
return ReflectionHelper.GetPublicConstantsRecursively(typeof(DashboardDemoPermissions)); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,25 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<Import Project="..\..\common.props" /> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>netcoreapp2.2</TargetFramework> |
|||
<RootNamespace>DashboardDemo</RootNamespace> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Auditing\Volo.Abp.Auditing.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.Domain\Volo.Abp.Identity.Domain.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\background-jobs\src\Volo.Abp.BackgroundJobs.Domain\Volo.Abp.BackgroundJobs.Domain.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\audit-logging\src\Volo.Abp.AuditLogging.Domain\Volo.Abp.AuditLogging.Domain.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.Domain\Volo.Abp.TenantManagement.Domain.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.Domain\Volo.Abp.FeatureManagement.Domain.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.PermissionManagement.Domain.Identity\Volo.Abp.PermissionManagement.Domain.Identity.csproj" /> |
|||
<PackageReference Include="Microsoft.AspNetCore.Mvc.DataAnnotations" Version="2.2.0" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<EmbeddedResource Include="Localization\DashboardDemo\*.json" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -0,0 +1,11 @@ |
|||
namespace DashboardDemo |
|||
{ |
|||
public static class DashboardDemoConsts |
|||
{ |
|||
public const string DbTablePrefix = "App"; |
|||
|
|||
public const string DbSchema = null; |
|||
|
|||
public const bool IsMultiTenancyEnabled = true; |
|||
} |
|||
} |
|||
@ -0,0 +1,49 @@ |
|||
using DashboardDemo.Localization.DashboardDemo; |
|||
using Volo.Abp.Auditing; |
|||
using Volo.Abp.AuditLogging; |
|||
using Volo.Abp.BackgroundJobs; |
|||
using Volo.Abp.FeatureManagement; |
|||
using Volo.Abp.Identity; |
|||
using Volo.Abp.Localization; |
|||
using Volo.Abp.Localization.Resources.AbpValidation; |
|||
using Volo.Abp.Modularity; |
|||
using Volo.Abp.MultiTenancy; |
|||
using Volo.Abp.PermissionManagement.Identity; |
|||
using Volo.Abp.TenantManagement; |
|||
using Volo.Abp.VirtualFileSystem; |
|||
|
|||
namespace DashboardDemo |
|||
{ |
|||
[DependsOn( |
|||
typeof(AbpIdentityDomainModule), |
|||
typeof(AbpPermissionManagementDomainIdentityModule), |
|||
typeof(AbpAuditingModule), |
|||
typeof(BackgroundJobsDomainModule), |
|||
typeof(AbpAuditLoggingDomainModule), |
|||
typeof(AbpTenantManagementDomainModule), |
|||
typeof(AbpFeatureManagementDomainModule) |
|||
)] |
|||
public class DashboardDemoDomainModule : AbpModule |
|||
{ |
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
Configure<VirtualFileSystemOptions>(options => |
|||
{ |
|||
options.FileSets.AddEmbedded<DashboardDemoDomainModule>("DashboardDemo"); |
|||
}); |
|||
|
|||
Configure<AbpLocalizationOptions>(options => |
|||
{ |
|||
options.Resources |
|||
.Add<DashboardDemoResource>("en") |
|||
.AddBaseTypes(typeof(AbpValidationResource)) |
|||
.AddVirtualJson("/Localization/DashboardDemo"); |
|||
}); |
|||
|
|||
Configure<MultiTenancyOptions>(options => |
|||
{ |
|||
options.IsEnabled = DashboardDemoConsts.IsMultiTenancyEnabled; |
|||
}); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,10 @@ |
|||
using Volo.Abp.Localization; |
|||
|
|||
namespace DashboardDemo.Localization.DashboardDemo |
|||
{ |
|||
[LocalizationResourceName("DashboardDemo")] |
|||
public class DashboardDemoResource |
|||
{ |
|||
|
|||
} |
|||
} |
|||
@ -0,0 +1,8 @@ |
|||
{ |
|||
"culture": "en", |
|||
"texts": { |
|||
"Menu:Home": "Home", |
|||
"Welcome": "Welcome", |
|||
"LongWelcomeMessage": "Welcome to the application. This is a startup project based on the ABP framework. For more information, visit abp.io." |
|||
} |
|||
} |
|||
@ -0,0 +1,8 @@ |
|||
{ |
|||
"culture": "pt-BR", |
|||
"texts": { |
|||
"Menu:Home": "Principal", |
|||
"Welcome": "Seja bem-vindo!", |
|||
"LongWelcomeMessage": "Bem-vindo a esta aplicação. Este é um projeto inicial baseado no ABP framework. Para mais informações, visite abp.io." |
|||
} |
|||
} |
|||
@ -0,0 +1,8 @@ |
|||
{ |
|||
"culture": "tr", |
|||
"texts": { |
|||
"Menu:Home": "Ana sayfa", |
|||
"Welcome": "Hoşgeldiniz", |
|||
"LongWelcomeMessage": "Uygulamaya hoşgeldiniz. Bu, ABP framework'ü üzerine bina edilmiş bir başlangıç projesidir. Daha fazla bilgi için abp.io adresini ziyaret edebilirsiniz." |
|||
} |
|||
} |
|||
@ -0,0 +1,8 @@ |
|||
{ |
|||
"culture": "zh-Hans", |
|||
"texts": { |
|||
"Menu:Home": "首页", |
|||
"Welcome": "欢迎", |
|||
"LongWelcomeMessage": "欢迎来到该应用程序. 这是一个基于ABP框架的启动项目. 有关更多信息, 请访问 cn.abp.io." |
|||
} |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
using Volo.Abp.Settings; |
|||
|
|||
namespace DashboardDemo.Settings |
|||
{ |
|||
public class DashboardDemoSettingDefinitionProvider : SettingDefinitionProvider |
|||
{ |
|||
public override void Define(ISettingDefinitionContext context) |
|||
{ |
|||
//Define your own settings here. Example:
|
|||
//context.Add(new SettingDefinition(DashboardDemoSettings.MySetting1));
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,10 @@ |
|||
namespace DashboardDemo.Settings |
|||
{ |
|||
public static class DashboardDemoSettings |
|||
{ |
|||
private const string Prefix = "DashboardDemo"; |
|||
|
|||
//Add your own setting names here. Example:
|
|||
//public const string MySetting1 = Prefix + ".MySetting1";
|
|||
} |
|||
} |
|||
@ -0,0 +1,53 @@ |
|||
using System; |
|||
using Volo.Abp.Domain.Entities.Auditing; |
|||
using Volo.Abp.Users; |
|||
|
|||
namespace DashboardDemo.Users |
|||
{ |
|||
/* This entity shares the same table/collection ("AbpUsers" by default) with the |
|||
* IdentityUser entity of the Identity module. |
|||
* |
|||
* - You can define your custom properties into this class. |
|||
* - You never create or delete this entity, becase it is Identity module's job. |
|||
* - You can query users from database with this entity. |
|||
* - You can update values of your custom properties. |
|||
*/ |
|||
public class AppUser : FullAuditedAggregateRoot<Guid>, IUser |
|||
{ |
|||
#region Base properties
|
|||
|
|||
/* These properties are shared with the IdentityUser entity of the Identity module. |
|||
* Do not change these properties through this class. Instead, use Identity module |
|||
* services (like IdentityUserManager) to change them. |
|||
* So, this properties are designed as read only! |
|||
*/ |
|||
|
|||
public virtual Guid? TenantId { get; private set; } |
|||
|
|||
public virtual string UserName { get; private set; } |
|||
|
|||
public virtual string Name { get; private set; } |
|||
|
|||
public virtual string Surname { get; private set; } |
|||
|
|||
public virtual string Email { get; private set; } |
|||
|
|||
public virtual bool EmailConfirmed { get; private set; } |
|||
|
|||
public virtual string PhoneNumber { get; private set; } |
|||
|
|||
public virtual bool PhoneNumberConfirmed { get; private set; } |
|||
|
|||
#endregion
|
|||
|
|||
/* Add your own properties here. Example: |
|||
* |
|||
* public virtual string MyProperty { get; set; } |
|||
*/ |
|||
|
|||
private AppUser() |
|||
{ |
|||
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,18 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<Import Project="..\..\common.props" /> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>netcoreapp2.2</TargetFramework> |
|||
<RootNamespace>DashboardDemo</RootNamespace> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<Compile Remove="Migrations\20190320072839_Initial.cs" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\DashboardDemo.EntityFrameworkCore\DashboardDemo.EntityFrameworkCore.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -0,0 +1,46 @@ |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Volo.Abp.AuditLogging.EntityFrameworkCore; |
|||
using Volo.Abp.BackgroundJobs.EntityFrameworkCore; |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
using Volo.Abp.Identity; |
|||
using Volo.Abp.Identity.EntityFrameworkCore; |
|||
using Volo.Abp.PermissionManagement.EntityFrameworkCore; |
|||
using Volo.Abp.SettingManagement.EntityFrameworkCore; |
|||
using Volo.Abp.TenantManagement.EntityFrameworkCore; |
|||
|
|||
namespace DashboardDemo.EntityFrameworkCore |
|||
{ |
|||
public class DashboardDemoMigrationsDbContext : AbpDbContext<DashboardDemoMigrationsDbContext> |
|||
{ |
|||
public DashboardDemoMigrationsDbContext(DbContextOptions<DashboardDemoMigrationsDbContext> options) |
|||
: base(options) |
|||
{ |
|||
|
|||
} |
|||
|
|||
protected override void OnModelCreating(ModelBuilder builder) |
|||
{ |
|||
base.OnModelCreating(builder); |
|||
|
|||
/* Include modules to your migration db context */ |
|||
|
|||
builder.ConfigurePermissionManagement(); |
|||
builder.ConfigureSettingManagement(); |
|||
builder.ConfigureBackgroundJobs(); |
|||
builder.ConfigureAuditLogging(); |
|||
builder.ConfigureIdentity(); |
|||
builder.ConfigureTenantManagement(); |
|||
|
|||
/* Configure customizations for entities from the modules included */ |
|||
|
|||
builder.Entity<IdentityUser>(b => |
|||
{ |
|||
b.ConfigureCustomUserProperties(); |
|||
}); |
|||
|
|||
/* Configure your own tables/entities inside the ConfigureDashboardDemo method */ |
|||
|
|||
builder.ConfigureDashboardDemo(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,29 @@ |
|||
using System.IO; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore.Design; |
|||
using Microsoft.Extensions.Configuration; |
|||
|
|||
namespace DashboardDemo.EntityFrameworkCore |
|||
{ |
|||
public class DashboardDemoMigrationsDbContextFactory : IDesignTimeDbContextFactory<DashboardDemoMigrationsDbContext> |
|||
{ |
|||
public DashboardDemoMigrationsDbContext CreateDbContext(string[] args) |
|||
{ |
|||
var configuration = BuildConfiguration(); |
|||
|
|||
var builder = new DbContextOptionsBuilder<DashboardDemoMigrationsDbContext>() |
|||
.UseSqlServer(configuration.GetConnectionString("Default")); |
|||
|
|||
return new DashboardDemoMigrationsDbContext(builder.Options); |
|||
} |
|||
|
|||
private static IConfigurationRoot BuildConfiguration() |
|||
{ |
|||
var builder = new ConfigurationBuilder() |
|||
.SetBasePath(Directory.GetCurrentDirectory()) |
|||
.AddJsonFile("appsettings.json", optional: false); |
|||
|
|||
return builder.Build(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,760 @@ |
|||
// <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 DashboardDemo.EntityFrameworkCore; |
|||
|
|||
namespace DashboardDemo.Migrations |
|||
{ |
|||
[DbContext(typeof(DashboardDemoMigrationsDbContext))] |
|||
[Migration("20190402131334_Initial")] |
|||
partial class Initial |
|||
{ |
|||
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
|||
{ |
|||
#pragma warning disable 612, 618
|
|||
modelBuilder |
|||
.HasAnnotation("ProductVersion", "2.2.0-rtm-35687") |
|||
.HasAnnotation("Relational:MaxIdentifierLength", 128) |
|||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd(); |
|||
|
|||
b.Property<string>("ApplicationName") |
|||
.HasColumnName("ApplicationName") |
|||
.HasMaxLength(96); |
|||
|
|||
b.Property<string>("BrowserInfo") |
|||
.HasColumnName("BrowserInfo") |
|||
.HasMaxLength(512); |
|||
|
|||
b.Property<string>("ClientId") |
|||
.HasColumnName("ClientId") |
|||
.HasMaxLength(64); |
|||
|
|||
b.Property<string>("ClientIpAddress") |
|||
.HasColumnName("ClientIpAddress") |
|||
.HasMaxLength(64); |
|||
|
|||
b.Property<string>("ClientName") |
|||
.HasColumnName("ClientName") |
|||
.HasMaxLength(128); |
|||
|
|||
b.Property<string>("Comments") |
|||
.HasColumnName("Comments") |
|||
.HasMaxLength(256); |
|||
|
|||
b.Property<string>("ConcurrencyStamp"); |
|||
|
|||
b.Property<string>("CorrelationId") |
|||
.HasColumnName("CorrelationId") |
|||
.HasMaxLength(64); |
|||
|
|||
b.Property<string>("Exceptions") |
|||
.HasColumnName("Exceptions") |
|||
.HasMaxLength(4000); |
|||
|
|||
b.Property<int>("ExecutionDuration") |
|||
.HasColumnName("ExecutionDuration"); |
|||
|
|||
b.Property<DateTime>("ExecutionTime"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("HttpMethod") |
|||
.HasColumnName("HttpMethod") |
|||
.HasMaxLength(16); |
|||
|
|||
b.Property<int?>("HttpStatusCode") |
|||
.HasColumnName("HttpStatusCode"); |
|||
|
|||
b.Property<Guid?>("ImpersonatorTenantId") |
|||
.HasColumnName("ImpersonatorTenantId"); |
|||
|
|||
b.Property<Guid?>("ImpersonatorUserId") |
|||
.HasColumnName("ImpersonatorUserId"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.Property<string>("TenantName"); |
|||
|
|||
b.Property<string>("Url") |
|||
.HasColumnName("Url") |
|||
.HasMaxLength(256); |
|||
|
|||
b.Property<Guid?>("UserId") |
|||
.HasColumnName("UserId"); |
|||
|
|||
b.Property<string>("UserName") |
|||
.HasColumnName("UserName") |
|||
.HasMaxLength(256); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("TenantId", "ExecutionTime"); |
|||
|
|||
b.HasIndex("TenantId", "UserId", "ExecutionTime"); |
|||
|
|||
b.ToTable("AbpAuditLogs"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd(); |
|||
|
|||
b.Property<Guid>("AuditLogId") |
|||
.HasColumnName("AuditLogId"); |
|||
|
|||
b.Property<int>("ExecutionDuration") |
|||
.HasColumnName("ExecutionDuration"); |
|||
|
|||
b.Property<DateTime>("ExecutionTime") |
|||
.HasColumnName("ExecutionTime"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("MethodName") |
|||
.HasColumnName("MethodName") |
|||
.HasMaxLength(128); |
|||
|
|||
b.Property<string>("Parameters") |
|||
.HasColumnName("Parameters") |
|||
.HasMaxLength(2000); |
|||
|
|||
b.Property<string>("ServiceName") |
|||
.HasColumnName("ServiceName") |
|||
.HasMaxLength(256); |
|||
|
|||
b.Property<Guid?>("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("AuditLogId"); |
|||
|
|||
b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); |
|||
|
|||
b.ToTable("AbpAuditLogActions"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd(); |
|||
|
|||
b.Property<Guid>("AuditLogId") |
|||
.HasColumnName("AuditLogId"); |
|||
|
|||
b.Property<DateTime>("ChangeTime") |
|||
.HasColumnName("ChangeTime"); |
|||
|
|||
b.Property<byte>("ChangeType") |
|||
.HasColumnName("ChangeType"); |
|||
|
|||
b.Property<string>("EntityId") |
|||
.IsRequired() |
|||
.HasColumnName("EntityId") |
|||
.HasMaxLength(128); |
|||
|
|||
b.Property<Guid?>("EntityTenantId"); |
|||
|
|||
b.Property<string>("EntityTypeFullName") |
|||
.IsRequired() |
|||
.HasColumnName("EntityTypeFullName") |
|||
.HasMaxLength(128); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("AuditLogId"); |
|||
|
|||
b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); |
|||
|
|||
b.ToTable("AbpEntityChanges"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd(); |
|||
|
|||
b.Property<Guid>("EntityChangeId"); |
|||
|
|||
b.Property<string>("NewValue") |
|||
.HasColumnName("NewValue") |
|||
.HasMaxLength(512); |
|||
|
|||
b.Property<string>("OriginalValue") |
|||
.HasColumnName("OriginalValue") |
|||
.HasMaxLength(512); |
|||
|
|||
b.Property<string>("PropertyName") |
|||
.IsRequired() |
|||
.HasColumnName("PropertyName") |
|||
.HasMaxLength(128); |
|||
|
|||
b.Property<string>("PropertyTypeFullName") |
|||
.IsRequired() |
|||
.HasColumnName("PropertyTypeFullName") |
|||
.HasMaxLength(64); |
|||
|
|||
b.Property<Guid?>("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("EntityChangeId"); |
|||
|
|||
b.ToTable("AbpEntityPropertyChanges"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd(); |
|||
|
|||
b.Property<string>("ConcurrencyStamp"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<bool>("IsAbandoned") |
|||
.ValueGeneratedOnAdd() |
|||
.HasDefaultValue(false); |
|||
|
|||
b.Property<string>("JobArgs") |
|||
.IsRequired() |
|||
.HasMaxLength(1048576); |
|||
|
|||
b.Property<string>("JobName") |
|||
.IsRequired() |
|||
.HasMaxLength(128); |
|||
|
|||
b.Property<DateTime?>("LastTryTime"); |
|||
|
|||
b.Property<DateTime>("NextTryTime"); |
|||
|
|||
b.Property<byte>("Priority") |
|||
.ValueGeneratedOnAdd() |
|||
.HasDefaultValue((byte)15); |
|||
|
|||
b.Property<short>("TryCount") |
|||
.ValueGeneratedOnAdd() |
|||
.HasDefaultValue((short)0); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("IsAbandoned", "NextTryTime"); |
|||
|
|||
b.ToTable("AbpBackgroundJobs"); |
|||
}); |
|||
|
|||
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.Abp.TenantManagement.Tenant", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd(); |
|||
|
|||
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>("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<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(64); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Name") |
|||
.IsUnique(); |
|||
|
|||
b.ToTable("AbpTenants"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => |
|||
{ |
|||
b.Property<Guid>("TenantId"); |
|||
|
|||
b.Property<string>("Name") |
|||
.HasMaxLength(64); |
|||
|
|||
b.Property<string>("Value") |
|||
.IsRequired() |
|||
.HasMaxLength(1024); |
|||
|
|||
b.HasKey("TenantId", "Name"); |
|||
|
|||
b.ToTable("AbpTenantConnectionStrings"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.AuditLogging.AuditLog") |
|||
.WithMany("Actions") |
|||
.HasForeignKey("AuditLogId") |
|||
.OnDelete(DeleteBehavior.Cascade); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.AuditLogging.AuditLog") |
|||
.WithMany("EntityChanges") |
|||
.HasForeignKey("AuditLogId") |
|||
.OnDelete(DeleteBehavior.Cascade); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.AuditLogging.EntityChange") |
|||
.WithMany("PropertyChanges") |
|||
.HasForeignKey("EntityChangeId") |
|||
.OnDelete(DeleteBehavior.Cascade); |
|||
}); |
|||
|
|||
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); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.TenantManagement.Tenant") |
|||
.WithMany("ConnectionStrings") |
|||
.HasForeignKey("TenantId") |
|||
.OnDelete(DeleteBehavior.Cascade); |
|||
}); |
|||
#pragma warning restore 612, 618
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,546 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace DashboardDemo.Migrations |
|||
{ |
|||
public partial class Initial : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.CreateTable( |
|||
name: "AbpAuditLogs", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(nullable: false), |
|||
ExtraProperties = table.Column<string>(nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(nullable: true), |
|||
ApplicationName = table.Column<string>(maxLength: 96, nullable: true), |
|||
UserId = table.Column<Guid>(nullable: true), |
|||
UserName = table.Column<string>(maxLength: 256, nullable: true), |
|||
TenantId = table.Column<Guid>(nullable: true), |
|||
TenantName = table.Column<string>(nullable: true), |
|||
ImpersonatorUserId = table.Column<Guid>(nullable: true), |
|||
ImpersonatorTenantId = table.Column<Guid>(nullable: true), |
|||
ExecutionTime = table.Column<DateTime>(nullable: false), |
|||
ExecutionDuration = table.Column<int>(nullable: false), |
|||
ClientIpAddress = table.Column<string>(maxLength: 64, nullable: true), |
|||
ClientName = table.Column<string>(maxLength: 128, nullable: true), |
|||
ClientId = table.Column<string>(maxLength: 64, nullable: true), |
|||
CorrelationId = table.Column<string>(maxLength: 64, nullable: true), |
|||
BrowserInfo = table.Column<string>(maxLength: 512, nullable: true), |
|||
HttpMethod = table.Column<string>(maxLength: 16, nullable: true), |
|||
Url = table.Column<string>(maxLength: 256, nullable: true), |
|||
Exceptions = table.Column<string>(maxLength: 4000, nullable: true), |
|||
Comments = table.Column<string>(maxLength: 256, nullable: true), |
|||
HttpStatusCode = table.Column<int>(nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpAuditLogs", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpBackgroundJobs", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(nullable: false), |
|||
ExtraProperties = table.Column<string>(nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(nullable: true), |
|||
JobName = table.Column<string>(maxLength: 128, nullable: false), |
|||
JobArgs = table.Column<string>(maxLength: 1048576, nullable: false), |
|||
TryCount = table.Column<short>(nullable: false, defaultValue: (short)0), |
|||
CreationTime = table.Column<DateTime>(nullable: false), |
|||
NextTryTime = table.Column<DateTime>(nullable: false), |
|||
LastTryTime = table.Column<DateTime>(nullable: true), |
|||
IsAbandoned = table.Column<bool>(nullable: false, defaultValue: false), |
|||
Priority = table.Column<byte>(nullable: false, defaultValue: (byte)15) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpBackgroundJobs", x => x.Id); |
|||
}); |
|||
|
|||
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: "AbpTenants", |
|||
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), |
|||
Name = table.Column<string>(maxLength: 64, nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpTenants", 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: "AbpAuditLogActions", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(nullable: false), |
|||
TenantId = table.Column<Guid>(nullable: true), |
|||
AuditLogId = table.Column<Guid>(nullable: false), |
|||
ServiceName = table.Column<string>(maxLength: 256, nullable: true), |
|||
MethodName = table.Column<string>(maxLength: 128, nullable: true), |
|||
Parameters = table.Column<string>(maxLength: 2000, nullable: true), |
|||
ExecutionTime = table.Column<DateTime>(nullable: false), |
|||
ExecutionDuration = table.Column<int>(nullable: false), |
|||
ExtraProperties = table.Column<string>(nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpAuditLogActions", x => x.Id); |
|||
table.ForeignKey( |
|||
name: "FK_AbpAuditLogActions_AbpAuditLogs_AuditLogId", |
|||
column: x => x.AuditLogId, |
|||
principalTable: "AbpAuditLogs", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpEntityChanges", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(nullable: false), |
|||
AuditLogId = table.Column<Guid>(nullable: false), |
|||
TenantId = table.Column<Guid>(nullable: true), |
|||
ChangeTime = table.Column<DateTime>(nullable: false), |
|||
ChangeType = table.Column<byte>(nullable: false), |
|||
EntityTenantId = table.Column<Guid>(nullable: true), |
|||
EntityId = table.Column<string>(maxLength: 128, nullable: false), |
|||
EntityTypeFullName = table.Column<string>(maxLength: 128, nullable: false), |
|||
ExtraProperties = table.Column<string>(nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpEntityChanges", x => x.Id); |
|||
table.ForeignKey( |
|||
name: "FK_AbpEntityChanges_AbpAuditLogs_AuditLogId", |
|||
column: x => x.AuditLogId, |
|||
principalTable: "AbpAuditLogs", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
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: "AbpTenantConnectionStrings", |
|||
columns: table => new |
|||
{ |
|||
TenantId = table.Column<Guid>(nullable: false), |
|||
Name = table.Column<string>(maxLength: 64, nullable: false), |
|||
Value = table.Column<string>(maxLength: 1024, nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpTenantConnectionStrings", x => new { x.TenantId, x.Name }); |
|||
table.ForeignKey( |
|||
name: "FK_AbpTenantConnectionStrings_AbpTenants_TenantId", |
|||
column: x => x.TenantId, |
|||
principalTable: "AbpTenants", |
|||
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 |
|||
{ |
|||
UserId = table.Column<Guid>(nullable: false), |
|||
LoginProvider = table.Column<string>(maxLength: 64, nullable: false), |
|||
TenantId = table.Column<Guid>(nullable: true), |
|||
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 |
|||
{ |
|||
UserId = table.Column<Guid>(nullable: false), |
|||
RoleId = table.Column<Guid>(nullable: false), |
|||
TenantId = table.Column<Guid>(nullable: true) |
|||
}, |
|||
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 |
|||
{ |
|||
UserId = table.Column<Guid>(nullable: false), |
|||
LoginProvider = table.Column<string>(maxLength: 64, nullable: false), |
|||
Name = table.Column<string>(maxLength: 128, nullable: false), |
|||
TenantId = table.Column<Guid>(nullable: true), |
|||
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.CreateTable( |
|||
name: "AbpEntityPropertyChanges", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(nullable: false), |
|||
TenantId = table.Column<Guid>(nullable: true), |
|||
EntityChangeId = table.Column<Guid>(nullable: false), |
|||
NewValue = table.Column<string>(maxLength: 512, nullable: true), |
|||
OriginalValue = table.Column<string>(maxLength: 512, nullable: true), |
|||
PropertyName = table.Column<string>(maxLength: 128, nullable: false), |
|||
PropertyTypeFullName = table.Column<string>(maxLength: 64, nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpEntityPropertyChanges", x => x.Id); |
|||
table.ForeignKey( |
|||
name: "FK_AbpEntityPropertyChanges_AbpEntityChanges_EntityChangeId", |
|||
column: x => x.EntityChangeId, |
|||
principalTable: "AbpEntityChanges", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpAuditLogActions_AuditLogId", |
|||
table: "AbpAuditLogActions", |
|||
column: "AuditLogId"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_ExecutionTime", |
|||
table: "AbpAuditLogActions", |
|||
columns: new[] { "TenantId", "ServiceName", "MethodName", "ExecutionTime" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpAuditLogs_TenantId_ExecutionTime", |
|||
table: "AbpAuditLogs", |
|||
columns: new[] { "TenantId", "ExecutionTime" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpAuditLogs_TenantId_UserId_ExecutionTime", |
|||
table: "AbpAuditLogs", |
|||
columns: new[] { "TenantId", "UserId", "ExecutionTime" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpBackgroundJobs_IsAbandoned_NextTryTime", |
|||
table: "AbpBackgroundJobs", |
|||
columns: new[] { "IsAbandoned", "NextTryTime" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpEntityChanges_AuditLogId", |
|||
table: "AbpEntityChanges", |
|||
column: "AuditLogId"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpEntityChanges_TenantId_EntityTypeFullName_EntityId", |
|||
table: "AbpEntityChanges", |
|||
columns: new[] { "TenantId", "EntityTypeFullName", "EntityId" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpEntityPropertyChanges_EntityChangeId", |
|||
table: "AbpEntityPropertyChanges", |
|||
column: "EntityChangeId"); |
|||
|
|||
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_AbpTenants_Name", |
|||
table: "AbpTenants", |
|||
column: "Name", |
|||
unique: true); |
|||
|
|||
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: "AbpAuditLogActions"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpBackgroundJobs"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpClaimTypes"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpEntityPropertyChanges"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpPermissionGrants"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpRoleClaims"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpSettings"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpTenantConnectionStrings"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpUserClaims"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpUserLogins"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpUserRoles"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpUserTokens"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpEntityChanges"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpTenants"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpRoles"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpUsers"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpAuditLogs"); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,758 @@ |
|||
// <auto-generated />
|
|||
using System; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|||
using Microsoft.EntityFrameworkCore.Metadata; |
|||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|||
using DashboardDemo.EntityFrameworkCore; |
|||
|
|||
namespace DashboardDemo.Migrations |
|||
{ |
|||
[DbContext(typeof(DashboardDemoMigrationsDbContext))] |
|||
partial class DashboardDemoMigrationsDbContextModelSnapshot : ModelSnapshot |
|||
{ |
|||
protected override void BuildModel(ModelBuilder modelBuilder) |
|||
{ |
|||
#pragma warning disable 612, 618
|
|||
modelBuilder |
|||
.HasAnnotation("ProductVersion", "2.2.0-rtm-35687") |
|||
.HasAnnotation("Relational:MaxIdentifierLength", 128) |
|||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd(); |
|||
|
|||
b.Property<string>("ApplicationName") |
|||
.HasColumnName("ApplicationName") |
|||
.HasMaxLength(96); |
|||
|
|||
b.Property<string>("BrowserInfo") |
|||
.HasColumnName("BrowserInfo") |
|||
.HasMaxLength(512); |
|||
|
|||
b.Property<string>("ClientId") |
|||
.HasColumnName("ClientId") |
|||
.HasMaxLength(64); |
|||
|
|||
b.Property<string>("ClientIpAddress") |
|||
.HasColumnName("ClientIpAddress") |
|||
.HasMaxLength(64); |
|||
|
|||
b.Property<string>("ClientName") |
|||
.HasColumnName("ClientName") |
|||
.HasMaxLength(128); |
|||
|
|||
b.Property<string>("Comments") |
|||
.HasColumnName("Comments") |
|||
.HasMaxLength(256); |
|||
|
|||
b.Property<string>("ConcurrencyStamp"); |
|||
|
|||
b.Property<string>("CorrelationId") |
|||
.HasColumnName("CorrelationId") |
|||
.HasMaxLength(64); |
|||
|
|||
b.Property<string>("Exceptions") |
|||
.HasColumnName("Exceptions") |
|||
.HasMaxLength(4000); |
|||
|
|||
b.Property<int>("ExecutionDuration") |
|||
.HasColumnName("ExecutionDuration"); |
|||
|
|||
b.Property<DateTime>("ExecutionTime"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("HttpMethod") |
|||
.HasColumnName("HttpMethod") |
|||
.HasMaxLength(16); |
|||
|
|||
b.Property<int?>("HttpStatusCode") |
|||
.HasColumnName("HttpStatusCode"); |
|||
|
|||
b.Property<Guid?>("ImpersonatorTenantId") |
|||
.HasColumnName("ImpersonatorTenantId"); |
|||
|
|||
b.Property<Guid?>("ImpersonatorUserId") |
|||
.HasColumnName("ImpersonatorUserId"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.Property<string>("TenantName"); |
|||
|
|||
b.Property<string>("Url") |
|||
.HasColumnName("Url") |
|||
.HasMaxLength(256); |
|||
|
|||
b.Property<Guid?>("UserId") |
|||
.HasColumnName("UserId"); |
|||
|
|||
b.Property<string>("UserName") |
|||
.HasColumnName("UserName") |
|||
.HasMaxLength(256); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("TenantId", "ExecutionTime"); |
|||
|
|||
b.HasIndex("TenantId", "UserId", "ExecutionTime"); |
|||
|
|||
b.ToTable("AbpAuditLogs"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd(); |
|||
|
|||
b.Property<Guid>("AuditLogId") |
|||
.HasColumnName("AuditLogId"); |
|||
|
|||
b.Property<int>("ExecutionDuration") |
|||
.HasColumnName("ExecutionDuration"); |
|||
|
|||
b.Property<DateTime>("ExecutionTime") |
|||
.HasColumnName("ExecutionTime"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("MethodName") |
|||
.HasColumnName("MethodName") |
|||
.HasMaxLength(128); |
|||
|
|||
b.Property<string>("Parameters") |
|||
.HasColumnName("Parameters") |
|||
.HasMaxLength(2000); |
|||
|
|||
b.Property<string>("ServiceName") |
|||
.HasColumnName("ServiceName") |
|||
.HasMaxLength(256); |
|||
|
|||
b.Property<Guid?>("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("AuditLogId"); |
|||
|
|||
b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); |
|||
|
|||
b.ToTable("AbpAuditLogActions"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd(); |
|||
|
|||
b.Property<Guid>("AuditLogId") |
|||
.HasColumnName("AuditLogId"); |
|||
|
|||
b.Property<DateTime>("ChangeTime") |
|||
.HasColumnName("ChangeTime"); |
|||
|
|||
b.Property<byte>("ChangeType") |
|||
.HasColumnName("ChangeType"); |
|||
|
|||
b.Property<string>("EntityId") |
|||
.IsRequired() |
|||
.HasColumnName("EntityId") |
|||
.HasMaxLength(128); |
|||
|
|||
b.Property<Guid?>("EntityTenantId"); |
|||
|
|||
b.Property<string>("EntityTypeFullName") |
|||
.IsRequired() |
|||
.HasColumnName("EntityTypeFullName") |
|||
.HasMaxLength(128); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("AuditLogId"); |
|||
|
|||
b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); |
|||
|
|||
b.ToTable("AbpEntityChanges"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd(); |
|||
|
|||
b.Property<Guid>("EntityChangeId"); |
|||
|
|||
b.Property<string>("NewValue") |
|||
.HasColumnName("NewValue") |
|||
.HasMaxLength(512); |
|||
|
|||
b.Property<string>("OriginalValue") |
|||
.HasColumnName("OriginalValue") |
|||
.HasMaxLength(512); |
|||
|
|||
b.Property<string>("PropertyName") |
|||
.IsRequired() |
|||
.HasColumnName("PropertyName") |
|||
.HasMaxLength(128); |
|||
|
|||
b.Property<string>("PropertyTypeFullName") |
|||
.IsRequired() |
|||
.HasColumnName("PropertyTypeFullName") |
|||
.HasMaxLength(64); |
|||
|
|||
b.Property<Guid?>("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("EntityChangeId"); |
|||
|
|||
b.ToTable("AbpEntityPropertyChanges"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd(); |
|||
|
|||
b.Property<string>("ConcurrencyStamp"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<bool>("IsAbandoned") |
|||
.ValueGeneratedOnAdd() |
|||
.HasDefaultValue(false); |
|||
|
|||
b.Property<string>("JobArgs") |
|||
.IsRequired() |
|||
.HasMaxLength(1048576); |
|||
|
|||
b.Property<string>("JobName") |
|||
.IsRequired() |
|||
.HasMaxLength(128); |
|||
|
|||
b.Property<DateTime?>("LastTryTime"); |
|||
|
|||
b.Property<DateTime>("NextTryTime"); |
|||
|
|||
b.Property<byte>("Priority") |
|||
.ValueGeneratedOnAdd() |
|||
.HasDefaultValue((byte)15); |
|||
|
|||
b.Property<short>("TryCount") |
|||
.ValueGeneratedOnAdd() |
|||
.HasDefaultValue((short)0); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("IsAbandoned", "NextTryTime"); |
|||
|
|||
b.ToTable("AbpBackgroundJobs"); |
|||
}); |
|||
|
|||
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.Abp.TenantManagement.Tenant", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd(); |
|||
|
|||
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>("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<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(64); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Name") |
|||
.IsUnique(); |
|||
|
|||
b.ToTable("AbpTenants"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => |
|||
{ |
|||
b.Property<Guid>("TenantId"); |
|||
|
|||
b.Property<string>("Name") |
|||
.HasMaxLength(64); |
|||
|
|||
b.Property<string>("Value") |
|||
.IsRequired() |
|||
.HasMaxLength(1024); |
|||
|
|||
b.HasKey("TenantId", "Name"); |
|||
|
|||
b.ToTable("AbpTenantConnectionStrings"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.AuditLogging.AuditLog") |
|||
.WithMany("Actions") |
|||
.HasForeignKey("AuditLogId") |
|||
.OnDelete(DeleteBehavior.Cascade); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.AuditLogging.AuditLog") |
|||
.WithMany("EntityChanges") |
|||
.HasForeignKey("AuditLogId") |
|||
.OnDelete(DeleteBehavior.Cascade); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.AuditLogging.EntityChange") |
|||
.WithMany("PropertyChanges") |
|||
.HasForeignKey("EntityChangeId") |
|||
.OnDelete(DeleteBehavior.Cascade); |
|||
}); |
|||
|
|||
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); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.TenantManagement.Tenant") |
|||
.WithMany("ConnectionStrings") |
|||
.HasForeignKey("TenantId") |
|||
.OnDelete(DeleteBehavior.Cascade); |
|||
}); |
|||
#pragma warning restore 612, 618
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,22 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<Import Project="..\..\common.props" /> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>netcoreapp2.2</TargetFramework> |
|||
<RootNamespace>DashboardDemo</RootNamespace> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\DashboardDemo.Domain\DashboardDemo.Domain.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" /> |
|||
<ProjectReference Include="..\..\..\..\modules\background-jobs\src\Volo.Abp.BackgroundJobs.EntityFrameworkCore\Volo.Abp.BackgroundJobs.EntityFrameworkCore.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\audit-logging\src\Volo.Abp.AuditLogging.EntityFrameworkCore\Volo.Abp.AuditLogging.EntityFrameworkCore.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.EntityFrameworkCore\Volo.Abp.TenantManagement.EntityFrameworkCore.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.EntityFrameworkCore\Volo.Abp.FeatureManagement.EntityFrameworkCore.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -0,0 +1,45 @@ |
|||
using Microsoft.EntityFrameworkCore; |
|||
using DashboardDemo.Users; |
|||
using Volo.Abp.Data; |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
using Volo.Abp.EntityFrameworkCore.Modeling; |
|||
using Volo.Abp.Users.EntityFrameworkCore; |
|||
|
|||
namespace DashboardDemo.EntityFrameworkCore |
|||
{ |
|||
[ConnectionStringName("Default")] |
|||
public class DashboardDemoDbContext : AbpDbContext<DashboardDemoDbContext> |
|||
{ |
|||
public DbSet<AppUser> Users { get; set; } |
|||
|
|||
public DashboardDemoDbContext(DbContextOptions<DashboardDemoDbContext> options) |
|||
: base(options) |
|||
{ |
|||
|
|||
} |
|||
|
|||
protected override void OnModelCreating(ModelBuilder builder) |
|||
{ |
|||
base.OnModelCreating(builder); |
|||
|
|||
/* Configure the shared tables (with included modules) here */ |
|||
|
|||
builder.Entity<AppUser>(b => |
|||
{ |
|||
b.ToTable("AbpUsers"); //Sharing the same table "AbpUsers" with the IdentityUser
|
|||
|
|||
b.ConfigureFullAudited(); |
|||
b.ConfigureExtraProperties(); |
|||
b.ConfigureConcurrencyStamp(); |
|||
b.ConfigureAbpUser(); |
|||
|
|||
//Moved customization to a method so we can share it with the DashboardDemoMigrationsDbContext class
|
|||
b.ConfigureCustomUserProperties(); |
|||
}); |
|||
|
|||
/* Configure your own tables/entities inside the ConfigureDashboardDemo method */ |
|||
|
|||
builder.ConfigureDashboardDemo(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,30 @@ |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore.Metadata.Builders; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Users; |
|||
|
|||
namespace DashboardDemo.EntityFrameworkCore |
|||
{ |
|||
public static class DashboardDemoDbContextModelCreatingExtensions |
|||
{ |
|||
public static void ConfigureDashboardDemo(this ModelBuilder builder) |
|||
{ |
|||
Check.NotNull(builder, nameof(builder)); |
|||
|
|||
/* Configure your own tables/entities inside here */ |
|||
|
|||
//builder.Entity<YourEntity>(b =>
|
|||
//{
|
|||
// b.ToTable(DashboardDemoConsts.DbTablePrefix + "YourEntities", DashboardDemoConsts.DbSchema);
|
|||
|
|||
// //...
|
|||
//});
|
|||
} |
|||
|
|||
public static void ConfigureCustomUserProperties<TUser>(this EntityTypeBuilder<TUser> b) |
|||
where TUser: class, IUser |
|||
{ |
|||
//b.Property<string>(nameof(AppUser.MyProperty))...
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,36 @@ |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp.AuditLogging.EntityFrameworkCore; |
|||
using Volo.Abp.BackgroundJobs.EntityFrameworkCore; |
|||
using Volo.Abp.EntityFrameworkCore.SqlServer; |
|||
using Volo.Abp.FeatureManagement.EntityFrameworkCore; |
|||
using Volo.Abp.Identity.EntityFrameworkCore; |
|||
using Volo.Abp.Modularity; |
|||
using Volo.Abp.PermissionManagement.EntityFrameworkCore; |
|||
using Volo.Abp.SettingManagement.EntityFrameworkCore; |
|||
using Volo.Abp.TenantManagement.EntityFrameworkCore; |
|||
|
|||
namespace DashboardDemo.EntityFrameworkCore |
|||
{ |
|||
[DependsOn( |
|||
typeof(DashboardDemoDomainModule), |
|||
typeof(AbpIdentityEntityFrameworkCoreModule), |
|||
typeof(AbpPermissionManagementEntityFrameworkCoreModule), |
|||
typeof(AbpSettingManagementEntityFrameworkCoreModule), |
|||
typeof(AbpEntityFrameworkCoreSqlServerModule), |
|||
typeof(BackgroundJobsEntityFrameworkCoreModule), |
|||
typeof(AbpAuditLoggingEntityFrameworkCoreModule), |
|||
typeof(AbpTenantManagementEntityFrameworkCoreModule), |
|||
typeof(AbpFeatureManagementEntityFrameworkCoreModule) |
|||
)] |
|||
public class DashboardDemoEntityFrameworkCoreModule : AbpModule |
|||
{ |
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
context.Services.AddAbpDbContext<DashboardDemoDbContext>(options => |
|||
{ |
|||
//Remove "includeAllEntities: true" to create default repositories only for aggregate roots
|
|||
options.AddDefaultRepositories(includeAllEntities: true); |
|||
}); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Components; |
|||
using Volo.Abp.DependencyInjection; |
|||
|
|||
namespace DashboardDemo.Branding |
|||
{ |
|||
[Dependency(ReplaceServices = true)] |
|||
public class DashboardDemoBrandingProvider : DefaultBrandingProvider |
|||
{ |
|||
public override string AppName => "DashboardDemo"; |
|||
} |
|||
} |
|||
@ -0,0 +1,42 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk.Web"> |
|||
|
|||
<Import Project="..\..\common.props" /> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>netcoreapp2.2</TargetFramework> |
|||
<RootNamespace>DashboardDemo</RootNamespace> |
|||
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> |
|||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> |
|||
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType> |
|||
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> |
|||
<PreserveCompilationContext>true</PreserveCompilationContext> |
|||
<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<Compile Remove="Logs\**" /> |
|||
<Content Remove="Logs\**" /> |
|||
<EmbeddedResource Remove="Logs\**" /> |
|||
<None Remove="Logs\**" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="Microsoft.AspNetCore.App" /> |
|||
<PackageReference Include="Serilog.AspNetCore" Version="2.1.1" /> |
|||
<PackageReference Include="Serilog.Sinks.File" Version="4.0.0" /> |
|||
<PackageReference Include="Swashbuckle.AspNetCore" Version="2.5.0" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\DashboardDemo.Application\DashboardDemo.Application.csproj" /> |
|||
<ProjectReference Include="..\DashboardDemo.EntityFrameworkCore.DbMigrations\DashboardDemo.EntityFrameworkCore.DbMigrations.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.AspNetCore.Mvc.UI.Dashboards\Volo.Abp.AspNetCore.Mvc.UI.Dashboards.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Autofac\Volo.Abp.Autofac.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" /> |
|||
<ProjectReference Include="..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.Web\Volo.Abp.TenantManagement.Web.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.Web\Volo.Abp.FeatureManagement.Web.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -0,0 +1,12 @@ |
|||
using AutoMapper; |
|||
|
|||
namespace DashboardDemo |
|||
{ |
|||
public class DashboardDemoWebAutoMapperProfile : Profile |
|||
{ |
|||
public DashboardDemoWebAutoMapperProfile() |
|||
{ |
|||
//Configure your AutoMapper mapping configuration here...
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,233 @@ |
|||
using System.IO; |
|||
using System.Linq; |
|||
using DashboardDemo.Dashboards; |
|||
using Localization.Resources.AbpUi; |
|||
using Microsoft.AspNetCore.Builder; |
|||
using Microsoft.AspNetCore.Hosting; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using DashboardDemo.EntityFrameworkCore; |
|||
using DashboardDemo.Localization.DashboardDemo; |
|||
using DashboardDemo.Menus; |
|||
using DashboardDemo.Pages.widgets; |
|||
using DashboardDemo.Permissions; |
|||
using DashboardDemo.Widgets; |
|||
using Swashbuckle.AspNetCore.Swagger; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Account.Web; |
|||
using Volo.Abp.AspNetCore.Mvc; |
|||
using Volo.Abp.AspNetCore.Mvc.Localization; |
|||
using Volo.Abp.AspNetCore.Mvc.UI; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Bundling; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Dashboards; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Widgets; |
|||
using Volo.Abp.Authorization.Permissions; |
|||
using Volo.Abp.Autofac; |
|||
using Volo.Abp.AutoMapper; |
|||
using Volo.Abp.Data; |
|||
using Volo.Abp.Identity; |
|||
using Volo.Abp.Identity.Web; |
|||
using Volo.Abp.Localization; |
|||
using Volo.Abp.Localization.Resources.AbpValidation; |
|||
using Volo.Abp.Modularity; |
|||
using Volo.Abp.PermissionManagement.Web; |
|||
using Volo.Abp.Threading; |
|||
using Volo.Abp.UI; |
|||
using Volo.Abp.UI.Navigation; |
|||
using Volo.Abp.VirtualFileSystem; |
|||
using Volo.Abp.PermissionManagement; |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
using Volo.Abp.TenantManagement.Web; |
|||
|
|||
namespace DashboardDemo |
|||
{ |
|||
[DependsOn( |
|||
typeof(DashboardDemoApplicationModule), |
|||
typeof(DashboardDemoEntityFrameworkCoreModule), |
|||
typeof(AbpAutofacModule), |
|||
typeof(AbpIdentityWebModule), |
|||
typeof(AbpAccountWebModule), |
|||
typeof(AbpAspNetCoreMvcUiBasicThemeModule), |
|||
typeof(AbpAspNetCoreMvcUiDashboardsModule), |
|||
typeof(AbpTenantManagementWebModule) |
|||
)] |
|||
public class DashboardDemoWebModule : AbpModule |
|||
{ |
|||
public override void PreConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
context.Services.PreConfigure<AbpMvcDataAnnotationsLocalizationOptions>(options => |
|||
{ |
|||
options.AddAssemblyResource( |
|||
typeof(DashboardDemoResource), |
|||
typeof(DashboardDemoDomainModule).Assembly, |
|||
typeof(DashboardDemoApplicationModule).Assembly, |
|||
typeof(DashboardDemoWebModule).Assembly |
|||
); |
|||
}); |
|||
} |
|||
|
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
var hostingEnvironment = context.Services.GetHostingEnvironment(); |
|||
var configuration = context.Services.GetConfiguration(); |
|||
|
|||
ConfigureWidgets(); |
|||
ConfigureDashboards(); |
|||
ConfigureDatabaseServices(); |
|||
ConfigureAutoMapper(); |
|||
ConfigureVirtualFileSystem(hostingEnvironment); |
|||
ConfigureLocalizationServices(); |
|||
ConfigureNavigationServices(); |
|||
ConfigureAutoApiControllers(); |
|||
ConfigureSwaggerServices(context.Services); |
|||
} |
|||
|
|||
private void ConfigureWidgets() |
|||
{ |
|||
Configure<WidgetOptions>(options => |
|||
{ |
|||
options.Widgets.AddRange(WidgetDefinitionProvider.GetDefinitions()); |
|||
}); |
|||
} |
|||
|
|||
private void ConfigureDashboards() |
|||
{ |
|||
Configure<DashboardOptions>(options => |
|||
{ |
|||
options.Dashboards.AddRange(DashboardDefinitionProvider.GetDefinitions()); |
|||
}); |
|||
|
|||
Configure<BundlingOptions>(options => |
|||
{ |
|||
options.ScriptBundles.Add("MyDashboard", configuration => |
|||
{ |
|||
configuration.AddContributors(typeof(MyDashboardScriptBundleContributor)); |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
private void ConfigureDatabaseServices() |
|||
{ |
|||
Configure<AbpDbContextOptions>(options => |
|||
{ |
|||
options.UseSqlServer(); |
|||
}); |
|||
} |
|||
|
|||
private void ConfigureAutoMapper() |
|||
{ |
|||
Configure<AbpAutoMapperOptions>(options => |
|||
{ |
|||
options.AddProfile<DashboardDemoWebAutoMapperProfile>(); |
|||
}); |
|||
} |
|||
|
|||
private void ConfigureVirtualFileSystem(IHostingEnvironment hostingEnvironment) |
|||
{ |
|||
if (hostingEnvironment.IsDevelopment()) |
|||
{ |
|||
Configure<VirtualFileSystemOptions>(options => |
|||
{ |
|||
options.FileSets.ReplaceEmbeddedByPhysical<DashboardDemoDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}DashboardDemo.Domain", Path.DirectorySeparatorChar))); |
|||
}); |
|||
} |
|||
} |
|||
|
|||
private void ConfigureLocalizationServices() |
|||
{ |
|||
Configure<AbpLocalizationOptions>(options => |
|||
{ |
|||
options.Resources |
|||
.Get<DashboardDemoResource>() |
|||
.AddBaseTypes( |
|||
typeof(AbpValidationResource), |
|||
typeof(AbpUiResource) |
|||
); |
|||
|
|||
options.Languages.Add(new LanguageInfo("en", "en", "English")); |
|||
options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português")); |
|||
options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); |
|||
options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文")); |
|||
}); |
|||
} |
|||
|
|||
private void ConfigureNavigationServices() |
|||
{ |
|||
Configure<NavigationOptions>(options => |
|||
{ |
|||
options.MenuContributors.Add(new DashboardDemoMenuContributor()); |
|||
}); |
|||
} |
|||
|
|||
private void ConfigureAutoApiControllers() |
|||
{ |
|||
Configure<AbpAspNetCoreMvcOptions>(options => |
|||
{ |
|||
options.ConventionalControllers.Create(typeof(DashboardDemoApplicationModule).Assembly); |
|||
}); |
|||
} |
|||
|
|||
private void ConfigureSwaggerServices(IServiceCollection services) |
|||
{ |
|||
services.AddSwaggerGen( |
|||
options => |
|||
{ |
|||
options.SwaggerDoc("v1", new Info { Title = "DashboardDemo API", Version = "v1" }); |
|||
options.DocInclusionPredicate((docName, description) => true); |
|||
options.CustomSchemaIds(type => type.FullName); |
|||
}); |
|||
} |
|||
|
|||
public override void OnApplicationInitialization(ApplicationInitializationContext context) |
|||
{ |
|||
var app = context.GetApplicationBuilder(); |
|||
var env = context.GetEnvironment(); |
|||
|
|||
if (env.IsDevelopment()) |
|||
{ |
|||
app.UseDeveloperExceptionPage(); |
|||
} |
|||
else |
|||
{ |
|||
app.UseErrorPage(); |
|||
} |
|||
|
|||
app.UseVirtualFiles(); |
|||
app.UseAuthentication(); |
|||
|
|||
if (DashboardDemoConsts.IsMultiTenancyEnabled) |
|||
{ |
|||
app.UseMultiTenancy(); |
|||
} |
|||
|
|||
app.UseAbpRequestLocalization(); |
|||
|
|||
app.UseSwagger(); |
|||
app.UseSwaggerUI(options => |
|||
{ |
|||
options.SwaggerEndpoint("/swagger/v1/swagger.json", "DashboardDemo API"); |
|||
}); |
|||
|
|||
app.UseAuditing(); |
|||
|
|||
app.UseMvcWithDefaultRouteAndArea(); |
|||
|
|||
SeedDatabase(context); |
|||
} |
|||
|
|||
private static void SeedDatabase(ApplicationInitializationContext context) |
|||
{ |
|||
using (var scope = context.ServiceProvider.CreateScope()) |
|||
{ |
|||
AsyncHelper.RunSync(async () => |
|||
{ |
|||
await scope.ServiceProvider |
|||
.GetRequiredService<IDataSeeder>() |
|||
.SeedAsync(); |
|||
}); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,8 @@ |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Bundling; |
|||
|
|||
namespace DashboardDemo.Dashboards |
|||
{ |
|||
public class AbpBasicDashboardScriptContributor : BundleContributor |
|||
{ |
|||
} |
|||
} |
|||
@ -0,0 +1,43 @@ |
|||
using System.Collections.Generic; |
|||
using DashboardDemo.Localization.DashboardDemo; |
|||
using DashboardDemo.Pages.widgets; |
|||
using DashboardDemo.Widgets; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Bundling; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Dashboards; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Widgets; |
|||
using Volo.Abp.Localization; |
|||
using Volo.Abp.Modularity; |
|||
|
|||
namespace DashboardDemo.Dashboards |
|||
{ |
|||
public static class DashboardDefinitionProvider |
|||
{ |
|||
public static List<DashboardDefinition> GetDefinitions() |
|||
{ |
|||
var myDashboard = new DashboardDefinition( |
|||
DashboardNames.MyDashboard, |
|||
LocalizableString.Create<DashboardDemoResource>("MyDashboard") |
|||
) |
|||
.WithWidget(DemoStatisticsViewComponent.WidgetName) |
|||
.WithWidget(MyWidgetViewComponent.WidgetName); |
|||
|
|||
return new List<DashboardDefinition> |
|||
{ |
|||
myDashboard |
|||
}; |
|||
} |
|||
} |
|||
|
|||
[DependsOn( |
|||
typeof(AbpBasicDashboardScriptContributor), |
|||
typeof(MyWidgetViewComponentScriptBundleContributor), |
|||
typeof(DemoStatisticsScriptContributor) |
|||
)] |
|||
public class MyDashboardScriptBundleContributor : BundleContributor |
|||
{ |
|||
public override void ConfigureBundle(BundleConfigurationContext context) |
|||
{ |
|||
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,14 @@ |
|||
using Volo.Abp.Reflection; |
|||
|
|||
namespace DashboardDemo.Dashboards |
|||
{ |
|||
public static class DashboardNames |
|||
{ |
|||
public const string MyDashboard = "MyDashboard"; |
|||
|
|||
public static string[] GetAll() |
|||
{ |
|||
return ReflectionHelper.GetPublicConstantsRecursively(typeof(DashboardNames)); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Microsoft.Extensions.Localization; |
|||
using DashboardDemo.Localization.DashboardDemo; |
|||
using Volo.Abp.TenantManagement.Web.Navigation; |
|||
using Volo.Abp.UI.Navigation; |
|||
|
|||
namespace DashboardDemo.Menus |
|||
{ |
|||
public class DashboardDemoMenuContributor : IMenuContributor |
|||
{ |
|||
public async Task ConfigureMenuAsync(MenuConfigurationContext context) |
|||
{ |
|||
if (context.Menu.Name == StandardMenus.Main) |
|||
{ |
|||
await ConfigureMainMenuAsync(context); |
|||
} |
|||
} |
|||
|
|||
private async Task ConfigureMainMenuAsync(MenuConfigurationContext context) |
|||
{ |
|||
if (!DashboardDemoConsts.IsMultiTenancyEnabled) |
|||
{ |
|||
ApplicationMenuItem administration = context.Menu.GetAdministration(); |
|||
administration.TryRemoveMenuItem(TenantManagementMenuNames.GroupName); |
|||
} |
|||
|
|||
var l = context.ServiceProvider.GetRequiredService<IStringLocalizer<DashboardDemoResource>>(); |
|||
|
|||
context.Menu.Items.Insert(0, new ApplicationMenuItem("DashboardDemo.Home", l["Menu:Home"], "/")); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
using Microsoft.AspNetCore.Mvc.Localization; |
|||
using Microsoft.AspNetCore.Mvc.Razor.Internal; |
|||
using DashboardDemo.Localization.DashboardDemo; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; |
|||
|
|||
namespace DashboardDemo.Pages |
|||
{ |
|||
public abstract class DashboardDemoPageBase : AbpPage |
|||
{ |
|||
[RazorInject] |
|||
public IHtmlLocalizer<DashboardDemoResource> L { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
using DashboardDemo.Localization.DashboardDemo; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; |
|||
|
|||
namespace DashboardDemo.Pages |
|||
{ |
|||
public abstract class DashboardDemoPageModelBase : AbpPageModel |
|||
{ |
|||
protected DashboardDemoPageModelBase() |
|||
{ |
|||
LocalizationResourceType = typeof(DashboardDemoResource); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,27 @@ |
|||
@page |
|||
@inject IOptions<DashboardOptions> OptionsDashboadOptions |
|||
@inject IStringLocalizerFactory localizer |
|||
@using Microsoft.Extensions.Options |
|||
@using Volo.Abp.AspNetCore.Mvc.UI.Dashboards |
|||
@using DashboardDemo.Pages |
|||
@using DashboardDemo.Pages.widgets |
|||
@using DashboardDemo.Widgets |
|||
@using Microsoft.Extensions.Localization |
|||
@using Volo.Abp.AspNetCore.Mvc.UI.Widgets |
|||
@inherits DashboardDemoPageBase |
|||
@inject IWidgetRenderer WidgetRenderer |
|||
@model IndexModel |
|||
@section styles { |
|||
<link href="~/pages/index.css" rel="stylesheet" /> |
|||
} |
|||
<abp-card> |
|||
<abp-card-header>@L["Welcome"]</abp-card-header> |
|||
<abp-card-body> |
|||
@await WidgetRenderer.RenderAsync(Component, MyWidgetViewComponent.WidgetName) |
|||
</abp-card-body> |
|||
</abp-card> |
|||
|
|||
@foreach (var dashboard in OptionsDashboadOptions.Value.Dashboards) |
|||
{ |
|||
<a href="/@dashboard.Name">Go to @dashboard.DisplayName.Localize(localizer)</a> |
|||
} |
|||
@ -0,0 +1,10 @@ |
|||
namespace DashboardDemo.Pages |
|||
{ |
|||
public class IndexModel : DashboardDemoPageModelBase |
|||
{ |
|||
public void OnGet() |
|||
{ |
|||
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,16 @@ |
|||
@page |
|||
@using DashboardDemo.Dashboards |
|||
@using Microsoft.Extensions.Localization |
|||
@using Volo.Abp.AspNetCore.Mvc.UI.Dashboards |
|||
@using Volo.Abp.AspNetCore.Mvc.UI.Widgets |
|||
@inject IWidgetRenderer WidgetRenderer |
|||
@inject IDashboardRenderer DashboardRenderer |
|||
@inject IStringLocalizerFactory localizer |
|||
@model DashboardDemo.Pages.MyDashboardModel |
|||
@{ |
|||
} |
|||
@section scripts { |
|||
<abp-script-bundle name="MyDashboard" /> |
|||
} |
|||
|
|||
@await DashboardRenderer.RenderAsync(Component, new { dashboardName = DashboardNames.MyDashboard, dashboardOptions = Model._dashboardOptions, widgetOptions = Model._widgetOptions }) |
|||
@ -0,0 +1,32 @@ |
|||
using System.Linq; |
|||
using DashboardDemo.Dashboards; |
|||
using Microsoft.Extensions.Options; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Dashboards; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Widgets; |
|||
|
|||
namespace DashboardDemo.Pages |
|||
{ |
|||
public class MyDashboardModel : DashboardDemoPageModelBase |
|||
{ |
|||
public DashboardDefinition Dashboard { get; set; } |
|||
|
|||
public readonly DashboardOptions _dashboardOptions; |
|||
public readonly WidgetOptions _widgetOptions; |
|||
|
|||
public MyDashboardModel(IOptions<DashboardOptions> dashboardOptions, IOptions<WidgetOptions> widgetOptions) |
|||
{ |
|||
_dashboardOptions = dashboardOptions.Value; |
|||
_widgetOptions = widgetOptions.Value; |
|||
} |
|||
|
|||
public void OnGet() |
|||
{ |
|||
Dashboard = _dashboardOptions.Dashboards.Single(d => d.Name.Equals(DashboardNames.MyDashboard)); |
|||
} |
|||
|
|||
public WidgetDefinition GetWidget(string name) |
|||
{ |
|||
return _widgetOptions.Widgets.Single(d => d.Name.Equals(name)); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,4 @@ |
|||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers |
|||
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI |
|||
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap |
|||
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling |
|||
@ -0,0 +1,11 @@ |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Bundling; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Packages.Clipboard; |
|||
using Volo.Abp.Modularity; |
|||
|
|||
namespace DashboardDemo.Pages.widgets |
|||
{ |
|||
[DependsOn(typeof(ClipboardScriptBundleContributor))] |
|||
public class DemoStatisticsScriptContributor : BundleContributor |
|||
{ |
|||
} |
|||
} |
|||
@ -0,0 +1,6 @@ |
|||
@page |
|||
@model DashboardDemo.Pages.widgets.DemoStatisticsViewComponent |
|||
@{ |
|||
} |
|||
|
|||
Demo statistics |
|||
@ -0,0 +1,17 @@ |
|||
using Microsoft.AspNetCore.Mvc; |
|||
|
|||
namespace DashboardDemo.Pages.widgets |
|||
{ |
|||
[ViewComponent] |
|||
public class DemoStatisticsViewComponent : ViewComponent |
|||
{ |
|||
public const string WidgetName = "DemoStatistics"; |
|||
|
|||
public const string DisplayName = "DemoStatisticss"; |
|||
|
|||
public IViewComponentResult Invoke() |
|||
{ |
|||
return View("/Pages/widgets/DemoStatisticsViewComponent.cshtml", new DemoStatisticsViewComponent()); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,6 @@ |
|||
@page |
|||
@model DashboardDemo.Pages.widgets.MyWidgetViewComponent |
|||
@{ |
|||
} |
|||
|
|||
Hiiiiiii |
|||
@ -0,0 +1,28 @@ |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Bundling; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Packages.Clipboard; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Packages.JQuery; |
|||
using Volo.Abp.Modularity; |
|||
|
|||
namespace DashboardDemo.Pages.widgets |
|||
{ |
|||
[ViewComponent] |
|||
public class MyWidgetViewComponent : ViewComponent |
|||
{ |
|||
public const string WidgetName = "MyWidget"; |
|||
|
|||
public const string DisplayName = "MyWidgett"; |
|||
|
|||
public IViewComponentResult Invoke() |
|||
{ |
|||
return View("/Pages/widgets/MyWidgetViewComponent.cshtml", new MyWidgetViewComponent()); |
|||
} |
|||
} |
|||
|
|||
[DependsOn(typeof(JQueryScriptContributor))] |
|||
[DependsOn(typeof(ClipboardScriptBundleContributor))] |
|||
public class MyWidgetViewComponentScriptBundleContributor : BundleContributor |
|||
{ |
|||
|
|||
} |
|||
} |
|||
@ -0,0 +1,46 @@ |
|||
using System; |
|||
using System.IO; |
|||
using Microsoft.AspNetCore.Hosting; |
|||
using Serilog; |
|||
using Serilog.Events; |
|||
|
|||
namespace DashboardDemo |
|||
{ |
|||
public class Program |
|||
{ |
|||
public static int Main(string[] args) |
|||
{ |
|||
Log.Logger = new LoggerConfiguration() |
|||
.MinimumLevel.Debug() //TODO: Should be configurable!
|
|||
.MinimumLevel.Override("Microsoft", LogEventLevel.Information) |
|||
.Enrich.FromLogContext() |
|||
.WriteTo.File("Logs/logs.txt") |
|||
.CreateLogger(); |
|||
|
|||
try |
|||
{ |
|||
Log.Information("Starting web host."); |
|||
BuildWebHostInternal(args).Run(); |
|||
return 0; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
Log.Fatal(ex, "Host terminated unexpectedly!"); |
|||
return 1; |
|||
} |
|||
finally |
|||
{ |
|||
Log.CloseAndFlush(); |
|||
} |
|||
} |
|||
|
|||
public static IWebHost BuildWebHostInternal(string[] args) => |
|||
new WebHostBuilder() |
|||
.UseKestrel() |
|||
.UseContentRoot(Directory.GetCurrentDirectory()) |
|||
.UseIISIntegration() |
|||
.UseStartup<Startup>() |
|||
.UseSerilog() |
|||
.Build(); |
|||
} |
|||
} |
|||
@ -0,0 +1,27 @@ |
|||
{ |
|||
"iisSettings": { |
|||
"windowsAuthentication": false, |
|||
"anonymousAuthentication": true, |
|||
"iisExpress": { |
|||
"applicationUrl": "http://localhost:53929/", |
|||
"sslPort": 0 |
|||
} |
|||
}, |
|||
"profiles": { |
|||
"IIS Express": { |
|||
"commandName": "IISExpress", |
|||
"launchBrowser": true, |
|||
"environmentVariables": { |
|||
"ASPNETCORE_ENVIRONMENT": "Development" |
|||
} |
|||
}, |
|||
"DashboardDemo.Web": { |
|||
"commandName": "Project", |
|||
"launchBrowser": true, |
|||
"environmentVariables": { |
|||
"ASPNETCORE_ENVIRONMENT": "Development" |
|||
}, |
|||
"applicationUrl": "http://localhost:53932/" |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,26 @@ |
|||
using System; |
|||
using Microsoft.AspNetCore.Builder; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Microsoft.Extensions.Logging; |
|||
using Volo.Abp; |
|||
|
|||
namespace DashboardDemo |
|||
{ |
|||
public class Startup |
|||
{ |
|||
public IServiceProvider ConfigureServices(IServiceCollection services) |
|||
{ |
|||
services.AddApplication<DashboardDemoWebModule>(options => |
|||
{ |
|||
options.UseAutofac(); |
|||
}); |
|||
|
|||
return services.BuildServiceProviderFromFactory(); |
|||
} |
|||
|
|||
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory) |
|||
{ |
|||
app.InitializeApplication(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,3 @@ |
|||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers |
|||
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI |
|||
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap |
|||
@ -0,0 +1,28 @@ |
|||
using System.Collections.Generic; |
|||
using DashboardDemo.Localization.DashboardDemo; |
|||
using DashboardDemo.Pages.widgets; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Widgets; |
|||
using Volo.Abp.Localization; |
|||
|
|||
namespace DashboardDemo.Widgets |
|||
{ |
|||
public static class WidgetDefinitionProvider |
|||
{ |
|||
public static List<WidgetDefinition> GetDefinitions() |
|||
{ |
|||
return new List<WidgetDefinition> |
|||
{ |
|||
new WidgetDefinition( |
|||
MyWidgetViewComponent.WidgetName, |
|||
typeof(MyWidgetViewComponent), |
|||
LocalizableString.Create<DashboardDemoResource>(MyWidgetViewComponent.DisplayName) |
|||
), |
|||
new WidgetDefinition( |
|||
DemoStatisticsViewComponent.WidgetName, |
|||
typeof(DemoStatisticsViewComponent), |
|||
LocalizableString.Create<DashboardDemoResource>(DemoStatisticsViewComponent.DisplayName) |
|||
) |
|||
}; |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,8 @@ |
|||
module.exports = { |
|||
aliases: { |
|||
|
|||
}, |
|||
mappings: { |
|||
|
|||
} |
|||
}; |
|||
@ -0,0 +1,5 @@ |
|||
{ |
|||
"ConnectionStrings": { |
|||
"Default": "Server=localhost;Database=DashboardDemo;Trusted_Connection=True;MultipleActiveResultSets=true" |
|||
} |
|||
} |
|||
@ -0,0 +1,6 @@ |
|||
[ |
|||
{ |
|||
"outputFile": "wwwroot/pages/index.css", |
|||
"inputFile": "wwwroot/pages/index.scss" |
|||
} |
|||
] |
|||
@ -0,0 +1,49 @@ |
|||
{ |
|||
"compilers": { |
|||
"less": { |
|||
"autoPrefix": "", |
|||
"cssComb": "none", |
|||
"ieCompat": true, |
|||
"strictMath": false, |
|||
"strictUnits": false, |
|||
"relativeUrls": true, |
|||
"rootPath": "", |
|||
"sourceMapRoot": "", |
|||
"sourceMapBasePath": "", |
|||
"sourceMap": false |
|||
}, |
|||
"sass": { |
|||
"includePath": "", |
|||
"indentType": "space", |
|||
"indentWidth": 2, |
|||
"outputStyle": "nested", |
|||
"Precision": 5, |
|||
"relativeUrls": true, |
|||
"sourceMapRoot": "", |
|||
"sourceMap": false |
|||
}, |
|||
"stylus": { |
|||
"sourceMap": false |
|||
}, |
|||
"babel": { |
|||
"sourceMap": false |
|||
}, |
|||
"coffeescript": { |
|||
"bare": false, |
|||
"runtimeMode": "node", |
|||
"sourceMap": false |
|||
} |
|||
}, |
|||
"minifiers": { |
|||
"css": { |
|||
"enabled": true, |
|||
"termSemicolons": true, |
|||
"gzip": false |
|||
}, |
|||
"javascript": { |
|||
"enabled": true, |
|||
"termSemicolons": true, |
|||
"gzip": false |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
"use strict"; |
|||
|
|||
var gulp = require("gulp"), |
|||
path = require('path'), |
|||
copyResources = require('./node_modules/@abp/aspnetcore.mvc.ui/gulp/copy-resources.js'); |
|||
|
|||
copyResources.init(path.resolve('./')); |
|||
|
|||
gulp.task('default', [copyResources.taskName], function () { |
|||
|
|||
}); |
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue