mirror of https://github.com/EasyAbp/EShop.git
48 changed files with 13405 additions and 141 deletions
@ -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 |
|||
@ -1,14 +0,0 @@ |
|||
# EShop |
|||
|
|||
[](https://www.nuget.org/packages/EasyAbp.EShop.Domain.Shared) |
|||
[](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. |
|||
@ -0,0 +1 @@ |
|||
/docs/README.md |
|||
@ -0,0 +1,57 @@ |
|||
# EShop |
|||
|
|||
[](https://www.nuget.org/packages/EasyAbp.EShop.Domain.Shared) |
|||
[](https://www.nuget.org/packages/EasyAbp.EShop.Domain.Shared) |
|||
[](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. |
|||
@ -0,0 +1,10 @@ |
|||
using System; |
|||
|
|||
namespace EasyAbp.EShop.Orders.Orders.Dtos |
|||
{ |
|||
[Serializable] |
|||
public class CancelOrderInput |
|||
{ |
|||
public string CancellationReason { get; set; } |
|||
} |
|||
} |
|||
@ -1,9 +0,0 @@ |
|||
using System; |
|||
|
|||
namespace EasyAbp.EShop.Orders.Orders.Dtos |
|||
{ |
|||
public class CompleteOrderInput |
|||
{ |
|||
public Guid OrderId { get; set; } |
|||
} |
|||
} |
|||
@ -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.") |
|||
{ |
|||
|
|||
} |
|||
} |
|||
} |
|||
@ -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; |
|||
} |
|||
} |
|||
} |
|||
File diff suppressed because it is too large
@ -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); |
|||
} |
|||
} |
|||
} |
|||
File diff suppressed because it is too large
@ -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); |
|||
} |
|||
} |
|||
} |
|||
File diff suppressed because it is too large
@ -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); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue