From 681ca4eb503fe09221d3fc9084fff1ce59c7b299 Mon Sep 17 00:00:00 2001
From: HueiFeng <695979933@qq.com>
Date: Sat, 29 Aug 2020 20:20:54 +0800
Subject: [PATCH 1/8] Added Dockerfile
---
.dockerignore | 25 ++++++
.../src/EShopSample.Web/Dockerfile | 78 +++++++++++++++++++
.../EShopSample.Web/EShopSample.Web.csproj | 3 +
.../Properties/launchSettings.json | 7 ++
4 files changed, 113 insertions(+)
create mode 100644 .dockerignore
create mode 100644 samples/EShopSample/aspnet-core/src/EShopSample.Web/Dockerfile
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 00000000..3729ff0c
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,25 @@
+**/.classpath
+**/.dockerignore
+**/.env
+**/.git
+**/.gitignore
+**/.project
+**/.settings
+**/.toolstarget
+**/.vs
+**/.vscode
+**/*.*proj.user
+**/*.dbmdl
+**/*.jfm
+**/azds.yaml
+**/bin
+**/charts
+**/docker-compose*
+**/Dockerfile*
+**/node_modules
+**/npm-debug.log
+**/obj
+**/secrets.dev.yaml
+**/values.dev.yaml
+LICENSE
+README.md
\ No newline at end of file
diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Web/Dockerfile b/samples/EShopSample/aspnet-core/src/EShopSample.Web/Dockerfile
new file mode 100644
index 00000000..f150a658
--- /dev/null
+++ b/samples/EShopSample/aspnet-core/src/EShopSample.Web/Dockerfile
@@ -0,0 +1,78 @@
+#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
+
+FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base
+WORKDIR /app
+EXPOSE 80
+EXPOSE 443
+
+FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
+WORKDIR /src
+COPY ["samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj", "samples/EShopSample/aspnet-core/src/EShopSample.Web/"]
+COPY ["integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EasyAbp.EShop.Web.csproj", "integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/"]
+COPY ["modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Web/EasyAbp.EShop.Payments.Web.csproj", "modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Web/"]
+COPY ["modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp.EShop.Stores.Application.Contracts.csproj", "modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/"]
+COPY ["modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp.EShop.Stores.Domain.Shared.csproj", "modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/"]
+COPY ["modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi/EasyAbp.EShop.Payments.HttpApi.csproj", "modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi/"]
+COPY ["modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp.EShop.Payments.Application.Contracts.csproj", "modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/"]
+COPY ["modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp.EShop.Payments.Domain.Shared.csproj", "modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/"]
+COPY ["modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/EasyAbp.EShop.Plugins.Web.csproj", "modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/"]
+COPY ["modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/EasyAbp.EShop.Plugins.HttpApi.csproj", "modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/"]
+COPY ["modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/EasyAbp.EShop.Plugins.Application.Contracts.csproj", "modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/"]
+COPY ["modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp.EShop.Plugins.Domain.Shared.csproj", "modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/"]
+COPY ["integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/EasyAbp.EShop.HttpApi.csproj", "integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/"]
+COPY ["integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp.EShop.Application.Contracts.csproj", "integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/"]
+COPY ["modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp.EShop.Products.Application.Contracts.csproj", "modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/"]
+COPY ["modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp.EShop.Products.Domain.Shared.csproj", "modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/"]
+COPY ["modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp.EShop.Orders.Application.Contracts.csproj", "modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/"]
+COPY ["modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp.EShop.Orders.Domain.Shared.csproj", "modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/"]
+COPY ["integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp.EShop.Domain.Shared.csproj", "integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/"]
+COPY ["modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi/EasyAbp.EShop.Stores.HttpApi.csproj", "modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi/"]
+COPY ["modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.HttpApi/EasyAbp.EShop.Orders.HttpApi.csproj", "modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.HttpApi/"]
+COPY ["modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp.EShop.Products.HttpApi.csproj", "modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/"]
+COPY ["modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Web/EasyAbp.EShop.Orders.Web.csproj", "modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Web/"]
+COPY ["modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Web/EasyAbp.EShop.Stores.Web.csproj", "modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Web/"]
+COPY ["modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/EasyAbp.EShop.Products.Web.csproj", "modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/"]
+COPY ["samples/EShopSample/aspnet-core/src/EShopSample.Application/EShopSample.Application.csproj", "samples/EShopSample/aspnet-core/src/EShopSample.Application/"]
+COPY ["integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/EasyAbp.EShop.Application.csproj", "integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/"]
+COPY ["integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp.EShop.Domain.csproj", "integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/"]
+COPY ["modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/EasyAbp.EShop.Plugins.Domain.csproj", "modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/"]
+COPY ["modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp.EShop.Orders.Domain.csproj", "modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/"]
+COPY ["modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp.EShop.Products.Domain.csproj", "modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/"]
+COPY ["modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp.EShop.Payments.Domain.csproj", "modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/"]
+COPY ["modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain/EasyAbp.EShop.Stores.Domain.csproj", "modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain/"]
+COPY ["modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application/EasyAbp.EShop.Stores.Application.csproj", "modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application/"]
+COPY ["modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp.EShop.Products.Application.csproj", "modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/"]
+COPY ["modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/EasyAbp.EShop.Plugins.Application.csproj", "modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/"]
+COPY ["modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp.EShop.Payments.Application.csproj", "modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/"]
+COPY ["modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp.EShop.Orders.Application.csproj", "modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/"]
+COPY ["samples/EShopSample/aspnet-core/src/EShopSample.Domain/EShopSample.Domain.csproj", "samples/EShopSample/aspnet-core/src/EShopSample.Domain/"]
+COPY ["plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/EasyAbp.EShop.Plugins.Baskets.Domain.csproj", "plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/"]
+COPY ["plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp.EShop.Plugins.Baskets.Domain.Shared.csproj", "plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/"]
+COPY ["samples/EShopSample/aspnet-core/src/EShopSample.Domain.Shared/EShopSample.Domain.Shared.csproj", "samples/EShopSample/aspnet-core/src/EShopSample.Domain.Shared/"]
+COPY ["samples/EShopSample/aspnet-core/src/EShopSample.Application.Contracts/EShopSample.Application.Contracts.csproj", "samples/EShopSample/aspnet-core/src/EShopSample.Application.Contracts/"]
+COPY ["plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/EasyAbp.EShop.Plugins.Baskets.Application.Contracts.csproj", "plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/"]
+COPY ["plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/EasyAbp.EShop.Plugins.Baskets.Application.csproj", "plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/"]
+COPY ["plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/EasyAbp.EShop.Plugins.Baskets.Web.csproj", "plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/"]
+COPY ["plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi/EasyAbp.EShop.Plugins.Baskets.HttpApi.csproj", "plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi/"]
+COPY ["samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/EShopSample.EntityFrameworkCore.DbMigrations.csproj", "samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/"]
+COPY ["samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/EShopSample.EntityFrameworkCore.csproj", "samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/"]
+COPY ["integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp.EShop.EntityFrameworkCore.csproj", "integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/"]
+COPY ["modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.EntityFrameworkCore/EasyAbp.EShop.Stores.EntityFrameworkCore.csproj", "modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.EntityFrameworkCore/"]
+COPY ["modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp.EShop.Products.EntityFrameworkCore.csproj", "modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/"]
+COPY ["modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.EntityFrameworkCore/EasyAbp.EShop.Orders.EntityFrameworkCore.csproj", "modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.EntityFrameworkCore/"]
+COPY ["modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.EntityFrameworkCore/EasyAbp.EShop.Payments.EntityFrameworkCore.csproj", "modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.EntityFrameworkCore/"]
+COPY ["modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EasyAbp.EShop.Plugins.EntityFrameworkCore.csproj", "modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/"]
+COPY ["plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.csproj", "plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore/"]
+COPY ["samples/EShopSample/aspnet-core/src/EShopSample.HttpApi/EShopSample.HttpApi.csproj", "samples/EShopSample/aspnet-core/src/EShopSample.HttpApi/"]
+RUN dotnet restore "samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj"
+COPY . .
+WORKDIR "/src/samples/EShopSample/aspnet-core/src/EShopSample.Web"
+RUN dotnet build "EShopSample.Web.csproj" -c Release -o /app/build
+
+FROM build AS publish
+RUN dotnet publish "EShopSample.Web.csproj" -c Release -o /app/publish
+
+FROM base AS final
+WORKDIR /app
+COPY --from=publish /app/publish .
+ENTRYPOINT ["dotnet", "EShopSample.Web.dll"]
\ No newline at end of file
diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj b/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj
index 4b26b0e3..c6e7868e 100644
--- a/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj
+++ b/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj
@@ -13,6 +13,8 @@
false
true
EShopSample-4681b4fd-151f-4221-84a4-929d86723e4c
+ Linux
+ ..\..\..\..\..
@@ -32,6 +34,7 @@
+
diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Web/Properties/launchSettings.json b/samples/EShopSample/aspnet-core/src/EShopSample.Web/Properties/launchSettings.json
index a5a55e40..c0721e7b 100644
--- a/samples/EShopSample/aspnet-core/src/EShopSample.Web/Properties/launchSettings.json
+++ b/samples/EShopSample/aspnet-core/src/EShopSample.Web/Properties/launchSettings.json
@@ -22,6 +22,13 @@
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:44340/"
+ },
+ "Docker": {
+ "commandName": "Docker",
+ "launchBrowser": true,
+ "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
+ "publishAllPorts": true,
+ "useSSL": true
}
}
}
\ No newline at end of file
From 4b8353b7c063a8f9a57cb7504766e1e6f558473f Mon Sep 17 00:00:00 2001
From: HueiFeng <695979933@qq.com>
Date: Sat, 29 Aug 2020 22:12:53 +0800
Subject: [PATCH 2/8] Added StopApplication
---
.../EShopSample.DbMigrator/DbMigratorHostedService.cs | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.DbMigrator/DbMigratorHostedService.cs b/samples/EShopSample/aspnet-core/src/EShopSample.DbMigrator/DbMigratorHostedService.cs
index fb9c6f4e..b9ba7e43 100644
--- a/samples/EShopSample/aspnet-core/src/EShopSample.DbMigrator/DbMigratorHostedService.cs
+++ b/samples/EShopSample/aspnet-core/src/EShopSample.DbMigrator/DbMigratorHostedService.cs
@@ -10,6 +10,13 @@ namespace EShopSample.DbMigrator
{
public class DbMigratorHostedService : IHostedService
{
+ private readonly IHostApplicationLifetime _hostApplicationLifetime;
+
+ public DbMigratorHostedService(IHostApplicationLifetime hostApplicationLifetime)
+ {
+ _hostApplicationLifetime = hostApplicationLifetime;
+ }
+
public async Task StartAsync(CancellationToken cancellationToken)
{
using (var application = AbpApplicationFactory.Create(options =>
@@ -26,6 +33,8 @@ namespace EShopSample.DbMigrator
.MigrateAsync();
application.Shutdown();
+
+ _hostApplicationLifetime.StopApplication();
}
}
From 21e422777b403ba8f469dfcc144b066c99c24a46 Mon Sep 17 00:00:00 2001
From: Huei Feng <695979933@qq.com>
Date: Sat, 29 Aug 2020 22:16:54 +0800
Subject: [PATCH 3/8] Create azure-pipelines.yml
---
azure-pipelines.yml | 88 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 88 insertions(+)
create mode 100644 azure-pipelines.yml
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
new file mode 100644
index 00000000..9ec8ebba
--- /dev/null
+++ b/azure-pipelines.yml
@@ -0,0 +1,88 @@
+# ASP.NET Core (.NET Framework)
+# Build and test ASP.NET Core projects targeting the full .NET Framework.
+# Add steps that publish symbols, save build artifacts, and more:
+# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
+
+schedules:
+- cron: "0 */6 * * *"
+ displayName: Daily midnight build
+ branches:
+ include:
+ - master
+ always: true
+
+trigger:
+- master
+
+pool:
+ vmImage: 'ubuntu-latest'
+
+variables:
+ solution: '**/*.sln'
+ buildPlatform: 'Any CPU'
+ buildConfiguration: 'Release'
+
+steps:
+- task: UseDotNet@2
+ inputs:
+ packageType: 'sdk'
+ version: '3.x'
+- task: CmdLine@2
+ displayName: 'install dotnet-ef'
+ inputs:
+ script: 'dotnet tool install -g dotnet-ef'
+
+- task: CmdLine@2
+ inputs:
+ script: |
+ echo commands
+ sed -i '0,/Default[^,]*/s//$(ConnectionStrings)"/g' samples/EShopSample/aspnet-core/src/EShopSample.Web/appsettings.json
+ echo commands executed
+- task: CmdLine@2
+ inputs:
+ script: |
+ echo commands
+ sed -i '0,/Default[^,]*/s//$(ConnectionStrings)"/g' samples/EShopSample/aspnet-core/src/EShopSample.DbMigrator/appsettings.json
+ echo commands executed
+- task: DotNetCoreCLI@2
+ displayName: 'restore'
+ inputs:
+ command: 'restore'
+ feedsToUse: 'select'
+
+- task: DotNetCoreCLI@2
+ displayName: 'build'
+ inputs:
+ command: 'build'
+
+- task: CmdLine@2
+ displayName: 'publish'
+ inputs:
+ script: |
+ dotnet publish
+- task: CmdLine@2
+ displayName: 'drop database'
+ inputs:
+ script: |
+ dotnet ef database drop --project samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/EShopSample.EntityFrameworkCore.DbMigrations.csproj -s samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj -f
+
+- task: CmdLine@2
+ displayName: 'update database'
+ inputs:
+ script: |
+ dotnet ef database update --project samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/EShopSample.EntityFrameworkCore.DbMigrations.csproj -s samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj
+- task: CmdLine@2
+ inputs:
+ script: |
+ cd samples/EShopSample/aspnet-core/src/EShopSample.DbMigrator
+
+ dotnet run
+- task: Docker@2
+ displayName: 'build and push docker'
+ inputs:
+ containerRegistry: $(DockerRegistry)
+ repository: $(repository)
+ command: 'buildAndPush'
+ Dockerfile: 'samples/EShopSample/aspnet-core/src/EShopSample.Web/Dockerfile'
+ buildContext: .
+ tags: 'latest'
From 1fc0d085eff8b576e7fff058418bc9ae04616a14 Mon Sep 17 00:00:00 2001
From: Huei Feng <695979933@qq.com>
Date: Tue, 1 Sep 2020 11:35:29 +0800
Subject: [PATCH 4/8] Update azure-pipelines.yml for Azure Pipelines
---
azure-pipelines.yml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 9ec8ebba..b4f54742 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -12,8 +12,9 @@ schedules:
always: true
trigger:
-- master
-
+ branches:
+ include:
+ - master
pool:
vmImage: 'ubuntu-latest'
From d5901fc78dd9fb0c989efac4f022403a1deb8fba Mon Sep 17 00:00:00 2001
From: gdlcf88
Date: Wed, 2 Sep 2020 15:52:40 +0800
Subject: [PATCH 5/8] Rename GenerateNewOrderLineAsync to
GenerateOrderLineAsync Add param "orderExtraProperties" to
GenerateOrderLineAsync
---
common.props | 2 +-
.../EasyAbp/EShop/Orders/Orders/NewOrderGenerator.cs | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/common.props b/common.props
index 00da413f..f94ff832 100644
--- a/common.props
+++ b/common.props
@@ -1,7 +1,7 @@
latest
- 0.12.0
+ 0.13.0
$(NoWarn);CS1591
true
EasyAbp Team
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/NewOrderGenerator.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/NewOrderGenerator.cs
index 0b7bfc87..59c47ac5 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/NewOrderGenerator.cs
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/NewOrderGenerator.cs
@@ -44,7 +44,7 @@ namespace EasyAbp.EShop.Orders.Orders
foreach (var orderLine in input.OrderLines)
{
- orderLines.Add(await GenerateNewOrderLineAsync(orderLine, productDict));
+ orderLines.Add(await GenerateOrderLineAsync(orderLine, productDict, orderExtraProperties));
}
var productTotalPrice = orderLines.Select(x => x.TotalPrice).Sum();
@@ -77,7 +77,7 @@ namespace EasyAbp.EShop.Orders.Orders
return order;
}
- protected virtual async Task GenerateNewOrderLineAsync(CreateOrderLineDto input, Dictionary productDict)
+ protected virtual async Task GenerateOrderLineAsync(CreateOrderLineDto input, Dictionary productDict, Dictionary orderExtraProperties)
{
var product = productDict[input.ProductId];
var productSku = product.GetSkuById(input.ProductSkuId);
From a63c80a85614b8d94920303fd958132362c5ef0a Mon Sep 17 00:00:00 2001
From: gdlcf88
Date: Wed, 2 Sep 2020 16:49:38 +0800
Subject: [PATCH 6/8] Add missing ProductDisplayName to IOrderLine
---
common.props | 2 +-
.../EasyAbp/EShop/Orders/Orders/IOrderLine.cs | 4 +++-
.../EasyAbp/EShop/Orders/Orders/OrderLineEto.cs | 2 ++
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/common.props b/common.props
index f94ff832..c60015b3 100644
--- a/common.props
+++ b/common.props
@@ -1,7 +1,7 @@
latest
- 0.13.0
+ 0.13.1
$(NoWarn);CS1591
true
EasyAbp Team
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/IOrderLine.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/IOrderLine.cs
index 898b4480..970d6579 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/IOrderLine.cs
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/IOrderLine.cs
@@ -13,7 +13,9 @@ namespace EasyAbp.EShop.Orders.Orders
DateTime ProductDetailModificationTime { get; }
string ProductGroupName { get; }
-
+
+ string ProductGroupDisplayName { get; }
+
string ProductUniqueName { get; }
string ProductDisplayName { get; }
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/OrderLineEto.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/OrderLineEto.cs
index f8e95a46..c8084daf 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/OrderLineEto.cs
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/OrderLineEto.cs
@@ -17,6 +17,8 @@ namespace EasyAbp.EShop.Orders.Orders
public string ProductGroupName { get; set; }
+ public string ProductGroupDisplayName { get; set; }
+
public string ProductUniqueName { get; set; }
public string ProductDisplayName { get; set; }
From db6473fabdf131f698864ff9b74d90512ccfc616 Mon Sep 17 00:00:00 2001
From: gdlcf88
Date: Wed, 2 Sep 2020 17:51:00 +0800
Subject: [PATCH 7/8] Add ExtraProperties to IProductSku
---
common.props | 2 +-
.../EShop/Payments/Payments/PaymentItem.cs | 1 +
.../EasyAbp/EShop/Payments/Refunds/RefundItem.cs | 4 +++-
.../EShop/Products/Products/Dtos/ProductSkuDto.cs | 5 ++++-
.../EShop/Products/Products/IProductSku.cs | 3 ++-
.../EShop/Products/Products/ProductSkuEto.cs | 3 +++
.../EasyAbp/EShop/Products/Products/ProductSku.cs | 15 +++++++++++++--
7 files changed, 27 insertions(+), 6 deletions(-)
diff --git a/common.props b/common.props
index c60015b3..d4d43eae 100644
--- a/common.props
+++ b/common.props
@@ -1,7 +1,7 @@
latest
- 0.13.1
+ 0.14.0
$(NoWarn);CS1591
true
EasyAbp Team
diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Payments/PaymentItem.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Payments/PaymentItem.cs
index 0fdadb94..47402644 100644
--- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Payments/PaymentItem.cs
+++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Payments/PaymentItem.cs
@@ -41,6 +41,7 @@ namespace EasyAbp.EShop.Payments.Payments
private PaymentItem()
{
ExtraProperties = new Dictionary();
+ this.SetDefaultsForExtraProperties();
}
}
}
diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Refunds/RefundItem.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Refunds/RefundItem.cs
index 3d7f0502..f1d51ea7 100644
--- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Refunds/RefundItem.cs
+++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Refunds/RefundItem.cs
@@ -31,8 +31,10 @@ namespace EasyAbp.EShop.Payments.Refunds
protected RefundItem()
{
- ExtraProperties = new Dictionary();
RefundItemOrderLines = new List();
+
+ ExtraProperties = new Dictionary();
+ this.SetDefaultsForExtraProperties();
}
public void SetStoreId(Guid storeId)
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductSkuDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductSkuDto.cs
index fdad70fc..070382bf 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductSkuDto.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductSkuDto.cs
@@ -1,10 +1,11 @@
using System;
using System.Collections.Generic;
using Volo.Abp.Application.Dtos;
+using Volo.Abp.Data;
namespace EasyAbp.EShop.Products.Products.Dtos
{
- public class ProductSkuDto : FullAuditedEntityDto
+ public class ProductSkuDto : FullAuditedEntityDto, IHasExtraProperties
{
public List AttributeOptionIds { get; set; }
@@ -32,5 +33,7 @@ namespace EasyAbp.EShop.Products.Products.Dtos
public string MediaResources { get; set; }
public Guid? ProductDetailId { get; set; }
+
+ public Dictionary ExtraProperties { get; set; }
}
}
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Products/IProductSku.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Products/IProductSku.cs
index 0d1117cc..920945c9 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Products/IProductSku.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Products/IProductSku.cs
@@ -1,8 +1,9 @@
using System;
+using Volo.Abp.Data;
namespace EasyAbp.EShop.Products.Products
{
- public interface IProductSku
+ public interface IProductSku : IHasExtraProperties
{
string SerializedAttributeOptionIds { get; }
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Products/ProductSkuEto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Products/ProductSkuEto.cs
index a244f4cd..fbdef2d4 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Products/ProductSkuEto.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Products/ProductSkuEto.cs
@@ -1,4 +1,5 @@
using System;
+using System.Collections.Generic;
namespace EasyAbp.EShop.Products.Products
{
@@ -23,5 +24,7 @@ namespace EasyAbp.EShop.Products.Products
public string MediaResources { get; set; }
public Guid? ProductDetailId { get; set; }
+
+ public Dictionary ExtraProperties { get; set; }
}
}
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductSku.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductSku.cs
index d7fc2f0c..cc82b56b 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductSku.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductSku.cs
@@ -1,5 +1,7 @@
using System;
+using System.Collections.Generic;
using JetBrains.Annotations;
+using Volo.Abp.Data;
using Volo.Abp.Domain.Entities.Auditing;
namespace EasyAbp.EShop.Products.Products
@@ -26,9 +28,15 @@ namespace EasyAbp.EShop.Products.Products
[CanBeNull]
public virtual string MediaResources { get; protected set; }
- public Guid? ProductDetailId { get; set; }
+ public virtual Guid? ProductDetailId { get; protected set; }
+
+ public virtual Dictionary ExtraProperties { get; protected set; }
- protected ProductSku() {}
+ protected ProductSku()
+ {
+ ExtraProperties = new Dictionary();
+ this.SetDefaultsForExtraProperties();
+ }
public ProductSku(
Guid id,
@@ -51,6 +59,9 @@ namespace EasyAbp.EShop.Products.Products
OrderMaxQuantity = orderMaxQuantity;
MediaResources = mediaResources;
ProductDetailId = productDetailId;
+
+ ExtraProperties = new Dictionary();
+ this.SetDefaultsForExtraProperties();
}
public void TrimCode()
From 4a98ee4d43f9bb3a45ff9fcbd69d5da4d51a73c2 Mon Sep 17 00:00:00 2001
From: gdlcf88
Date: Wed, 2 Sep 2020 17:56:07 +0800
Subject: [PATCH 8/8] Add migration in EShopSample
---
...dedExtraPropertiesToProductSku.Designer.cs | 4239 +++++++++++++++++
...095440_AddedExtraPropertiesToProductSku.cs | 22 +
...pSampleMigrationsDbContextModelSnapshot.cs | 4 +
3 files changed, 4265 insertions(+)
create mode 100644 samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200902095440_AddedExtraPropertiesToProductSku.Designer.cs
create mode 100644 samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200902095440_AddedExtraPropertiesToProductSku.cs
diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200902095440_AddedExtraPropertiesToProductSku.Designer.cs b/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200902095440_AddedExtraPropertiesToProductSku.Designer.cs
new file mode 100644
index 00000000..47e89513
--- /dev/null
+++ b/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200902095440_AddedExtraPropertiesToProductSku.Designer.cs
@@ -0,0 +1,4239 @@
+//
+using System;
+using EShopSample.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Volo.Abp.EntityFrameworkCore;
+
+namespace EShopSample.Migrations
+{
+ [DbContext(typeof(EShopSampleMigrationsDbContext))]
+ [Migration("20200902095440_AddedExtraPropertiesToProductSku")]
+ partial class AddedExtraPropertiesToProductSku
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
+ .HasAnnotation("ProductVersion", "3.1.5")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128)
+ .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
+
+ modelBuilder.Entity("EasyAbp.EShop.Orders.Orders.Order", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ActualTotalPrice")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("CanceledTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CancellationReason")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CompletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(40)")
+ .HasMaxLength(40);
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Currency")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CustomerRemark")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CustomerUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("OrderNumber")
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("OrderStatus")
+ .HasColumnType("int");
+
+ b.Property("PaidTime")
+ .HasColumnType("datetime2");
+
+ b.Property("PaymentId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ProductTotalPrice")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("ReducedInventoryAfterPaymentTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ReducedInventoryAfterPlacingTime")
+ .HasColumnType("datetime2");
+
+ b.Property("RefundAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("StaffRemark")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("StoreId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TotalDiscount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("TotalPrice")
+ .HasColumnType("decimal(20,8)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("OrderNumber")
+ .IsUnique()
+ .HasFilter("[OrderNumber] IS NOT NULL");
+
+ b.ToTable("EasyAbpEShopOrdersOrders");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Orders.Orders.OrderLine", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ActualTotalPrice")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Currency")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("MediaResources")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("OrderId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ProductDetailModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ProductDisplayName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ProductGroupDisplayName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ProductGroupName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ProductId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ProductModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ProductSkuId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ProductUniqueName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Quantity")
+ .HasColumnType("int");
+
+ b.Property("RefundAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("RefundedQuantity")
+ .HasColumnType("int");
+
+ b.Property("SkuDescription")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("SkuName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TotalDiscount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("TotalPrice")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("UnitPrice")
+ .HasColumnType("decimal(20,8)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("OrderId");
+
+ b.ToTable("EasyAbpEShopOrdersOrderLines");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Payments.Payments.Payment", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ActualPaymentAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("CanceledTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CompletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(40)")
+ .HasMaxLength(40);
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Currency")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ExternalTradingCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("OriginalPaymentAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("PayeeAccount")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("PaymentDiscount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("PaymentMethod")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("PendingRefundAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("RefundAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("UserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.ToTable("EasyAbpEShopPaymentsPayments");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Payments.Payments.PaymentItem", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ActualPaymentAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("ItemKey")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ItemType")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("OriginalPaymentAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("PaymentDiscount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("PaymentId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("PendingRefundAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("RefundAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("StoreId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("PaymentId");
+
+ b.ToTable("EasyAbpEShopPaymentsPaymentItems");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Payments.Refunds.Refund", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CanceledTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CompletedTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(40)")
+ .HasMaxLength(40);
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Currency")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CustomerRemark")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("DisplayReason")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ExternalTradingCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("PaymentId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("RefundAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("RefundPaymentMethod")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("StaffRemark")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.ToTable("EasyAbpEShopPaymentsRefunds");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Payments.Refunds.RefundItem", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CustomerRemark")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("OrderId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("PaymentItemId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("RefundAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("RefundId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("StaffRemark")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("StoreId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("RefundId");
+
+ b.ToTable("EasyAbpEShopPaymentsRefundItems");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Payments.Refunds.RefundItemOrderLine", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("OrderLineId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("RefundAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("RefundItemId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("RefundedQuantity")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("RefundItemId");
+
+ b.ToTable("EasyAbpEShopPaymentsRefundItemOrderLines");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Plugins.Baskets.BasketItems.BasketItem", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("BasketName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(40)")
+ .HasMaxLength(40);
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Currency")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Inventory")
+ .HasColumnType("int");
+
+ b.Property("IsInvalid")
+ .HasColumnType("bit");
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("MediaResources")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ProductDisplayName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ProductId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ProductSkuId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ProductUniqueName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Quantity")
+ .HasColumnType("int");
+
+ b.Property("SkuDescription")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("SkuName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("StoreId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TotalDiscount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("TotalPrice")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("UnitPrice")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("UserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("UserId");
+
+ b.ToTable("EasyAbpEShopPluginsBasketsBasketItems");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Plugins.Baskets.ProductUpdates.ProductUpdate", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(40)")
+ .HasMaxLength(40);
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ProductSkuId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ProductSkuId");
+
+ b.ToTable("EasyAbpEShopPluginsBasketsProductUpdates");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Products.Categories.Category", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Code")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(40)")
+ .HasMaxLength(40);
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DisplayName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("IsHidden")
+ .HasColumnType("bit");
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Level")
+ .HasColumnType("int");
+
+ b.Property("MediaResources")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ParentId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("UniqueName")
+ .HasColumnType("nvarchar(450)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ParentId");
+
+ b.HasIndex("UniqueName")
+ .IsUnique()
+ .HasFilter("[UniqueName] IS NOT NULL");
+
+ b.ToTable("EasyAbpEShopProductsCategories");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Products.ProductCategories.ProductCategory", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CategoryId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(40)")
+ .HasMaxLength(40);
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DisplayOrder")
+ .HasColumnType("int");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ProductId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.ToTable("EasyAbpEShopProductsProductCategories");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Products.ProductDetailHistories.ProductDetailHistory", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(40)")
+ .HasMaxLength(40);
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ProductDetailId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("SerializedEntityData")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ModificationTime");
+
+ b.HasIndex("ProductDetailId");
+
+ b.ToTable("EasyAbpEShopProductsProductDetailHistories");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Products.ProductDetails.ProductDetail", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(40)")
+ .HasMaxLength(40);
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.ToTable("EasyAbpEShopProductsProductDetails");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Products.ProductHistories.ProductHistory", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property