Browse Source

Merge branch 'dev' into ProductTagAndStoreOwner

pull/81/head
RayMMond 6 years ago
parent
commit
29080d6253
  1. 51
      .github/workflows/publish-docs.yml
  2. 14
      README.md
  3. 1
      README.md
  4. 2
      common.props
  5. 57
      docs/README.md
  6. 4
      integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp/EShop/EShopDbProperties.cs
  7. 10
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/CancelOrderInput.cs
  8. 9
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/CompleteOrderInput.cs
  9. 2
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/OrderDto.cs
  10. 4
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/IOrderAppService.cs
  11. 9
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/OrderAppService.cs
  12. 2
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/IOrder.cs
  13. 2
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/OrderEto.cs
  14. 2
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp.EShop.Orders.Domain.csproj
  15. 9
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/Order.cs
  16. 1
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderManager.cs
  17. 9
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderPaymentCompletedEventHandler.cs
  18. 9
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderPaymentCreatedEventHandler.cs
  19. 4
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/OrdersDbProperties.cs
  20. 16
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.HttpApi/EasyAbp/EShop/Orders/Orders/OrderController.cs
  21. 2
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp.EShop.Payments.Application.Contracts.csproj
  22. 5
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp/EShop/Payments/EShopPaymentsApplicationContractsModule.cs
  23. 6
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Payments/BasicPayableCheckProvider.cs
  24. 12
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Payments/MultiCurrencyNotSupportedException.cs
  25. 3
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Payments/PaymentAppService.cs
  26. 2
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp.EShop.Payments.Domain.csproj
  27. 2
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Payments/PaymentItem.cs
  28. 4
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/PaymentsDbProperties.cs
  29. 11
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Refunds/Refund.cs
  30. 34
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Refunds/RefundItem.cs
  31. 4
      modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/PluginsDbProperties.cs
  32. 4
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductsDbProperties.cs
  33. 4
      modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain/EasyAbp/EShop/Stores/StoresDbProperties.cs
  34. 4
      plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/EasyAbp/EShop/Plugins/Baskets/BasketsDbProperties.cs
  35. 4
      samples/EShopSample/aspnet-core/src/EShopSample.Application.Contracts/EShopSample.Application.Contracts.csproj
  36. 4
      samples/EShopSample/aspnet-core/src/EShopSample.Application/EShopSample.Application.csproj
  37. 4
      samples/EShopSample/aspnet-core/src/EShopSample.Domain.Shared/EShopSample.Domain.Shared.csproj
  38. 4
      samples/EShopSample/aspnet-core/src/EShopSample.Domain/EShopSample.Domain.csproj
  39. 3865
      samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200824110408_UpgradedPaymentServiceTo1_0_0.Designer.cs
  40. 423
      samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200824110408_UpgradedPaymentServiceTo1_0_0.cs
  41. 3865
      samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200825104114_AddedEasyAbpPrefix.Designer.cs
  42. 837
      samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200825104114_AddedEasyAbpPrefix.cs
  43. 3930
      samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200825130202_UpgradedPaymentServiceTo1_1_0.Designer.cs
  44. 110
      samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200825130202_UpgradedPaymentServiceTo1_1_0.cs
  45. 170
      samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/EShopSampleMigrationsDbContextModelSnapshot.cs
  46. 4
      samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/EShopSample.EntityFrameworkCore.csproj
  47. 4
      samples/EShopSample/aspnet-core/src/EShopSample.HttpApi.Client/EShopSample.HttpApi.Client.csproj
  48. 4
      samples/EShopSample/aspnet-core/src/EShopSample.HttpApi/EShopSample.HttpApi.csproj
  49. 4
      samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj

51
.github/workflows/publish-docs.yml

@ -0,0 +1,51 @@
name: publish to easyabp.io
on:
push:
branches:
- master
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 0
- name: Find and Replace
uses: shitiomatic/str-replace@master
with:
find: \]\((/docs/)
replace: "](/modules/${{ github.event.repository.name }}/"
include: docs/
- name: Pull repo and change files
id: change
run: |
ls
git clone https://github.com/EasyAbp/easyabp.github.io
cd easyabp.github.io
rm -rf docs/modules/${{ github.event.repository.name }}
rm -rf docs/.vuepress/public/modules/${{ github.event.repository.name }}
cp -rf ../docs/ docs/modules/${{ github.event.repository.name }}
cp -rf ../docs/ docs/.vuepress/public/modules/${{ github.event.repository.name }}
git add --all
echo "##[set-output name=diff;]$(git diff --staged)"
- name: Commit files
if: steps.change.outputs.diff
run: |
ls
cd easyabp.github.io
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -m "Update the docs of ${{ github.event.repository.name }}" -a
- name: Push changes
if: steps.change.outputs.diff
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.EASYABP_IO_ACCESS_TOKEN }}
repository: EasyAbp/easyabp.github.io
directory: easyabp.github.io

14
README.md

@ -1,14 +0,0 @@
# EShop
[![NuGet](https://img.shields.io/nuget/v/EasyAbp.EShop.Domain.Shared.svg?style=flat-square)](https://www.nuget.org/packages/EasyAbp.EShop.Domain.Shared)
[![NuGet Download](https://img.shields.io/nuget/dt/EasyAbp.EShop.Domain.Shared.svg?style=flat-square)](https://www.nuget.org/packages/EasyAbp.EShop.Domain.Shared)
An abp application module group that provides basic e-shop service.
## Getting Start
Todo.
## Usage
Todo.

1
README.md

@ -0,0 +1 @@
/docs/README.md

2
common.props

@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>0.9.3</Version>
<Version>0.10.0</Version>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>EasyAbp Team</Authors>

57
docs/README.md

@ -0,0 +1,57 @@
# EShop
[![NuGet](https://img.shields.io/nuget/v/EasyAbp.EShop.Domain.Shared.svg?style=flat-square)](https://www.nuget.org/packages/EasyAbp.EShop.Domain.Shared)
[![NuGet Download](https://img.shields.io/nuget/dt/EasyAbp.EShop.Domain.Shared.svg?style=flat-square)](https://www.nuget.org/packages/EasyAbp.EShop.Domain.Shared)
[![GitHub stars](https://img.shields.io/github/stars/EasyAbp/EShop?style=social)](https://www.github.com/EasyAbp/EShop)
An abp application module group that provides basic e-shop service.
## Online Demo
We have launched an online demo for this module: [https://eshop.samples.easyabp.io](https://eshop.samples.easyabp.io)
## Installation
1. Follow [the document](https://github.com/EasyAbp/PaymentService#installation) to install the dependent PaymentService module.
1. Install the following NuGet packages. ([see how](https://github.com/EasyAbp/EasyAbpGuide/blob/master/How-To.md#add-nuget-packages))
* EasyAbp.EShop.Application
* EasyAbp.EShop.Application.Contracts
* EasyAbp.EShop.Domain
* EasyAbp.EShop.Domain.Shared
* EasyAbp.EShop.EntityFrameworkCore
* EasyAbp.EShop.HttpApi
* EasyAbp.EShop.HttpApi.Client
* (Optional) EasyAbp.EShop.MongoDB
* (Optional) EasyAbp.EShop.Web
> The above packages are integration packages containing the necessary sub-modules.
> Please install packages of each sub-module separately if you are using microservices.
> For example: install only the `EasyAbp.EShop.Products.Application` package.
1. Add `DependsOn(typeof(EShopXxxModule))` attribute to configure the module dependencies. ([see how](https://github.com/EasyAbp/EasyAbpGuide/blob/master/How-To.md#add-module-dependencies))
1. Add `builder.ConfigureEShop();` to the `OnModelCreating()` method in **MyProjectMigrationsDbContext.cs**.
1. Add EF Core migrations and update your database. See: [ABP document](https://docs.abp.io/en/abp/latest/Tutorials/Part-1?UI=MVC#add-new-migration-update-the-database).
## Usage
Todo.
## Sub-Modules
* Core modules
* Orders
* Payments
* Plugins
* Products
* Stores
* Plugin modules
* Baskets
## Roadmap
Todo.

4
integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp/EShop/EShopDbProperties.cs

@ -2,10 +2,10 @@
{
public static class EShopDbProperties
{
public static string DbTablePrefix { get; set; } = "EShop";
public static string DbTablePrefix { get; set; } = "EasyAbpEShop";
public static string DbSchema { get; set; } = null;
public const string ConnectionStringName = "EShop";
public const string ConnectionStringName = "EasyAbpEShop";
}
}

10
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/CancelOrderInput.cs

@ -0,0 +1,10 @@
using System;
namespace EasyAbp.EShop.Orders.Orders.Dtos
{
[Serializable]
public class CancelOrderInput
{
public string CancellationReason { get; set; }
}
}

9
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/CompleteOrderInput.cs

@ -1,9 +0,0 @@
using System;
namespace EasyAbp.EShop.Orders.Orders.Dtos
{
public class CompleteOrderInput
{
public Guid OrderId { get; set; }
}
}

2
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/OrderDto.cs

@ -36,6 +36,8 @@ namespace EasyAbp.EShop.Orders.Orders.Dtos
public DateTime? CanceledTime { get; set; }
public string CancellationReason { get; set; }
public DateTime? ReducedInventoryAfterPlacingTime { get; set; }
public DateTime? ReducedInventoryAfterPaymentTime { get; set; }

4
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/IOrderAppService.cs

@ -14,6 +14,8 @@ namespace EasyAbp.EShop.Orders.Orders
{
Task<OrderDto> GetByOrderNumberAsync(string orderNumber);
Task<OrderDto> CompleteAsync(CompleteOrderInput input);
Task<OrderDto> CompleteAsync(Guid id);
Task<OrderDto> CancelAsync(Guid id, CancelOrderInput input);
}
}

9
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/OrderAppService.cs

@ -153,9 +153,9 @@ namespace EasyAbp.EShop.Orders.Orders
}
[Authorize(OrdersPermissions.Orders.Complete)]
public virtual async Task<OrderDto> CompleteAsync(CompleteOrderInput input)
public virtual async Task<OrderDto> CompleteAsync(Guid id)
{
var order = await GetEntityByIdAsync(input.OrderId);
var order = await GetEntityByIdAsync(id);
if (order.CustomerUserId != CurrentUser.GetId())
{
@ -166,5 +166,10 @@ namespace EasyAbp.EShop.Orders.Orders
return MapToGetOutputDto(order);
}
public virtual Task<OrderDto> CancelAsync(Guid id, CancelOrderInput input)
{
throw new NotImplementedException();
}
}
}

2
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/IOrder.cs

@ -33,6 +33,8 @@ namespace EasyAbp.EShop.Orders.Orders
DateTime? CanceledTime { get; }
string CancellationReason { get; }
DateTime? ReducedInventoryAfterPlacingTime { get; }
DateTime? ReducedInventoryAfterPaymentTime { get; }

2
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/OrderEto.cs

@ -41,6 +41,8 @@ namespace EasyAbp.EShop.Orders.Orders
public DateTime? CanceledTime { get; set; }
public string CancellationReason { get; set; }
public DateTime? ReducedInventoryAfterPlacingTime { get; set; }
public DateTime? ReducedInventoryAfterPaymentTime { get; set; }

2
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp.EShop.Orders.Domain.csproj

@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="EasyAbp.PaymentService.Domain.Shared" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.Domain.Shared" Version="1.1.0" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.5" />
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="3.0.5" />
<ProjectReference Include="..\..\..\EasyAbp.EShop.Payments\src\EasyAbp.EShop.Payments.Domain.Shared\EasyAbp.EShop.Payments.Domain.Shared.csproj" />

9
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/Order.cs

@ -45,6 +45,9 @@ namespace EasyAbp.EShop.Orders.Orders
public virtual DateTime? CanceledTime { get; protected set; }
[CanBeNull]
public virtual string CancellationReason { get; protected set; }
public virtual DateTime? ReducedInventoryAfterPlacingTime { get; protected set; }
public virtual DateTime? ReducedInventoryAfterPaymentTime { get; protected set; }
@ -121,5 +124,11 @@ namespace EasyAbp.EShop.Orders.Orders
{
CompletionTime = completionTime;
}
public void Cancel(DateTime canceledTime, [CanBeNull] string reason)
{
CanceledTime = canceledTime;
CancellationReason = reason;
}
}
}

1
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderManager.cs

@ -44,6 +44,7 @@ namespace EasyAbp.EShop.Orders.Orders
}
order.SetCompletionTime(_clock.Now);
order.SetOrderStatus(OrderStatus.Completed);
return await _orderRepository.UpdateAsync(order, true);
}

9
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderPaymentCompletedEventHandler.cs

@ -1,4 +1,5 @@
using System.Linq;
using System;
using System.Linq;
using System.Threading.Tasks;
using EasyAbp.EShop.Payments;
using EasyAbp.PaymentService.Payments;
@ -55,7 +56,9 @@ namespace EasyAbp.EShop.Orders.Orders
foreach (var item in payment.PaymentItems.Where(item => item.ItemType == PaymentsConsts.PaymentItemType))
{
var order = await _orderRepository.GetAsync(item.ItemKey);
var orderId = Guid.Parse(item.ItemKey);
var order = await _orderRepository.GetAsync(orderId);
if (order.PaymentId != payment.Id || order.PaidTime.HasValue ||
order.OrderStatus != OrderStatus.Pending)
@ -65,7 +68,7 @@ namespace EasyAbp.EShop.Orders.Orders
if (!await _orderPaymentChecker.IsValidPaymentAsync(order, payment, item))
{
throw new OrderPaymentInvalidException(payment.Id, item.ItemKey);
throw new OrderPaymentInvalidException(payment.Id, orderId);
}
order.SetPaidTime(_clock.Now);

9
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderPaymentCreatedEventHandler.cs

@ -1,4 +1,5 @@
using System.Linq;
using System;
using System.Linq;
using System.Threading.Tasks;
using EasyAbp.EShop.Payments;
using EasyAbp.PaymentService.Payments;
@ -32,7 +33,9 @@ namespace EasyAbp.EShop.Orders.Orders
foreach (var item in eventData.Entity.PaymentItems.Where(item => item.ItemType == PaymentsConsts.PaymentItemType))
{
var order = await _orderRepository.GetAsync(item.ItemKey);
var orderId = Guid.Parse(item.ItemKey);
var order = await _orderRepository.GetAsync(orderId);
if (order.PaymentId.HasValue || order.OrderStatus != OrderStatus.Pending)
{
@ -43,7 +46,7 @@ namespace EasyAbp.EShop.Orders.Orders
if (!await _orderPaymentChecker.IsValidPaymentAsync(order, eventData.Entity, item))
{
// Todo: should cancel the payment?
throw new OrderPaymentInvalidException(eventData.Entity.Id, item.ItemKey);
throw new OrderPaymentInvalidException(eventData.Entity.Id, orderId);
}
order.SetPaymentId(eventData.Entity.Id);

4
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/OrdersDbProperties.cs

@ -2,10 +2,10 @@
{
public static class OrdersDbProperties
{
public static string DbTablePrefix { get; set; } = "EShopOrders";
public static string DbTablePrefix { get; set; } = "EasyAbpEShopOrders";
public static string DbSchema { get; set; } = null;
public const string ConnectionStringName = "EShopOrders";
public const string ConnectionStringName = "EasyAbpEShopOrders";
}
}

16
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.HttpApi/EasyAbp/EShop/Orders/Orders/OrderController.cs

@ -54,17 +54,25 @@ namespace EasyAbp.EShop.Orders.Orders
}
[HttpGet]
[Route("byOrderNumber")]
[Route("byOrderNumber/{orderNumber}")]
public Task<OrderDto> GetByOrderNumberAsync(string orderNumber)
{
return _service.GetByOrderNumberAsync(orderNumber);
}
[HttpPost]
[Route("complete")]
public Task<OrderDto> CompleteAsync(CompleteOrderInput input)
[Route("{id}/complete")]
public Task<OrderDto> CompleteAsync(Guid id)
{
return _service.CompleteAsync(input);
return _service.CompleteAsync(id);
}
[HttpPost]
[Route("{id}/cancel")]
public Task<OrderDto> CancelAsync(Guid id, CancelOrderInput input)
{
return _service.CancelAsync(id, input);
}
}
}

2
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp.EShop.Payments.Application.Contracts.csproj

@ -9,7 +9,7 @@
<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="3.0.5" />
<PackageReference Include="Volo.Abp.Authorization" Version="3.0.5" />
<PackageReference Include="Volo.Abp.Authorization" Version="3.0.5" /> <PackageReference Include="EasyAbp.PaymentService.Domain.Shared" Version="1.1.0" />
<ProjectReference Include="..\EasyAbp.EShop.Payments.Domain.Shared\EasyAbp.EShop.Payments.Domain.Shared.csproj" />
</ItemGroup>

5
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp/EShop/Payments/EShopPaymentsApplicationContractsModule.cs

@ -1,12 +1,13 @@
using Volo.Abp.Application;
using EasyAbp.PaymentService;
using Volo.Abp.Application;
using Volo.Abp.Modularity;
using Volo.Abp.VirtualFileSystem;
using Volo.Abp.Authorization;
namespace EasyAbp.EShop.Payments
{
[DependsOn(
typeof(EShopPaymentsDomainSharedModule),
typeof(PaymentServiceDomainSharedModule),
typeof(AbpDddApplicationContractsModule),
typeof(AbpAuthorizationModule)
)]

6
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Payments/BasicPayableCheckProvider.cs

@ -19,14 +19,10 @@ namespace EasyAbp.EShop.Payments.Payments
if (orders.Select(order => order.Currency).Distinct().Count() != 1)
{
// Todo: convert to a single currency.
throw new MultiCurrencyNotSupportedException();
}
// if (orders.Select(order => order.StoreId).Distinct().Count() != 1)
// {
// throw new MultiStorePaymentNotSupportedException();
// }
return Task.CompletedTask;
}
}

12
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Payments/MultiCurrencyNotSupportedException.cs

@ -0,0 +1,12 @@
using Volo.Abp;
namespace EasyAbp.EShop.Payments.Payments
{
public class MultiCurrencyNotSupportedException : BusinessException
{
public MultiCurrencyNotSupportedException() : base(message: $"The currency of all orders should be the same.")
{
}
}
}

3
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Payments/PaymentAppService.cs

@ -97,8 +97,7 @@ namespace EasyAbp.EShop.Payments.Payments
PaymentItems = orders.Select(order => new CreatePaymentItemEto
{
ItemType = PaymentsConsts.PaymentItemType,
ItemKey = order.Id,
Currency = order.Currency,
ItemKey = order.Id.ToString(),
OriginalPaymentAmount = order.TotalPrice,
ExtraProperties = new Dictionary<string, object> {{"StoreId", orders.First().StoreId.ToString()}}
}).ToList()

2
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp.EShop.Payments.Domain.csproj

@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="EasyAbp.PaymentService.Domain.Shared" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.Domain.Shared" Version="1.1.0" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.5" />
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="3.0.5" />
<ProjectReference Include="..\..\..\EasyAbp.EShop.Stores\src\EasyAbp.EShop.Stores.Domain.Shared\EasyAbp.EShop.Stores.Domain.Shared.csproj" />

2
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Payments/PaymentItem.cs

@ -15,7 +15,7 @@ namespace EasyAbp.EShop.Payments.Payments
[NotNull]
public virtual string ItemType { get; protected set; }
public virtual Guid ItemKey { get; protected set; }
public virtual string ItemKey { get; protected set; }
[NotNull]
public virtual string Currency { get; protected set; }

4
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/PaymentsDbProperties.cs

@ -2,10 +2,10 @@
{
public static class PaymentsDbProperties
{
public static string DbTablePrefix { get; set; } = "EShopPayments";
public static string DbTablePrefix { get; set; } = "EasyAbpEShopPayments";
public static string DbSchema { get; set; } = null;
public const string ConnectionStringName = "EShopPayments";
public const string ConnectionStringName = "EasyAbpEShopPayments";
}
}

11
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Refunds/Refund.cs

@ -13,8 +13,6 @@ namespace EasyAbp.EShop.Payments.Refunds
public virtual Guid PaymentId { get; protected set; }
public virtual Guid PaymentItemId { get; protected set; }
[NotNull]
public virtual string RefundPaymentMethod { get; protected set; }
@ -25,6 +23,8 @@ namespace EasyAbp.EShop.Payments.Refunds
public virtual string Currency { get; protected set; }
public virtual decimal RefundAmount { get; protected set; }
public virtual string DisplayReason { get; protected set; }
[CanBeNull]
public virtual string CustomerRemark { get; protected set; }
@ -38,16 +38,9 @@ namespace EasyAbp.EShop.Payments.Refunds
#endregion
public virtual Guid? StoreId { get; protected set; }
private Refund()
{
}
public void SetStoreId(Guid? storeId)
{
StoreId = storeId;
}
}
}

34
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Refunds/RefundItem.cs

@ -0,0 +1,34 @@
using System;
using EasyAbp.PaymentService.Refunds;
using JetBrains.Annotations;
using Volo.Abp.Domain.Entities.Auditing;
namespace EasyAbp.EShop.Payments.Refunds
{
public class RefundItem : FullAuditedEntity<Guid>, IRefundItem
{
#region Base properties
public virtual Guid PaymentItemId { get; protected set; }
public virtual decimal RefundAmount { get; protected set; }
public virtual string CustomerRemark { get; protected set; }
public virtual string StaffRemark { get; protected set; }
#endregion
public virtual Guid? StoreId { get; protected set; }
private RefundItem()
{
}
public void SetStoreId(Guid? storeId)
{
StoreId = storeId;
}
}
}

4
modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/PluginsDbProperties.cs

@ -2,10 +2,10 @@
{
public static class PluginsDbProperties
{
public static string DbTablePrefix { get; set; } = "EShopPlugins";
public static string DbTablePrefix { get; set; } = "EasyAbpEShopPlugins";
public static string DbSchema { get; set; } = null;
public const string ConnectionStringName = "EShopPlugins";
public const string ConnectionStringName = "EasyAbpEShopPlugins";
}
}

4
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductsDbProperties.cs

@ -2,10 +2,10 @@
{
public static class ProductsDbProperties
{
public static string DbTablePrefix { get; set; } = "EShopProducts";
public static string DbTablePrefix { get; set; } = "EasyAbpEShopProducts";
public static string DbSchema { get; set; } = null;
public const string ConnectionStringName = "EShopProducts";
public const string ConnectionStringName = "EasyAbpEShopProducts";
}
}

4
modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain/EasyAbp/EShop/Stores/StoresDbProperties.cs

@ -2,10 +2,10 @@
{
public static class StoresDbProperties
{
public static string DbTablePrefix { get; set; } = "EShopStores";
public static string DbTablePrefix { get; set; } = "EasyAbpEShopStores";
public static string DbSchema { get; set; } = null;
public const string ConnectionStringName = "EShopStores";
public const string ConnectionStringName = "EasyAbpEShopStores";
}
}

4
plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/EasyAbp/EShop/Plugins/Baskets/BasketsDbProperties.cs

@ -2,10 +2,10 @@
{
public static class BasketsDbProperties
{
public static string DbTablePrefix { get; set; } = "EShopPluginsBaskets";
public static string DbTablePrefix { get; set; } = "EasyAbpEShopPluginsBaskets";
public static string DbSchema { get; set; } = null;
public const string ConnectionStringName = "EShopPluginsBaskets";
public const string ConnectionStringName = "EasyAbpEShopPluginsBaskets";
}
}

4
samples/EShopSample/aspnet-core/src/EShopSample.Application.Contracts/EShopSample.Application.Contracts.csproj

@ -14,8 +14,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="EasyAbp.PaymentService.Application.Contracts" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.WeChatPay.Application.Contracts" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.Application.Contracts" Version="1.1.0" />
<PackageReference Include="EasyAbp.PaymentService.WeChatPay.Application.Contracts" Version="1.1.0" />
<PackageReference Include="Volo.Abp.ObjectExtending" Version="3.0.5" />
<PackageReference Include="Volo.Abp.Account.Application.Contracts" Version="3.0.5" />
<PackageReference Include="Volo.Abp.Identity.Application.Contracts" Version="3.0.5" />

4
samples/EShopSample/aspnet-core/src/EShopSample.Application/EShopSample.Application.csproj

@ -15,8 +15,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="EasyAbp.PaymentService.Application" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.WeChatPay.Application" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.Application" Version="1.1.0" />
<PackageReference Include="EasyAbp.PaymentService.WeChatPay.Application" Version="1.1.0" />
<PackageReference Include="Volo.Abp.Account.Application" Version="3.0.5" />
<PackageReference Include="Volo.Abp.Identity.Application" Version="3.0.5" />
<PackageReference Include="Volo.Abp.PermissionManagement.Application" Version="3.0.5" />

4
samples/EShopSample/aspnet-core/src/EShopSample.Domain.Shared/EShopSample.Domain.Shared.csproj

@ -9,8 +9,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="EasyAbp.PaymentService.Domain.Shared" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.WeChatPay.Domain.Shared" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.Domain.Shared" Version="1.1.0" />
<PackageReference Include="EasyAbp.PaymentService.WeChatPay.Domain.Shared" Version="1.1.0" />
<PackageReference Include="Volo.Abp.Identity.Domain.Shared" Version="3.0.5" />
<PackageReference Include="Volo.Abp.IdentityServer.Domain.Shared" Version="3.0.5" />
<PackageReference Include="Volo.Abp.BackgroundJobs.Domain.Shared" Version="3.0.5" />

4
samples/EShopSample/aspnet-core/src/EShopSample.Domain/EShopSample.Domain.csproj

@ -14,8 +14,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="EasyAbp.PaymentService.Domain" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.WeChatPay.Domain" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.Domain" Version="1.1.0" />
<PackageReference Include="EasyAbp.PaymentService.WeChatPay.Domain" Version="1.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.DataAnnotations" Version="2.2.0" />
<PackageReference Include="Volo.Abp.Identity.Domain" Version="3.0.5" />
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.Identity" Version="3.0.5" />

3865
samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200824110408_UpgradedPaymentServiceTo1_0_0.Designer.cs

File diff suppressed because it is too large

423
samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200824110408_UpgradedPaymentServiceTo1_0_0.cs

@ -0,0 +1,423 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace EShopSample.Migrations
{
public partial class UpgradedPaymentServiceTo1_0_0 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_PaymentServicePaymentItems_PaymentServicePayments_PaymentId",
table: "PaymentServicePaymentItems");
migrationBuilder.DropPrimaryKey(
name: "PK_PaymentServiceWeChatPayRefundRecords",
table: "PaymentServiceWeChatPayRefundRecords");
migrationBuilder.DropPrimaryKey(
name: "PK_PaymentServiceWeChatPayPaymentRecords",
table: "PaymentServiceWeChatPayPaymentRecords");
migrationBuilder.DropPrimaryKey(
name: "PK_PaymentServiceRefunds",
table: "PaymentServiceRefunds");
migrationBuilder.DropPrimaryKey(
name: "PK_PaymentServicePayments",
table: "PaymentServicePayments");
migrationBuilder.DropPrimaryKey(
name: "PK_PaymentServicePaymentItems",
table: "PaymentServicePaymentItems");
migrationBuilder.DropColumn(
name: "Currency",
table: "PaymentServicePaymentItems");
migrationBuilder.RenameTable(
name: "PaymentServiceWeChatPayRefundRecords",
newName: "EasyAbpPaymentServiceWeChatPayRefundRecords");
migrationBuilder.RenameTable(
name: "PaymentServiceWeChatPayPaymentRecords",
newName: "EasyAbpPaymentServiceWeChatPayPaymentRecords");
migrationBuilder.RenameTable(
name: "PaymentServiceRefunds",
newName: "EasyAbpPaymentServiceRefunds");
migrationBuilder.RenameTable(
name: "PaymentServicePayments",
newName: "EasyAbpPaymentServicePayments");
migrationBuilder.RenameTable(
name: "PaymentServicePaymentItems",
newName: "EasyAbpPaymentServicePaymentItems");
migrationBuilder.RenameIndex(
name: "IX_PaymentServiceWeChatPayRefundRecords_PaymentId",
table: "EasyAbpPaymentServiceWeChatPayRefundRecords",
newName: "IX_EasyAbpPaymentServiceWeChatPayRefundRecords_PaymentId");
migrationBuilder.RenameIndex(
name: "IX_PaymentServiceWeChatPayPaymentRecords_PaymentId",
table: "EasyAbpPaymentServiceWeChatPayPaymentRecords",
newName: "IX_EasyAbpPaymentServiceWeChatPayPaymentRecords_PaymentId");
migrationBuilder.RenameIndex(
name: "IX_PaymentServicePaymentItems_PaymentId",
table: "EasyAbpPaymentServicePaymentItems",
newName: "IX_EasyAbpPaymentServicePaymentItems_PaymentId");
migrationBuilder.AlterColumn<string>(
name: "ItemKey",
table: "EShopPaymentsPaymentItems",
nullable: true,
oldClrType: typeof(Guid),
oldType: "uniqueidentifier");
migrationBuilder.AddColumn<string>(
name: "ExtraProperties",
table: "EShopPaymentsPaymentItems",
nullable: true);
migrationBuilder.AlterColumn<decimal>(
name: "RefundAmount",
table: "EasyAbpPaymentServiceRefunds",
type: "decimal(20,8)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AlterColumn<decimal>(
name: "RefundAmount",
table: "EasyAbpPaymentServicePayments",
type: "decimal(20,8)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AlterColumn<decimal>(
name: "PendingRefundAmount",
table: "EasyAbpPaymentServicePayments",
type: "decimal(20,8)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AlterColumn<decimal>(
name: "PaymentDiscount",
table: "EasyAbpPaymentServicePayments",
type: "decimal(20,8)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AlterColumn<decimal>(
name: "OriginalPaymentAmount",
table: "EasyAbpPaymentServicePayments",
type: "decimal(20,8)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AlterColumn<decimal>(
name: "ActualPaymentAmount",
table: "EasyAbpPaymentServicePayments",
type: "decimal(20,8)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AlterColumn<decimal>(
name: "RefundAmount",
table: "EasyAbpPaymentServicePaymentItems",
type: "decimal(20,8)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AlterColumn<decimal>(
name: "PendingRefundAmount",
table: "EasyAbpPaymentServicePaymentItems",
type: "decimal(20,8)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AlterColumn<decimal>(
name: "PaymentDiscount",
table: "EasyAbpPaymentServicePaymentItems",
type: "decimal(20,8)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AlterColumn<decimal>(
name: "OriginalPaymentAmount",
table: "EasyAbpPaymentServicePaymentItems",
type: "decimal(20,8)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AlterColumn<string>(
name: "ItemKey",
table: "EasyAbpPaymentServicePaymentItems",
nullable: true,
oldClrType: typeof(Guid),
oldType: "uniqueidentifier");
migrationBuilder.AlterColumn<decimal>(
name: "ActualPaymentAmount",
table: "EasyAbpPaymentServicePaymentItems",
type: "decimal(20,8)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpPaymentServiceWeChatPayRefundRecords",
table: "EasyAbpPaymentServiceWeChatPayRefundRecords",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpPaymentServiceWeChatPayPaymentRecords",
table: "EasyAbpPaymentServiceWeChatPayPaymentRecords",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpPaymentServiceRefunds",
table: "EasyAbpPaymentServiceRefunds",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpPaymentServicePayments",
table: "EasyAbpPaymentServicePayments",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpPaymentServicePaymentItems",
table: "EasyAbpPaymentServicePaymentItems",
column: "Id");
migrationBuilder.AddForeignKey(
name: "FK_EasyAbpPaymentServicePaymentItems_EasyAbpPaymentServicePayments_PaymentId",
table: "EasyAbpPaymentServicePaymentItems",
column: "PaymentId",
principalTable: "EasyAbpPaymentServicePayments",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_EasyAbpPaymentServicePaymentItems_EasyAbpPaymentServicePayments_PaymentId",
table: "EasyAbpPaymentServicePaymentItems");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpPaymentServiceWeChatPayRefundRecords",
table: "EasyAbpPaymentServiceWeChatPayRefundRecords");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpPaymentServiceWeChatPayPaymentRecords",
table: "EasyAbpPaymentServiceWeChatPayPaymentRecords");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpPaymentServiceRefunds",
table: "EasyAbpPaymentServiceRefunds");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpPaymentServicePayments",
table: "EasyAbpPaymentServicePayments");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpPaymentServicePaymentItems",
table: "EasyAbpPaymentServicePaymentItems");
migrationBuilder.DropColumn(
name: "ExtraProperties",
table: "EShopPaymentsPaymentItems");
migrationBuilder.RenameTable(
name: "EasyAbpPaymentServiceWeChatPayRefundRecords",
newName: "PaymentServiceWeChatPayRefundRecords");
migrationBuilder.RenameTable(
name: "EasyAbpPaymentServiceWeChatPayPaymentRecords",
newName: "PaymentServiceWeChatPayPaymentRecords");
migrationBuilder.RenameTable(
name: "EasyAbpPaymentServiceRefunds",
newName: "PaymentServiceRefunds");
migrationBuilder.RenameTable(
name: "EasyAbpPaymentServicePayments",
newName: "PaymentServicePayments");
migrationBuilder.RenameTable(
name: "EasyAbpPaymentServicePaymentItems",
newName: "PaymentServicePaymentItems");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpPaymentServiceWeChatPayRefundRecords_PaymentId",
table: "PaymentServiceWeChatPayRefundRecords",
newName: "IX_PaymentServiceWeChatPayRefundRecords_PaymentId");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpPaymentServiceWeChatPayPaymentRecords_PaymentId",
table: "PaymentServiceWeChatPayPaymentRecords",
newName: "IX_PaymentServiceWeChatPayPaymentRecords_PaymentId");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpPaymentServicePaymentItems_PaymentId",
table: "PaymentServicePaymentItems",
newName: "IX_PaymentServicePaymentItems_PaymentId");
migrationBuilder.AlterColumn<Guid>(
name: "ItemKey",
table: "EShopPaymentsPaymentItems",
type: "uniqueidentifier",
nullable: false,
oldClrType: typeof(string),
oldNullable: true);
migrationBuilder.AlterColumn<decimal>(
name: "RefundAmount",
table: "PaymentServiceRefunds",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(20,8)");
migrationBuilder.AlterColumn<decimal>(
name: "RefundAmount",
table: "PaymentServicePayments",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(20,8)");
migrationBuilder.AlterColumn<decimal>(
name: "PendingRefundAmount",
table: "PaymentServicePayments",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(20,8)");
migrationBuilder.AlterColumn<decimal>(
name: "PaymentDiscount",
table: "PaymentServicePayments",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(20,8)");
migrationBuilder.AlterColumn<decimal>(
name: "OriginalPaymentAmount",
table: "PaymentServicePayments",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(20,8)");
migrationBuilder.AlterColumn<decimal>(
name: "ActualPaymentAmount",
table: "PaymentServicePayments",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(20,8)");
migrationBuilder.AlterColumn<decimal>(
name: "RefundAmount",
table: "PaymentServicePaymentItems",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(20,8)");
migrationBuilder.AlterColumn<decimal>(
name: "PendingRefundAmount",
table: "PaymentServicePaymentItems",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(20,8)");
migrationBuilder.AlterColumn<decimal>(
name: "PaymentDiscount",
table: "PaymentServicePaymentItems",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(20,8)");
migrationBuilder.AlterColumn<decimal>(
name: "OriginalPaymentAmount",
table: "PaymentServicePaymentItems",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(20,8)");
migrationBuilder.AlterColumn<Guid>(
name: "ItemKey",
table: "PaymentServicePaymentItems",
type: "uniqueidentifier",
nullable: false,
oldClrType: typeof(string),
oldNullable: true);
migrationBuilder.AlterColumn<decimal>(
name: "ActualPaymentAmount",
table: "PaymentServicePaymentItems",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(20,8)");
migrationBuilder.AddColumn<string>(
name: "Currency",
table: "PaymentServicePaymentItems",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddPrimaryKey(
name: "PK_PaymentServiceWeChatPayRefundRecords",
table: "PaymentServiceWeChatPayRefundRecords",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_PaymentServiceWeChatPayPaymentRecords",
table: "PaymentServiceWeChatPayPaymentRecords",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_PaymentServiceRefunds",
table: "PaymentServiceRefunds",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_PaymentServicePayments",
table: "PaymentServicePayments",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_PaymentServicePaymentItems",
table: "PaymentServicePaymentItems",
column: "Id");
migrationBuilder.AddForeignKey(
name: "FK_PaymentServicePaymentItems_PaymentServicePayments_PaymentId",
table: "PaymentServicePaymentItems",
column: "PaymentId",
principalTable: "PaymentServicePayments",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
}
}
}

3865
samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200825104114_AddedEasyAbpPrefix.Designer.cs

File diff suppressed because it is too large

837
samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200825104114_AddedEasyAbpPrefix.cs

@ -0,0 +1,837 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace EShopSample.Migrations
{
public partial class AddedEasyAbpPrefix : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_EShopOrdersOrderLines_EShopOrdersOrders_OrderId",
table: "EShopOrdersOrderLines");
migrationBuilder.DropForeignKey(
name: "FK_EShopPaymentsPaymentItems_EShopPaymentsPayments_PaymentId",
table: "EShopPaymentsPaymentItems");
migrationBuilder.DropForeignKey(
name: "FK_EShopProductsCategories_EShopProductsCategories_ParentId",
table: "EShopProductsCategories");
migrationBuilder.DropForeignKey(
name: "FK_EShopProductsProductAttributeOptions_EShopProductsProductAttributes_ProductAttributeId",
table: "EShopProductsProductAttributeOptions");
migrationBuilder.DropForeignKey(
name: "FK_EShopProductsProductAttributes_EShopProductsProducts_ProductId",
table: "EShopProductsProductAttributes");
migrationBuilder.DropForeignKey(
name: "FK_EShopProductsProductSkus_EShopProductsProducts_ProductId",
table: "EShopProductsProductSkus");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopStoresStores",
table: "EShopStoresStores");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopProductsProductTypes",
table: "EShopProductsProductTypes");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopProductsProductStores",
table: "EShopProductsProductStores");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopProductsProductSkus",
table: "EShopProductsProductSkus");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopProductsProducts",
table: "EShopProductsProducts");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopProductsProductInventories",
table: "EShopProductsProductInventories");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopProductsProductHistories",
table: "EShopProductsProductHistories");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopProductsProductDetails",
table: "EShopProductsProductDetails");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopProductsProductDetailHistories",
table: "EShopProductsProductDetailHistories");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopProductsProductCategories",
table: "EShopProductsProductCategories");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopProductsProductAttributes",
table: "EShopProductsProductAttributes");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopProductsProductAttributeOptions",
table: "EShopProductsProductAttributeOptions");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopProductsCategories",
table: "EShopProductsCategories");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopPluginsBasketsProductUpdates",
table: "EShopPluginsBasketsProductUpdates");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopPluginsBasketsBasketItems",
table: "EShopPluginsBasketsBasketItems");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopPaymentsRefunds",
table: "EShopPaymentsRefunds");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopPaymentsPayments",
table: "EShopPaymentsPayments");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopPaymentsPaymentItems",
table: "EShopPaymentsPaymentItems");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopOrdersOrders",
table: "EShopOrdersOrders");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopOrdersOrderLines",
table: "EShopOrdersOrderLines");
migrationBuilder.RenameTable(
name: "EShopStoresStores",
newName: "EasyAbpEShopStoresStores");
migrationBuilder.RenameTable(
name: "EShopProductsProductTypes",
newName: "EasyAbpEShopProductsProductTypes");
migrationBuilder.RenameTable(
name: "EShopProductsProductStores",
newName: "EasyAbpEShopProductsProductStores");
migrationBuilder.RenameTable(
name: "EShopProductsProductSkus",
newName: "EasyAbpEShopProductsProductSkus");
migrationBuilder.RenameTable(
name: "EShopProductsProducts",
newName: "EasyAbpEShopProductsProducts");
migrationBuilder.RenameTable(
name: "EShopProductsProductInventories",
newName: "EasyAbpEShopProductsProductInventories");
migrationBuilder.RenameTable(
name: "EShopProductsProductHistories",
newName: "EasyAbpEShopProductsProductHistories");
migrationBuilder.RenameTable(
name: "EShopProductsProductDetails",
newName: "EasyAbpEShopProductsProductDetails");
migrationBuilder.RenameTable(
name: "EShopProductsProductDetailHistories",
newName: "EasyAbpEShopProductsProductDetailHistories");
migrationBuilder.RenameTable(
name: "EShopProductsProductCategories",
newName: "EasyAbpEShopProductsProductCategories");
migrationBuilder.RenameTable(
name: "EShopProductsProductAttributes",
newName: "EasyAbpEShopProductsProductAttributes");
migrationBuilder.RenameTable(
name: "EShopProductsProductAttributeOptions",
newName: "EasyAbpEShopProductsProductAttributeOptions");
migrationBuilder.RenameTable(
name: "EShopProductsCategories",
newName: "EasyAbpEShopProductsCategories");
migrationBuilder.RenameTable(
name: "EShopPluginsBasketsProductUpdates",
newName: "EasyAbpEShopPluginsBasketsProductUpdates");
migrationBuilder.RenameTable(
name: "EShopPluginsBasketsBasketItems",
newName: "EasyAbpEShopPluginsBasketsBasketItems");
migrationBuilder.RenameTable(
name: "EShopPaymentsRefunds",
newName: "EasyAbpEShopPaymentsRefunds");
migrationBuilder.RenameTable(
name: "EShopPaymentsPayments",
newName: "EasyAbpEShopPaymentsPayments");
migrationBuilder.RenameTable(
name: "EShopPaymentsPaymentItems",
newName: "EasyAbpEShopPaymentsPaymentItems");
migrationBuilder.RenameTable(
name: "EShopOrdersOrders",
newName: "EasyAbpEShopOrdersOrders");
migrationBuilder.RenameTable(
name: "EShopOrdersOrderLines",
newName: "EasyAbpEShopOrdersOrderLines");
migrationBuilder.RenameIndex(
name: "IX_EShopProductsProductSkus_ProductId",
table: "EasyAbpEShopProductsProductSkus",
newName: "IX_EasyAbpEShopProductsProductSkus_ProductId");
migrationBuilder.RenameIndex(
name: "IX_EShopProductsProducts_UniqueName",
table: "EasyAbpEShopProductsProducts",
newName: "IX_EasyAbpEShopProductsProducts_UniqueName");
migrationBuilder.RenameIndex(
name: "IX_EShopProductsProductInventories_ProductSkuId",
table: "EasyAbpEShopProductsProductInventories",
newName: "IX_EasyAbpEShopProductsProductInventories_ProductSkuId");
migrationBuilder.RenameIndex(
name: "IX_EShopProductsProductHistories_ProductId",
table: "EasyAbpEShopProductsProductHistories",
newName: "IX_EasyAbpEShopProductsProductHistories_ProductId");
migrationBuilder.RenameIndex(
name: "IX_EShopProductsProductHistories_ModificationTime",
table: "EasyAbpEShopProductsProductHistories",
newName: "IX_EasyAbpEShopProductsProductHistories_ModificationTime");
migrationBuilder.RenameIndex(
name: "IX_EShopProductsProductDetailHistories_ProductDetailId",
table: "EasyAbpEShopProductsProductDetailHistories",
newName: "IX_EasyAbpEShopProductsProductDetailHistories_ProductDetailId");
migrationBuilder.RenameIndex(
name: "IX_EShopProductsProductDetailHistories_ModificationTime",
table: "EasyAbpEShopProductsProductDetailHistories",
newName: "IX_EasyAbpEShopProductsProductDetailHistories_ModificationTime");
migrationBuilder.RenameIndex(
name: "IX_EShopProductsProductAttributes_ProductId",
table: "EasyAbpEShopProductsProductAttributes",
newName: "IX_EasyAbpEShopProductsProductAttributes_ProductId");
migrationBuilder.RenameIndex(
name: "IX_EShopProductsProductAttributeOptions_ProductAttributeId",
table: "EasyAbpEShopProductsProductAttributeOptions",
newName: "IX_EasyAbpEShopProductsProductAttributeOptions_ProductAttributeId");
migrationBuilder.RenameIndex(
name: "IX_EShopProductsCategories_UniqueName",
table: "EasyAbpEShopProductsCategories",
newName: "IX_EasyAbpEShopProductsCategories_UniqueName");
migrationBuilder.RenameIndex(
name: "IX_EShopProductsCategories_ParentId",
table: "EasyAbpEShopProductsCategories",
newName: "IX_EasyAbpEShopProductsCategories_ParentId");
migrationBuilder.RenameIndex(
name: "IX_EShopPluginsBasketsProductUpdates_ProductSkuId",
table: "EasyAbpEShopPluginsBasketsProductUpdates",
newName: "IX_EasyAbpEShopPluginsBasketsProductUpdates_ProductSkuId");
migrationBuilder.RenameIndex(
name: "IX_EShopPluginsBasketsBasketItems_UserId",
table: "EasyAbpEShopPluginsBasketsBasketItems",
newName: "IX_EasyAbpEShopPluginsBasketsBasketItems_UserId");
migrationBuilder.RenameIndex(
name: "IX_EShopPaymentsPaymentItems_PaymentId",
table: "EasyAbpEShopPaymentsPaymentItems",
newName: "IX_EasyAbpEShopPaymentsPaymentItems_PaymentId");
migrationBuilder.RenameIndex(
name: "IX_EShopOrdersOrders_OrderNumber",
table: "EasyAbpEShopOrdersOrders",
newName: "IX_EasyAbpEShopOrdersOrders_OrderNumber");
migrationBuilder.RenameIndex(
name: "IX_EShopOrdersOrderLines_OrderId",
table: "EasyAbpEShopOrdersOrderLines",
newName: "IX_EasyAbpEShopOrdersOrderLines_OrderId");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopStoresStores",
table: "EasyAbpEShopStoresStores",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopProductsProductTypes",
table: "EasyAbpEShopProductsProductTypes",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopProductsProductStores",
table: "EasyAbpEShopProductsProductStores",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopProductsProductSkus",
table: "EasyAbpEShopProductsProductSkus",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopProductsProducts",
table: "EasyAbpEShopProductsProducts",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopProductsProductInventories",
table: "EasyAbpEShopProductsProductInventories",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopProductsProductHistories",
table: "EasyAbpEShopProductsProductHistories",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopProductsProductDetails",
table: "EasyAbpEShopProductsProductDetails",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopProductsProductDetailHistories",
table: "EasyAbpEShopProductsProductDetailHistories",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopProductsProductCategories",
table: "EasyAbpEShopProductsProductCategories",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopProductsProductAttributes",
table: "EasyAbpEShopProductsProductAttributes",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopProductsProductAttributeOptions",
table: "EasyAbpEShopProductsProductAttributeOptions",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopProductsCategories",
table: "EasyAbpEShopProductsCategories",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopPluginsBasketsProductUpdates",
table: "EasyAbpEShopPluginsBasketsProductUpdates",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopPluginsBasketsBasketItems",
table: "EasyAbpEShopPluginsBasketsBasketItems",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopPaymentsRefunds",
table: "EasyAbpEShopPaymentsRefunds",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopPaymentsPayments",
table: "EasyAbpEShopPaymentsPayments",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopPaymentsPaymentItems",
table: "EasyAbpEShopPaymentsPaymentItems",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopOrdersOrders",
table: "EasyAbpEShopOrdersOrders",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopOrdersOrderLines",
table: "EasyAbpEShopOrdersOrderLines",
column: "Id");
migrationBuilder.AddForeignKey(
name: "FK_EasyAbpEShopOrdersOrderLines_EasyAbpEShopOrdersOrders_OrderId",
table: "EasyAbpEShopOrdersOrderLines",
column: "OrderId",
principalTable: "EasyAbpEShopOrdersOrders",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_EasyAbpEShopPaymentsPaymentItems_EasyAbpEShopPaymentsPayments_PaymentId",
table: "EasyAbpEShopPaymentsPaymentItems",
column: "PaymentId",
principalTable: "EasyAbpEShopPaymentsPayments",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_EasyAbpEShopProductsCategories_EasyAbpEShopProductsCategories_ParentId",
table: "EasyAbpEShopProductsCategories",
column: "ParentId",
principalTable: "EasyAbpEShopProductsCategories",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_EasyAbpEShopProductsProductAttributeOptions_EasyAbpEShopProductsProductAttributes_ProductAttributeId",
table: "EasyAbpEShopProductsProductAttributeOptions",
column: "ProductAttributeId",
principalTable: "EasyAbpEShopProductsProductAttributes",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_EasyAbpEShopProductsProductAttributes_EasyAbpEShopProductsProducts_ProductId",
table: "EasyAbpEShopProductsProductAttributes",
column: "ProductId",
principalTable: "EasyAbpEShopProductsProducts",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_EasyAbpEShopProductsProductSkus_EasyAbpEShopProductsProducts_ProductId",
table: "EasyAbpEShopProductsProductSkus",
column: "ProductId",
principalTable: "EasyAbpEShopProductsProducts",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_EasyAbpEShopOrdersOrderLines_EasyAbpEShopOrdersOrders_OrderId",
table: "EasyAbpEShopOrdersOrderLines");
migrationBuilder.DropForeignKey(
name: "FK_EasyAbpEShopPaymentsPaymentItems_EasyAbpEShopPaymentsPayments_PaymentId",
table: "EasyAbpEShopPaymentsPaymentItems");
migrationBuilder.DropForeignKey(
name: "FK_EasyAbpEShopProductsCategories_EasyAbpEShopProductsCategories_ParentId",
table: "EasyAbpEShopProductsCategories");
migrationBuilder.DropForeignKey(
name: "FK_EasyAbpEShopProductsProductAttributeOptions_EasyAbpEShopProductsProductAttributes_ProductAttributeId",
table: "EasyAbpEShopProductsProductAttributeOptions");
migrationBuilder.DropForeignKey(
name: "FK_EasyAbpEShopProductsProductAttributes_EasyAbpEShopProductsProducts_ProductId",
table: "EasyAbpEShopProductsProductAttributes");
migrationBuilder.DropForeignKey(
name: "FK_EasyAbpEShopProductsProductSkus_EasyAbpEShopProductsProducts_ProductId",
table: "EasyAbpEShopProductsProductSkus");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopStoresStores",
table: "EasyAbpEShopStoresStores");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopProductsProductTypes",
table: "EasyAbpEShopProductsProductTypes");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopProductsProductStores",
table: "EasyAbpEShopProductsProductStores");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopProductsProductSkus",
table: "EasyAbpEShopProductsProductSkus");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopProductsProducts",
table: "EasyAbpEShopProductsProducts");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopProductsProductInventories",
table: "EasyAbpEShopProductsProductInventories");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopProductsProductHistories",
table: "EasyAbpEShopProductsProductHistories");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopProductsProductDetails",
table: "EasyAbpEShopProductsProductDetails");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopProductsProductDetailHistories",
table: "EasyAbpEShopProductsProductDetailHistories");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopProductsProductCategories",
table: "EasyAbpEShopProductsProductCategories");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopProductsProductAttributes",
table: "EasyAbpEShopProductsProductAttributes");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopProductsProductAttributeOptions",
table: "EasyAbpEShopProductsProductAttributeOptions");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopProductsCategories",
table: "EasyAbpEShopProductsCategories");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopPluginsBasketsProductUpdates",
table: "EasyAbpEShopPluginsBasketsProductUpdates");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopPluginsBasketsBasketItems",
table: "EasyAbpEShopPluginsBasketsBasketItems");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopPaymentsRefunds",
table: "EasyAbpEShopPaymentsRefunds");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopPaymentsPayments",
table: "EasyAbpEShopPaymentsPayments");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopPaymentsPaymentItems",
table: "EasyAbpEShopPaymentsPaymentItems");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopOrdersOrders",
table: "EasyAbpEShopOrdersOrders");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopOrdersOrderLines",
table: "EasyAbpEShopOrdersOrderLines");
migrationBuilder.RenameTable(
name: "EasyAbpEShopStoresStores",
newName: "EShopStoresStores");
migrationBuilder.RenameTable(
name: "EasyAbpEShopProductsProductTypes",
newName: "EShopProductsProductTypes");
migrationBuilder.RenameTable(
name: "EasyAbpEShopProductsProductStores",
newName: "EShopProductsProductStores");
migrationBuilder.RenameTable(
name: "EasyAbpEShopProductsProductSkus",
newName: "EShopProductsProductSkus");
migrationBuilder.RenameTable(
name: "EasyAbpEShopProductsProducts",
newName: "EShopProductsProducts");
migrationBuilder.RenameTable(
name: "EasyAbpEShopProductsProductInventories",
newName: "EShopProductsProductInventories");
migrationBuilder.RenameTable(
name: "EasyAbpEShopProductsProductHistories",
newName: "EShopProductsProductHistories");
migrationBuilder.RenameTable(
name: "EasyAbpEShopProductsProductDetails",
newName: "EShopProductsProductDetails");
migrationBuilder.RenameTable(
name: "EasyAbpEShopProductsProductDetailHistories",
newName: "EShopProductsProductDetailHistories");
migrationBuilder.RenameTable(
name: "EasyAbpEShopProductsProductCategories",
newName: "EShopProductsProductCategories");
migrationBuilder.RenameTable(
name: "EasyAbpEShopProductsProductAttributes",
newName: "EShopProductsProductAttributes");
migrationBuilder.RenameTable(
name: "EasyAbpEShopProductsProductAttributeOptions",
newName: "EShopProductsProductAttributeOptions");
migrationBuilder.RenameTable(
name: "EasyAbpEShopProductsCategories",
newName: "EShopProductsCategories");
migrationBuilder.RenameTable(
name: "EasyAbpEShopPluginsBasketsProductUpdates",
newName: "EShopPluginsBasketsProductUpdates");
migrationBuilder.RenameTable(
name: "EasyAbpEShopPluginsBasketsBasketItems",
newName: "EShopPluginsBasketsBasketItems");
migrationBuilder.RenameTable(
name: "EasyAbpEShopPaymentsRefunds",
newName: "EShopPaymentsRefunds");
migrationBuilder.RenameTable(
name: "EasyAbpEShopPaymentsPayments",
newName: "EShopPaymentsPayments");
migrationBuilder.RenameTable(
name: "EasyAbpEShopPaymentsPaymentItems",
newName: "EShopPaymentsPaymentItems");
migrationBuilder.RenameTable(
name: "EasyAbpEShopOrdersOrders",
newName: "EShopOrdersOrders");
migrationBuilder.RenameTable(
name: "EasyAbpEShopOrdersOrderLines",
newName: "EShopOrdersOrderLines");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpEShopProductsProductSkus_ProductId",
table: "EShopProductsProductSkus",
newName: "IX_EShopProductsProductSkus_ProductId");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpEShopProductsProducts_UniqueName",
table: "EShopProductsProducts",
newName: "IX_EShopProductsProducts_UniqueName");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpEShopProductsProductInventories_ProductSkuId",
table: "EShopProductsProductInventories",
newName: "IX_EShopProductsProductInventories_ProductSkuId");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpEShopProductsProductHistories_ProductId",
table: "EShopProductsProductHistories",
newName: "IX_EShopProductsProductHistories_ProductId");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpEShopProductsProductHistories_ModificationTime",
table: "EShopProductsProductHistories",
newName: "IX_EShopProductsProductHistories_ModificationTime");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpEShopProductsProductDetailHistories_ProductDetailId",
table: "EShopProductsProductDetailHistories",
newName: "IX_EShopProductsProductDetailHistories_ProductDetailId");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpEShopProductsProductDetailHistories_ModificationTime",
table: "EShopProductsProductDetailHistories",
newName: "IX_EShopProductsProductDetailHistories_ModificationTime");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpEShopProductsProductAttributes_ProductId",
table: "EShopProductsProductAttributes",
newName: "IX_EShopProductsProductAttributes_ProductId");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpEShopProductsProductAttributeOptions_ProductAttributeId",
table: "EShopProductsProductAttributeOptions",
newName: "IX_EShopProductsProductAttributeOptions_ProductAttributeId");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpEShopProductsCategories_UniqueName",
table: "EShopProductsCategories",
newName: "IX_EShopProductsCategories_UniqueName");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpEShopProductsCategories_ParentId",
table: "EShopProductsCategories",
newName: "IX_EShopProductsCategories_ParentId");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpEShopPluginsBasketsProductUpdates_ProductSkuId",
table: "EShopPluginsBasketsProductUpdates",
newName: "IX_EShopPluginsBasketsProductUpdates_ProductSkuId");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpEShopPluginsBasketsBasketItems_UserId",
table: "EShopPluginsBasketsBasketItems",
newName: "IX_EShopPluginsBasketsBasketItems_UserId");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpEShopPaymentsPaymentItems_PaymentId",
table: "EShopPaymentsPaymentItems",
newName: "IX_EShopPaymentsPaymentItems_PaymentId");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpEShopOrdersOrders_OrderNumber",
table: "EShopOrdersOrders",
newName: "IX_EShopOrdersOrders_OrderNumber");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpEShopOrdersOrderLines_OrderId",
table: "EShopOrdersOrderLines",
newName: "IX_EShopOrdersOrderLines_OrderId");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopStoresStores",
table: "EShopStoresStores",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopProductsProductTypes",
table: "EShopProductsProductTypes",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopProductsProductStores",
table: "EShopProductsProductStores",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopProductsProductSkus",
table: "EShopProductsProductSkus",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopProductsProducts",
table: "EShopProductsProducts",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopProductsProductInventories",
table: "EShopProductsProductInventories",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopProductsProductHistories",
table: "EShopProductsProductHistories",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopProductsProductDetails",
table: "EShopProductsProductDetails",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopProductsProductDetailHistories",
table: "EShopProductsProductDetailHistories",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopProductsProductCategories",
table: "EShopProductsProductCategories",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopProductsProductAttributes",
table: "EShopProductsProductAttributes",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopProductsProductAttributeOptions",
table: "EShopProductsProductAttributeOptions",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopProductsCategories",
table: "EShopProductsCategories",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopPluginsBasketsProductUpdates",
table: "EShopPluginsBasketsProductUpdates",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopPluginsBasketsBasketItems",
table: "EShopPluginsBasketsBasketItems",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopPaymentsRefunds",
table: "EShopPaymentsRefunds",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopPaymentsPayments",
table: "EShopPaymentsPayments",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopPaymentsPaymentItems",
table: "EShopPaymentsPaymentItems",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopOrdersOrders",
table: "EShopOrdersOrders",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopOrdersOrderLines",
table: "EShopOrdersOrderLines",
column: "Id");
migrationBuilder.AddForeignKey(
name: "FK_EShopOrdersOrderLines_EShopOrdersOrders_OrderId",
table: "EShopOrdersOrderLines",
column: "OrderId",
principalTable: "EShopOrdersOrders",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_EShopPaymentsPaymentItems_EShopPaymentsPayments_PaymentId",
table: "EShopPaymentsPaymentItems",
column: "PaymentId",
principalTable: "EShopPaymentsPayments",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_EShopProductsCategories_EShopProductsCategories_ParentId",
table: "EShopProductsCategories",
column: "ParentId",
principalTable: "EShopProductsCategories",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_EShopProductsProductAttributeOptions_EShopProductsProductAttributes_ProductAttributeId",
table: "EShopProductsProductAttributeOptions",
column: "ProductAttributeId",
principalTable: "EShopProductsProductAttributes",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_EShopProductsProductAttributes_EShopProductsProducts_ProductId",
table: "EShopProductsProductAttributes",
column: "ProductId",
principalTable: "EShopProductsProducts",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_EShopProductsProductSkus_EShopProductsProducts_ProductId",
table: "EShopProductsProductSkus",
column: "ProductId",
principalTable: "EShopProductsProducts",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
}
}
}

3930
samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200825130202_UpgradedPaymentServiceTo1_1_0.Designer.cs

File diff suppressed because it is too large

110
samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200825130202_UpgradedPaymentServiceTo1_1_0.cs

@ -0,0 +1,110 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace EShopSample.Migrations
{
public partial class UpgradedPaymentServiceTo1_1_0 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "PaymentItemId",
table: "EasyAbpPaymentServiceRefunds");
migrationBuilder.DropColumn(
name: "PaymentItemId",
table: "EasyAbpEShopPaymentsRefunds");
migrationBuilder.DropColumn(
name: "StoreId",
table: "EasyAbpEShopPaymentsRefunds");
migrationBuilder.AddColumn<string>(
name: "DisplayReason",
table: "EasyAbpPaymentServiceRefunds",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "DisplayReason",
table: "EasyAbpEShopPaymentsRefunds",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "CancellationReason",
table: "EasyAbpEShopOrdersOrders",
nullable: true);
migrationBuilder.CreateTable(
name: "EasyAbpPaymentServiceRefundItems",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
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),
PaymentItemId = table.Column<Guid>(nullable: false),
RefundAmount = table.Column<decimal>(type: "decimal(20,8)", nullable: false),
CustomerRemark = table.Column<string>(nullable: true),
StaffRemark = table.Column<string>(nullable: true),
RefundId = table.Column<Guid>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_EasyAbpPaymentServiceRefundItems", x => x.Id);
table.ForeignKey(
name: "FK_EasyAbpPaymentServiceRefundItems_EasyAbpPaymentServiceRefunds_RefundId",
column: x => x.RefundId,
principalTable: "EasyAbpPaymentServiceRefunds",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateIndex(
name: "IX_EasyAbpPaymentServiceRefundItems_RefundId",
table: "EasyAbpPaymentServiceRefundItems",
column: "RefundId");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "EasyAbpPaymentServiceRefundItems");
migrationBuilder.DropColumn(
name: "DisplayReason",
table: "EasyAbpPaymentServiceRefunds");
migrationBuilder.DropColumn(
name: "DisplayReason",
table: "EasyAbpEShopPaymentsRefunds");
migrationBuilder.DropColumn(
name: "CancellationReason",
table: "EasyAbpEShopOrdersOrders");
migrationBuilder.AddColumn<Guid>(
name: "PaymentItemId",
table: "EasyAbpPaymentServiceRefunds",
type: "uniqueidentifier",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.AddColumn<Guid>(
name: "PaymentItemId",
table: "EasyAbpEShopPaymentsRefunds",
type: "uniqueidentifier",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.AddColumn<Guid>(
name: "StoreId",
table: "EasyAbpEShopPaymentsRefunds",
type: "uniqueidentifier",
nullable: true);
}
}
}

170
samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/EShopSampleMigrationsDbContextModelSnapshot.cs

@ -30,6 +30,9 @@ namespace EShopSample.Migrations
b.Property<DateTime?>("CanceledTime")
.HasColumnType("datetime2");
b.Property<string>("CancellationReason")
.HasColumnType("nvarchar(max)");
b.Property<DateTime?>("CompletionTime")
.HasColumnType("datetime2");
@ -128,7 +131,7 @@ namespace EShopSample.Migrations
.IsUnique()
.HasFilter("[OrderNumber] IS NOT NULL");
b.ToTable("EShopOrdersOrders");
b.ToTable("EasyAbpEShopOrdersOrders");
});
modelBuilder.Entity("EasyAbp.EShop.Orders.Orders.OrderLine", b =>
@ -219,7 +222,7 @@ namespace EShopSample.Migrations
b.HasIndex("OrderId");
b.ToTable("EShopOrdersOrderLines");
b.ToTable("EasyAbpEShopOrdersOrderLines");
});
modelBuilder.Entity("EasyAbp.EShop.Payments.Payments.Payment", b =>
@ -310,7 +313,7 @@ namespace EShopSample.Migrations
b.HasKey("Id");
b.ToTable("EShopPaymentsPayments");
b.ToTable("EasyAbpEShopPaymentsPayments");
});
modelBuilder.Entity("EasyAbp.EShop.Payments.Payments.PaymentItem", b =>
@ -341,14 +344,18 @@ namespace EShopSample.Migrations
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<Guid>("ItemKey")
.HasColumnType("uniqueidentifier");
b.Property<string>("ItemKey")
.HasColumnType("nvarchar(max)");
b.Property<string>("ItemType")
.HasColumnType("nvarchar(max)");
@ -383,7 +390,7 @@ namespace EShopSample.Migrations
b.HasIndex("PaymentId");
b.ToTable("EShopPaymentsPaymentItems");
b.ToTable("EasyAbpEShopPaymentsPaymentItems");
});
modelBuilder.Entity("EasyAbp.EShop.Payments.Refunds.Refund", b =>
@ -426,6 +433,9 @@ namespace EShopSample.Migrations
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("DisplayReason")
.HasColumnType("nvarchar(max)");
b.Property<string>("ExternalTradingCode")
.HasColumnType("nvarchar(max)");
@ -450,9 +460,6 @@ namespace EShopSample.Migrations
b.Property<Guid>("PaymentId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("PaymentItemId")
.HasColumnType("uniqueidentifier");
b.Property<decimal>("RefundAmount")
.HasColumnType("decimal(20,8)");
@ -462,15 +469,12 @@ namespace EShopSample.Migrations
b.Property<string>("StaffRemark")
.HasColumnType("nvarchar(max)");
b.Property<Guid?>("StoreId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("EShopPaymentsRefunds");
b.ToTable("EasyAbpEShopPaymentsRefunds");
});
modelBuilder.Entity("EasyAbp.EShop.Plugins.Baskets.BasketItems.BasketItem", b =>
@ -564,7 +568,7 @@ namespace EShopSample.Migrations
b.HasIndex("UserId");
b.ToTable("EShopPluginsBasketsBasketItems");
b.ToTable("EasyAbpEShopPluginsBasketsBasketItems");
});
modelBuilder.Entity("EasyAbp.EShop.Plugins.Baskets.ProductUpdates.ProductUpdate", b =>
@ -620,7 +624,7 @@ namespace EShopSample.Migrations
b.HasIndex("ProductSkuId");
b.ToTable("EShopPluginsBasketsProductUpdates");
b.ToTable("EasyAbpEShopPluginsBasketsProductUpdates");
});
modelBuilder.Entity("EasyAbp.EShop.Products.Categories.Category", b =>
@ -705,7 +709,7 @@ namespace EShopSample.Migrations
.IsUnique()
.HasFilter("[UniqueName] IS NOT NULL");
b.ToTable("EShopProductsCategories");
b.ToTable("EasyAbpEShopProductsCategories");
});
modelBuilder.Entity("EasyAbp.EShop.Products.ProductCategories.ProductCategory", b =>
@ -755,7 +759,7 @@ namespace EShopSample.Migrations
b.HasKey("Id");
b.ToTable("EShopProductsProductCategories");
b.ToTable("EasyAbpEShopProductsProductCategories");
});
modelBuilder.Entity("EasyAbp.EShop.Products.ProductDetailHistories.ProductDetailHistory", b =>
@ -789,7 +793,7 @@ namespace EShopSample.Migrations
b.HasIndex("ProductDetailId");
b.ToTable("EShopProductsProductDetailHistories");
b.ToTable("EasyAbpEShopProductsProductDetailHistories");
});
modelBuilder.Entity("EasyAbp.EShop.Products.ProductDetails.ProductDetail", b =>
@ -843,7 +847,7 @@ namespace EShopSample.Migrations
b.HasKey("Id");
b.ToTable("EShopProductsProductDetails");
b.ToTable("EasyAbpEShopProductsProductDetails");
});
modelBuilder.Entity("EasyAbp.EShop.Products.ProductHistories.ProductHistory", b =>
@ -877,7 +881,7 @@ namespace EShopSample.Migrations
b.HasIndex("ProductId");
b.ToTable("EShopProductsProductHistories");
b.ToTable("EasyAbpEShopProductsProductHistories");
});
modelBuilder.Entity("EasyAbp.EShop.Products.ProductInventories.ProductInventory", b =>
@ -942,7 +946,7 @@ namespace EShopSample.Migrations
b.HasIndex("ProductSkuId");
b.ToTable("EShopProductsProductInventories");
b.ToTable("EasyAbpEShopProductsProductInventories");
});
modelBuilder.Entity("EasyAbp.EShop.Products.ProductStores.ProductStore", b =>
@ -1006,7 +1010,7 @@ namespace EShopSample.Migrations
b.HasKey("Id");
b.ToTable("EShopProductsProductStores");
b.ToTable("EasyAbpEShopProductsProductStores");
});
modelBuilder.Entity("EasyAbp.EShop.Products.ProductTypes.ProductType", b =>
@ -1069,7 +1073,7 @@ namespace EShopSample.Migrations
b.HasKey("Id");
b.ToTable("EShopProductsProductTypes");
b.ToTable("EasyAbpEShopProductsProductTypes");
});
modelBuilder.Entity("EasyAbp.EShop.Products.Products.Product", b =>
@ -1157,7 +1161,7 @@ namespace EShopSample.Migrations
.IsUnique()
.HasFilter("[UniqueName] IS NOT NULL");
b.ToTable("EShopProductsProducts");
b.ToTable("EasyAbpEShopProductsProducts");
});
modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductAttribute", b =>
@ -1212,7 +1216,7 @@ namespace EShopSample.Migrations
b.HasIndex("ProductId");
b.ToTable("EShopProductsProductAttributes");
b.ToTable("EasyAbpEShopProductsProductAttributes");
});
modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductAttributeOption", b =>
@ -1267,7 +1271,7 @@ namespace EShopSample.Migrations
b.HasIndex("ProductAttributeId");
b.ToTable("EShopProductsProductAttributeOptions");
b.ToTable("EasyAbpEShopProductsProductAttributeOptions");
});
modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductSku", b =>
@ -1343,7 +1347,7 @@ namespace EShopSample.Migrations
b.HasIndex("ProductId");
b.ToTable("EShopProductsProductSkus");
b.ToTable("EasyAbpEShopProductsProductSkus");
});
modelBuilder.Entity("EasyAbp.EShop.Stores.Stores.Store", b =>
@ -1401,7 +1405,7 @@ namespace EShopSample.Migrations
b.HasKey("Id");
b.ToTable("EShopStoresStores");
b.ToTable("EasyAbpEShopStoresStores");
});
modelBuilder.Entity("EasyAbp.PaymentService.Payments.Payment", b =>
@ -1411,7 +1415,7 @@ namespace EShopSample.Migrations
.HasColumnType("uniqueidentifier");
b.Property<decimal>("ActualPaymentAmount")
.HasColumnType("decimal(18,6)");
.HasColumnType("decimal(20,8)");
b.Property<DateTime?>("CanceledTime")
.HasColumnType("datetime2");
@ -1466,22 +1470,22 @@ namespace EShopSample.Migrations
.HasColumnType("uniqueidentifier");
b.Property<decimal>("OriginalPaymentAmount")
.HasColumnType("decimal(18,6)");
.HasColumnType("decimal(20,8)");
b.Property<string>("PayeeAccount")
.HasColumnType("nvarchar(max)");
b.Property<decimal>("PaymentDiscount")
.HasColumnType("decimal(18,6)");
.HasColumnType("decimal(20,8)");
b.Property<string>("PaymentMethod")
.HasColumnType("nvarchar(max)");
b.Property<decimal>("PendingRefundAmount")
.HasColumnType("decimal(18,6)");
.HasColumnType("decimal(20,8)");
b.Property<decimal>("RefundAmount")
.HasColumnType("decimal(18,6)");
.HasColumnType("decimal(20,8)");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
@ -1492,7 +1496,7 @@ namespace EShopSample.Migrations
b.HasKey("Id");
b.ToTable("PaymentServicePayments");
b.ToTable("EasyAbpPaymentServicePayments");
});
modelBuilder.Entity("EasyAbp.PaymentService.Payments.PaymentItem", b =>
@ -1502,7 +1506,7 @@ namespace EShopSample.Migrations
.HasColumnType("uniqueidentifier");
b.Property<decimal>("ActualPaymentAmount")
.HasColumnType("decimal(18,6)");
.HasColumnType("decimal(20,8)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
@ -1512,9 +1516,6 @@ namespace EShopSample.Migrations
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Currency")
.HasColumnType("nvarchar(max)");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
@ -1533,8 +1534,8 @@ namespace EShopSample.Migrations
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<Guid>("ItemKey")
.HasColumnType("uniqueidentifier");
b.Property<string>("ItemKey")
.HasColumnType("nvarchar(max)");
b.Property<string>("ItemType")
.HasColumnType("nvarchar(max)");
@ -1548,25 +1549,25 @@ namespace EShopSample.Migrations
.HasColumnType("uniqueidentifier");
b.Property<decimal>("OriginalPaymentAmount")
.HasColumnType("decimal(18,6)");
.HasColumnType("decimal(20,8)");
b.Property<decimal>("PaymentDiscount")
.HasColumnType("decimal(18,6)");
.HasColumnType("decimal(20,8)");
b.Property<Guid?>("PaymentId")
.HasColumnType("uniqueidentifier");
b.Property<decimal>("PendingRefundAmount")
.HasColumnType("decimal(18,6)");
.HasColumnType("decimal(20,8)");
b.Property<decimal>("RefundAmount")
.HasColumnType("decimal(18,6)");
.HasColumnType("decimal(20,8)");
b.HasKey("Id");
b.HasIndex("PaymentId");
b.ToTable("PaymentServicePaymentItems");
b.ToTable("EasyAbpPaymentServicePaymentItems");
});
modelBuilder.Entity("EasyAbp.PaymentService.Refunds.Refund", b =>
@ -1609,6 +1610,9 @@ namespace EShopSample.Migrations
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("DisplayReason")
.HasColumnType("nvarchar(max)");
b.Property<string>("ExternalTradingCode")
.HasColumnType("nvarchar(max)");
@ -1633,11 +1637,8 @@ namespace EShopSample.Migrations
b.Property<Guid>("PaymentId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("PaymentItemId")
.HasColumnType("uniqueidentifier");
b.Property<decimal>("RefundAmount")
.HasColumnType("decimal(18,6)");
.HasColumnType("decimal(20,8)");
b.Property<string>("RefundPaymentMethod")
.HasColumnType("nvarchar(max)");
@ -1651,7 +1652,65 @@ namespace EShopSample.Migrations
b.HasKey("Id");
b.ToTable("PaymentServiceRefunds");
b.ToTable("EasyAbpPaymentServiceRefunds");
});
modelBuilder.Entity("EasyAbp.PaymentService.Refunds.RefundItem", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<string>("CustomerRemark")
.HasColumnType("nvarchar(max)");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("PaymentItemId")
.HasColumnType("uniqueidentifier");
b.Property<decimal>("RefundAmount")
.HasColumnType("decimal(20,8)");
b.Property<Guid?>("RefundId")
.HasColumnType("uniqueidentifier");
b.Property<string>("StaffRemark")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("RefundId");
b.ToTable("EasyAbpPaymentServiceRefundItems");
});
modelBuilder.Entity("EasyAbp.PaymentService.WeChatPay.PaymentRecords.PaymentRecord", b =>
@ -1767,7 +1826,7 @@ namespace EShopSample.Migrations
b.HasIndex("PaymentId");
b.ToTable("PaymentServiceWeChatPayPaymentRecords");
b.ToTable("EasyAbpPaymentServiceWeChatPayPaymentRecords");
});
modelBuilder.Entity("EasyAbp.PaymentService.WeChatPay.RefundRecords.RefundRecord", b =>
@ -1883,7 +1942,7 @@ namespace EShopSample.Migrations
b.HasIndex("PaymentId");
b.ToTable("PaymentServiceWeChatPayRefundRecords");
b.ToTable("EasyAbpPaymentServiceWeChatPayRefundRecords");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
@ -3607,6 +3666,13 @@ namespace EShopSample.Migrations
.HasForeignKey("PaymentId");
});
modelBuilder.Entity("EasyAbp.PaymentService.Refunds.RefundItem", b =>
{
b.HasOne("EasyAbp.PaymentService.Refunds.Refund", null)
.WithMany("RefundItems")
.HasForeignKey("RefundId");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
{
b.HasOne("Volo.Abp.AuditLogging.AuditLog", null)

4
samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/EShopSample.EntityFrameworkCore.csproj

@ -11,8 +11,8 @@
<ProjectReference Include="..\..\..\..\..\integration\EasyAbp.EShop\src\EasyAbp.EShop.EntityFrameworkCore\EasyAbp.EShop.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\..\plugins\Baskets\src\EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore\EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\EShopSample.Domain\EShopSample.Domain.csproj" />
<PackageReference Include="EasyAbp.PaymentService.EntityFrameworkCore" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.WeChatPay.EntityFrameworkCore" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.EntityFrameworkCore" Version="1.1.0" />
<PackageReference Include="EasyAbp.PaymentService.WeChatPay.EntityFrameworkCore" Version="1.1.0" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.SqlServer" Version="3.0.5" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="3.0.5" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="3.0.5" />

4
samples/EShopSample/aspnet-core/src/EShopSample.HttpApi.Client/EShopSample.HttpApi.Client.csproj

@ -14,8 +14,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="EasyAbp.PaymentService.HttpApi.Client" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.WeChatPay.HttpApi.Client" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.HttpApi.Client" Version="1.1.0" />
<PackageReference Include="EasyAbp.PaymentService.WeChatPay.HttpApi.Client" Version="1.1.0" />
<PackageReference Include="Volo.Abp.Account.HttpApi.Client" Version="3.0.5" />
<PackageReference Include="Volo.Abp.Identity.HttpApi.Client" Version="3.0.5" />
<PackageReference Include="Volo.Abp.PermissionManagement.HttpApi.Client" Version="3.0.5" />

4
samples/EShopSample/aspnet-core/src/EShopSample.HttpApi/EShopSample.HttpApi.csproj

@ -14,8 +14,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="EasyAbp.PaymentService.HttpApi" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.WeChatPay.HttpApi" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.HttpApi" Version="1.1.0" />
<PackageReference Include="EasyAbp.PaymentService.WeChatPay.HttpApi" Version="1.1.0" />
<PackageReference Include="Volo.Abp.Account.HttpApi" Version="3.0.5" />
<PackageReference Include="Volo.Abp.Identity.HttpApi" Version="3.0.5" />
<PackageReference Include="Volo.Abp.PermissionManagement.HttpApi" Version="3.0.5" />

4
samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj

@ -46,8 +46,8 @@
<ProjectReference Include="..\EShopSample.Application\EShopSample.Application.csproj" />
<ProjectReference Include="..\EShopSample.HttpApi\EShopSample.HttpApi.csproj" />
<ProjectReference Include="..\EShopSample.EntityFrameworkCore.DbMigrations\EShopSample.EntityFrameworkCore.DbMigrations.csproj" />
<PackageReference Include="EasyAbp.PaymentService.Web" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.WeChatPay.Web" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.Web" Version="1.1.0" />
<PackageReference Include="EasyAbp.PaymentService.WeChatPay.Web" Version="1.1.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic" Version="3.0.5" />
<PackageReference Include="Volo.Abp.Autofac" Version="3.0.5" />
<PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" Version="3.0.5" />

Loading…
Cancel
Save