Browse Source

Added Code property to ProductSku

Moved Sku create/update/delete methods to ProductManager
Rebuilt migrations
pull/49/head
gdlcf88 6 years ago
parent
commit
ca835214ad
  1. 2
      modules/EasyAbp.EShop.Baskets/common.props
  2. 2
      modules/EasyAbp.EShop.Orders/common.props
  3. 2
      modules/EasyAbp.EShop.Payments/common.props
  4. 2
      modules/EasyAbp.EShop.Products/common.props
  5. 4
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/CreateUpdateProductSkuDto.cs
  6. 2
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductSkuDto.cs
  7. 36
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Products/ProductAppService.cs
  8. 1
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/cs.json
  9. 1
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/en.json
  10. 1
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/pl.json
  11. 1
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/pt-BR.json
  12. 1
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/sl.json
  13. 1
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/tr.json
  14. 1
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/vi.json
  15. 1
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/zh-Hans.json
  16. 1
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/zh-Hant.json
  17. 6
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/IProductManager.cs
  18. 5
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/Product.cs
  19. 64
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductManager.cs
  20. 15
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductSku.cs
  21. 13
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductSkuCodeDuplicatedException.cs
  22. 0
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductSkuDuplicatedException.cs
  23. 1
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/ProductSku/Index.cshtml
  24. 3
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/ProductSku/ViewModels/CreateEditProductSkuViewModel.cs
  25. 1
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/ProductSku/index.js
  26. 2
      modules/EasyAbp.EShop.Stores/common.props
  27. 1761
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200106080719_Initial.Designer.cs
  28. 2028
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200420031611_AddedProductService.Designer.cs
  29. 124
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200420031611_AddedProductService.cs
  30. 2239
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200420110940_AddedProductEntities.Designer.cs
  31. 144
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200420110940_AddedProductEntities.cs
  32. 2248
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200421093934_AddedDisplayOrder.Designer.cs
  33. 43
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200421093934_AddedDisplayOrder.cs
  34. 2248
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200421101524_SetPricePrecision.Designer.cs
  35. 45
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200421101524_SetPricePrecision.cs
  36. 2307
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200427153957_AddedProductStore.Designer.cs
  37. 85
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200427153957_AddedProductStore.cs
  38. 2304
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200427175718_RemovedStoreIdFromProductCategory.Designer.cs
  39. 25
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200427175718_RemovedStoreIdFromProductCategory.cs
  40. 2361
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200427184312_AddedStore.Designer.cs
  41. 39
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200427184312_AddedStore.cs
  42. 2398
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200428164406_ProductEntitiesAdjustment.Designer.cs
  43. 167
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200428164406_ProductEntitiesAdjustment.cs
  44. 2407
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200429100034_AddedIsHiddenAndIsStatic.Designer.cs
  45. 43
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200429100034_AddedIsHiddenAndIsStatic.cs
  46. 2407
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200429104048_MakeOriginalPriceNullable.Designer.cs
  47. 30
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200429104048_MakeOriginalPriceNullable.cs
  48. 2465
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200502071826_AddedHistoryEntities.Designer.cs
  49. 52
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200502071826_AddedHistoryEntities.cs
  50. 2473
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200502095135_AddedHistoryEntityIndexes.Designer.cs
  51. 49
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200502095135_AddedHistoryEntityIndexes.cs
  52. 2661
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200505145542_AddedOrder.Designer.cs
  53. 98
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200505145542_AddedOrder.cs
  54. 2661
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200506014116_AddedColumnTypes.Designer.cs
  55. 125
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200506014116_AddedColumnTypes.cs
  56. 2891
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200507072922_AddedPayment.Designer.cs
  57. 118
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200507072922_AddedPayment.cs
  58. 2894
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200507073613_AddedPaymentIdToOrder.Designer.cs
  59. 23
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200507073613_AddedPaymentIdToOrder.cs
  60. 2894
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200507080841_AddedPaymentColumnTypes.Designer.cs
  61. 157
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200507080841_AddedPaymentColumnTypes.cs
  62. 2897
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200507103409_AddedPayeeAccount.Designer.cs
  63. 22
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200507103409_AddedPayeeAccount.cs
  64. 2900
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200508090003_AddedUserIdToPayment.Designer.cs
  65. 24
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200508090003_AddedUserIdToPayment.cs
  66. 2900
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200517161833_UsedPaymentServiceModule.Designer.cs
  67. 226
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200517161833_UsedPaymentServiceModule.cs
  68. 2900
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200519091521_RenamedTables.Designer.cs
  69. 553
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200519091521_RenamedTables.cs
  70. 111
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200519094910_UpgradedPaymentServiceModuleTo014.cs
  71. 2903
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200525082759_AddedCodePropertyToProduct.Designer.cs
  72. 22
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200525082759_AddedCodePropertyToProduct.cs
  73. 10
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200526074907_AddedCodeToProductSku.Designer.cs
  74. 643
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200526074907_AddedCodeToProductSku.cs
  75. 3
      samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/EasyMallMigrationsDbContextModelSnapshot.cs

2
modules/EasyAbp.EShop.Baskets/common.props

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

2
modules/EasyAbp.EShop.Orders/common.props

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

2
modules/EasyAbp.EShop.Payments/common.props

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

2
modules/EasyAbp.EShop.Products/common.props

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

4
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/CreateUpdateProductSkuDto.cs

@ -6,6 +6,10 @@ namespace EasyAbp.EShop.Products.Products.Dtos
{
public class UpdateProductSkuDto
{
[DisplayName("ProductSkuCode")]
public string Code { get; set; }
[Required]
[DisplayName("ProductSkuCurrency")]
public string Currency { get; set; }

2
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductSkuDto.cs

@ -7,6 +7,8 @@ namespace EasyAbp.EShop.Products.Products.Dtos
{
public string SerializedAttributeOptionIds { get; set; }
public string Code { get; set; }
public string Currency { get; set; }
public decimal? OriginalPrice { get; set; }

36
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Products/ProductAppService.cs

@ -304,34 +304,16 @@ namespace EasyAbp.EShop.Products.Products
var product = await GetEntityByIdAsync(productId);
CheckProductIsNotStatic(product);
input.SerializedAttributeOptionIds =
await _attributeOptionIdsSerializer.FormatAsync(input.SerializedAttributeOptionIds);
await CheckSkuAttributeOptionsAsync(product, input.SerializedAttributeOptionIds);
var sku = ObjectMapper.Map<CreateProductSkuDto, ProductSku>(input);
EntityHelper.TrySetId(sku, GuidGenerator.Create);
product.ProductSkus.Add(sku);
var sku = ObjectMapper.Map<CreateProductSkuDto, ProductSku>(input);
await _repository.UpdateAsync(product, true);
EntityHelper.TrySetId(sku, GuidGenerator.Create);
await _productManager.CreateSkuAsync(product, sku);
return ObjectMapper.Map<Product, ProductDto>(product);
}
protected virtual Task CheckSkuAttributeOptionsAsync(Product product, string inputSerializedAttributeOptionIds)
{
if (product.ProductSkus.FirstOrDefault(sku =>
sku.SerializedAttributeOptionIds.Equals(inputSerializedAttributeOptionIds)) != null)
{
throw new ProductSkuDuplicatedException(product.Id, inputSerializedAttributeOptionIds);
}
return Task.CompletedTask;
}
public async Task<ProductDto> UpdateSkuAsync(Guid productId, Guid productSkuId, Guid storeId, UpdateProductSkuDto input)
{
await CheckUpdatePolicyAsync();
@ -346,8 +328,8 @@ namespace EasyAbp.EShop.Products.Products
ObjectMapper.Map(input, sku);
await _repository.UpdateAsync(product, true);
await _productManager.UpdateSkuAsync(product, sku);
return ObjectMapper.Map<Product, ProductDto>(product);
}
@ -363,9 +345,7 @@ namespace EasyAbp.EShop.Products.Products
var sku = product.ProductSkus.Single(x => x.Id == productSkuId);
product.ProductSkus.Remove(sku);
await _repository.UpdateAsync(product, true);
await _productManager.DeleteSkuAsync(product, sku);
return ObjectMapper.Map<Product, ProductDto>(product);
}

1
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/cs.json

@ -21,6 +21,7 @@
"ProductAttributeOptionNamesPlaceholder": "ProductAttributeOptionNamesPlaceholder",
"ProductSku": "ProductSku",
"ProductSkuSerializedAttributeOptionIds": "ProductSkuSerializedAttributeOptionIds",
"ProductSkuCode": "ProductSkuCode",
"ProductSkuCurrency": "ProductSkuCurrency",
"ProductSkuOriginalPrice": "ProductSkuOriginalPrice",
"ProductSkuPrice": "ProductSkuPrice",

1
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/en.json

@ -22,6 +22,7 @@
"ProductAttributeOptionNamesPlaceholder": "ProductAttributeOptionNamesPlaceholder",
"ProductSku": "ProductSku",
"ProductSkuSerializedAttributeOptionIds": "ProductSkuSerializedAttributeOptionIds",
"ProductSkuCode": "ProductSkuCode",
"ProductSkuCurrency": "ProductSkuCurrency",
"ProductSkuOriginalPrice": "ProductSkuOriginalPrice",
"ProductSkuPrice": "ProductSkuPrice",

1
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/pl.json

@ -21,6 +21,7 @@
"ProductAttributeOptionNamesPlaceholder": "ProductAttributeOptionNamesPlaceholder",
"ProductSku": "ProductSku",
"ProductSkuSerializedAttributeOptionIds": "ProductSkuSerializedAttributeOptionIds",
"ProductSkuCode": "ProductSkuCode",
"ProductSkuCurrency": "ProductSkuCurrency",
"ProductSkuOriginalPrice": "ProductSkuOriginalPrice",
"ProductSkuPrice": "ProductSkuPrice",

1
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/pt-BR.json

@ -21,6 +21,7 @@
"ProductAttributeOptionNamesPlaceholder": "ProductAttributeOptionNamesPlaceholder",
"ProductSku": "ProductSku",
"ProductSkuSerializedAttributeOptionIds": "ProductSkuSerializedAttributeOptionIds",
"ProductSkuCode": "ProductSkuCode",
"ProductSkuCurrency": "ProductSkuCurrency",
"ProductSkuOriginalPrice": "ProductSkuOriginalPrice",
"ProductSkuPrice": "ProductSkuPrice",

1
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/sl.json

@ -22,6 +22,7 @@
"ProductAttributeOptionNamesPlaceholder": "ProductAttributeOptionNamesPlaceholder",
"ProductSku": "ProductSku",
"ProductSkuSerializedAttributeOptionIds": "ProductSkuSerializedAttributeOptionIds",
"ProductSkuCode": "ProductSkuCode",
"ProductSkuCurrency": "ProductSkuCurrency",
"ProductSkuOriginalPrice": "ProductSkuOriginalPrice",
"ProductSkuPrice": "ProductSkuPrice",

1
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/tr.json

@ -22,6 +22,7 @@
"ProductAttributeOptionNamesPlaceholder": "ProductAttributeOptionNamesPlaceholder",
"ProductSku": "ProductSku",
"ProductSkuSerializedAttributeOptionIds": "ProductSkuSerializedAttributeOptionIds",
"ProductSkuCode": "ProductSkuCode",
"ProductSkuCurrency": "ProductSkuCurrency",
"ProductSkuOriginalPrice": "ProductSkuOriginalPrice",
"ProductSkuPrice": "ProductSkuPrice",

1
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/vi.json

@ -21,6 +21,7 @@
"ProductAttributeOptionNamesPlaceholder": "ProductAttributeOptionNamesPlaceholder",
"ProductSku": "ProductSku",
"ProductSkuSerializedAttributeOptionIds": "ProductSkuSerializedAttributeOptionIds",
"ProductSkuCode": "ProductSkuCode",
"ProductSkuCurrency": "ProductSkuCurrency",
"ProductSkuOriginalPrice": "ProductSkuOriginalPrice",
"ProductSkuPrice": "ProductSkuPrice",

1
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/zh-Hans.json

@ -22,6 +22,7 @@
"ProductAttributeOptionNamesPlaceholder": "ProductAttributeOptionNamesPlaceholder",
"ProductSku": "ProductSku",
"ProductSkuSerializedAttributeOptionIds": "ProductSkuSerializedAttributeOptionIds",
"ProductSkuCode": "ProductSkuCode",
"ProductSkuCurrency": "ProductSkuCurrency",
"ProductSkuOriginalPrice": "ProductSkuOriginalPrice",
"ProductSkuPrice": "ProductSkuPrice",

1
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/zh-Hant.json

@ -22,6 +22,7 @@
"ProductAttributeOptionNamesPlaceholder": "ProductAttributeOptionNamesPlaceholder",
"ProductSku": "ProductSku",
"ProductSkuSerializedAttributeOptionIds": "ProductSkuSerializedAttributeOptionIds",
"ProductSkuCode": "ProductSkuCode",
"ProductSkuCurrency": "ProductSkuCurrency",
"ProductSkuOriginalPrice": "ProductSkuOriginalPrice",
"ProductSkuPrice": "ProductSkuPrice",

6
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/IProductManager.cs

@ -14,6 +14,12 @@ namespace EasyAbp.EShop.Products.Products
Task DeleteAsync(Product product);
Task DeleteAsync(Guid id);
Task<Product> CreateSkuAsync(Product product, ProductSku productSku);
Task<Product> UpdateSkuAsync(Product product, ProductSku productSku);
Task<Product> DeleteSkuAsync(Product product, ProductSku productSku);
Task<bool> IsInventorySufficientAsync(Product product, ProductSku productSku, Guid storeId, int quantity);

5
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/Product.cs

@ -68,5 +68,10 @@ namespace EasyAbp.EShop.Products.Products
ProductAttributes = new List<ProductAttribute>();
ProductSkus = new List<ProductSku>();
}
public void TrimCode()
{
Code = Code?.Trim();
}
}
}

64
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductManager.cs

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using EasyAbp.EShop.Products.ProductCategories;
using EasyAbp.EShop.Products.ProductDetails;
@ -15,22 +16,27 @@ namespace EasyAbp.EShop.Products.Products
private readonly IProductStoreRepository _productStoreRepository;
private readonly IProductCategoryRepository _productCategoryRepository;
private readonly IProductInventoryProvider _productInventoryProvider;
private readonly IAttributeOptionIdsSerializer _attributeOptionIdsSerializer;
public ProductManager(
IProductRepository productRepository,
IProductStoreRepository productStoreRepository,
IProductCategoryRepository productCategoryRepository,
IProductInventoryProvider productInventoryProvider)
IProductInventoryProvider productInventoryProvider,
IAttributeOptionIdsSerializer attributeOptionIdsSerializer)
{
_productRepository = productRepository;
_productStoreRepository = productStoreRepository;
_productCategoryRepository = productCategoryRepository;
_productInventoryProvider = productInventoryProvider;
_attributeOptionIdsSerializer = attributeOptionIdsSerializer;
}
public virtual async Task<Product> CreateAsync(Product product, Guid? storeId = null,
IEnumerable<Guid> categoryIds = null)
{
product.TrimCode();
await CheckProductCodeUniqueAsync(product);
await _productRepository.InsertAsync(product, autoSave: true);
@ -74,6 +80,62 @@ namespace EasyAbp.EShop.Products.Products
await _productRepository.DeleteAsync(id, true);
}
public virtual async Task<Product> CreateSkuAsync(Product product, ProductSku productSku)
{
productSku.SetSerializedAttributeOptionIds(await _attributeOptionIdsSerializer.FormatAsync(productSku.SerializedAttributeOptionIds));
await CheckSkuAttributeOptionsAsync(product, productSku);
await CheckProductSkuCodeUniqueAsync(product, productSku);
productSku.TrimCode();
product.ProductSkus.AddIfNotContains(productSku);
return await _productRepository.UpdateAsync(product, true);
}
protected virtual Task CheckProductSkuCodeUniqueAsync(Product product, ProductSku productSku)
{
if (productSku.Code.IsNullOrEmpty())
{
return Task.CompletedTask;
}
if (product.ProductSkus.Where(sku => sku.Id != productSku.Id)
.FirstOrDefault(sku => sku.Code == productSku.Code) != null)
{
throw new ProductSkuCodeDuplicatedException(product.Id, productSku.Code);
}
return Task.CompletedTask;
}
protected virtual Task CheckSkuAttributeOptionsAsync(Product product, ProductSku productSku)
{
if (product.ProductSkus.Where(sku => sku.Id != productSku.Id).FirstOrDefault(sku =>
sku.SerializedAttributeOptionIds.Equals(productSku.SerializedAttributeOptionIds)) != null)
{
throw new ProductSkuDuplicatedException(product.Id, productSku.SerializedAttributeOptionIds);
}
return Task.CompletedTask;
}
public virtual async Task<Product> UpdateSkuAsync(Product product, ProductSku productSku)
{
await CheckProductSkuCodeUniqueAsync(product, productSku);
return await _productRepository.UpdateAsync(product, true);
}
public virtual async Task<Product> DeleteSkuAsync(Product product, ProductSku productSku)
{
product.ProductSkus.Remove(productSku);
return await _productRepository.UpdateAsync(product, true);
}
protected virtual async Task AddProductToStoreAsync(Guid productId, Guid storeId)
{
await _productStoreRepository.InsertAsync(new ProductStore(GuidGenerator.Create(), CurrentTenant.Id,

15
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductSku.cs

@ -9,6 +9,9 @@ namespace EasyAbp.EShop.Products.Products
[NotNull]
public virtual string SerializedAttributeOptionIds { get; protected set; }
[CanBeNull]
public virtual string Code { get; protected set; }
[NotNull]
public virtual string Currency { get; protected set; }
@ -30,6 +33,7 @@ namespace EasyAbp.EShop.Products.Products
public ProductSku(
Guid id,
[NotNull] string serializedAttributeOptionIds,
[CanBeNull] string code,
[NotNull] string currency,
decimal? originalPrice,
decimal price,
@ -39,6 +43,7 @@ namespace EasyAbp.EShop.Products.Products
Guid? productDetailId) : base(id)
{
SerializedAttributeOptionIds = serializedAttributeOptionIds;
Code = code?.Trim();
Currency = currency;
OriginalPrice = originalPrice;
Price = price;
@ -71,5 +76,15 @@ namespace EasyAbp.EShop.Products.Products
return true;
}
public void TrimCode()
{
Code = Code?.Trim();
}
public void SetSerializedAttributeOptionIds(string serializedAttributeOptionIds)
{
SerializedAttributeOptionIds = serializedAttributeOptionIds;
}
}
}

13
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductSkuCodeDuplicatedException.cs

@ -0,0 +1,13 @@
using System;
using Volo.Abp;
namespace EasyAbp.EShop.Products.Products
{
public class ProductSkuCodeDuplicatedException : BusinessException
{
public ProductSkuCodeDuplicatedException(Guid productId, string code) : base(
message: $"Sku code {code} is duplicate for the product {productId}")
{
}
}
}

0
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Products/ProductSkuDuplicatedException.cs → modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductSkuDuplicatedException.cs

1
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/ProductSku/Index.cshtml

@ -42,6 +42,7 @@
<thead>
<tr>
<th>@L["Actions"]</th>
<th>@L["ProductSkuCode"]</th>
<th>@L["ProductSkuContentDescription"]</th>
<th>@L["ProductSkuPrice"]</th>
<th>@L["ProductSkuInventory"]</th>

3
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/ProductSku/ViewModels/CreateEditProductSkuViewModel.cs

@ -6,6 +6,9 @@ namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.ProductSku.Vi
{
public class CreateEditProductSkuViewModel
{
[Display(Name = "ProductSkuCode")]
public string Code { get; set; }
[Required]
[Display(Name = "ProductSkuCurrency")]
public string Currency { get; set; }

1
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/ProductSku/index.js

@ -49,6 +49,7 @@ $(function () {
]
}
},
{ data: "code" },
{ data: "contentDescription" },
{ data: "price" },
{ data: "inventory" },

2
modules/EasyAbp.EShop.Stores/common.props

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

1761
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200106080719_Initial.Designer.cs

File diff suppressed because it is too large

2028
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200420031611_AddedProductService.Designer.cs

File diff suppressed because it is too large

124
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200420031611_AddedProductService.cs

@ -1,124 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace EasyMall.Migrations
{
public partial class AddedProductService : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "ProductsCategories",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
LastModificationTime = table.Column<DateTime>(nullable: true),
LastModifierId = table.Column<Guid>(nullable: true),
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(nullable: true),
DeletionTime = table.Column<DateTime>(nullable: true),
TenantId = table.Column<Guid>(nullable: true),
ParentCategoryId = table.Column<Guid>(nullable: true),
DisplayName = table.Column<string>(nullable: true),
Description = table.Column<string>(nullable: true),
MediaResources = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_ProductsCategories", x => x.Id);
});
migrationBuilder.CreateTable(
name: "ProductsProductCategories",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
LastModificationTime = table.Column<DateTime>(nullable: true),
LastModifierId = table.Column<Guid>(nullable: true),
TenantId = table.Column<Guid>(nullable: true),
StoreId = table.Column<Guid>(nullable: true),
CategoryId = table.Column<Guid>(nullable: false),
ProductId = table.Column<Guid>(nullable: false),
DisplayOrder = table.Column<int>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ProductsProductCategories", x => x.Id);
});
migrationBuilder.CreateTable(
name: "ProductsProducts",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
LastModificationTime = table.Column<DateTime>(nullable: true),
LastModifierId = table.Column<Guid>(nullable: true),
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(nullable: true),
DeletionTime = table.Column<DateTime>(nullable: true),
TenantId = table.Column<Guid>(nullable: true),
StoreId = table.Column<Guid>(nullable: true),
ProductTypeId = table.Column<Guid>(nullable: false),
DisplayName = table.Column<string>(nullable: true),
InventoryStrategy = table.Column<int>(nullable: false),
IsPublished = table.Column<bool>(nullable: false),
MediaResources = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_ProductsProducts", x => x.Id);
});
migrationBuilder.CreateTable(
name: "ProductsProductTypes",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
LastModificationTime = table.Column<DateTime>(nullable: true),
LastModifierId = table.Column<Guid>(nullable: true),
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(nullable: true),
DeletionTime = table.Column<DateTime>(nullable: true),
Name = table.Column<string>(nullable: true),
DisplayName = table.Column<string>(nullable: true),
Description = table.Column<string>(nullable: true),
MultiTenancySide = table.Column<int>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ProductsProductTypes", x => x.Id);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "ProductsCategories");
migrationBuilder.DropTable(
name: "ProductsProductCategories");
migrationBuilder.DropTable(
name: "ProductsProducts");
migrationBuilder.DropTable(
name: "ProductsProductTypes");
}
}
}

2239
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200420110940_AddedProductEntities.Designer.cs

File diff suppressed because it is too large

144
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200420110940_AddedProductEntities.cs

@ -1,144 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace EasyMall.Migrations
{
public partial class AddedProductEntities : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "ProductsProductAttributes",
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),
DisplayName = table.Column<string>(nullable: true),
Description = table.Column<string>(nullable: true),
ProductId = table.Column<Guid>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_ProductsProductAttributes", x => x.Id);
table.ForeignKey(
name: "FK_ProductsProductAttributes_ProductsProducts_ProductId",
column: x => x.ProductId,
principalTable: "ProductsProducts",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "ProductsProductDetails",
columns: table => new
{
ProductId = table.Column<Guid>(nullable: false),
Description = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_ProductsProductDetails", x => x.ProductId);
table.ForeignKey(
name: "FK_ProductsProductDetails_ProductsProducts_ProductId",
column: x => x.ProductId,
principalTable: "ProductsProducts",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ProductsProductSkus",
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),
SerializedAttributeOptionIds = table.Column<string>(nullable: true),
OriginalPrice = table.Column<decimal>(nullable: false),
Price = table.Column<decimal>(nullable: false),
Inventory = table.Column<int>(nullable: false),
Sold = table.Column<int>(nullable: false),
OrderMinQuantity = table.Column<int>(nullable: false),
ProductId = table.Column<Guid>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_ProductsProductSkus", x => x.Id);
table.ForeignKey(
name: "FK_ProductsProductSkus_ProductsProducts_ProductId",
column: x => x.ProductId,
principalTable: "ProductsProducts",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "ProductsProductAttributeOptions",
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),
DisplayName = table.Column<string>(nullable: true),
Description = table.Column<string>(nullable: true),
ProductAttributeId = table.Column<Guid>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_ProductsProductAttributeOptions", x => x.Id);
table.ForeignKey(
name: "FK_ProductsProductAttributeOptions_ProductsProductAttributes_ProductAttributeId",
column: x => x.ProductAttributeId,
principalTable: "ProductsProductAttributes",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateIndex(
name: "IX_ProductsProductAttributeOptions_ProductAttributeId",
table: "ProductsProductAttributeOptions",
column: "ProductAttributeId");
migrationBuilder.CreateIndex(
name: "IX_ProductsProductAttributes_ProductId",
table: "ProductsProductAttributes",
column: "ProductId");
migrationBuilder.CreateIndex(
name: "IX_ProductsProductSkus_ProductId",
table: "ProductsProductSkus",
column: "ProductId");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "ProductsProductAttributeOptions");
migrationBuilder.DropTable(
name: "ProductsProductDetails");
migrationBuilder.DropTable(
name: "ProductsProductSkus");
migrationBuilder.DropTable(
name: "ProductsProductAttributes");
}
}
}

2248
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200421093934_AddedDisplayOrder.Designer.cs

File diff suppressed because it is too large

43
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200421093934_AddedDisplayOrder.cs

@ -1,43 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace EasyMall.Migrations
{
public partial class AddedDisplayOrder : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "DisplayOrder",
table: "ProductsProducts",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<int>(
name: "DisplayOrder",
table: "ProductsProductAttributes",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<int>(
name: "DisplayOrder",
table: "ProductsProductAttributeOptions",
nullable: false,
defaultValue: 0);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "DisplayOrder",
table: "ProductsProducts");
migrationBuilder.DropColumn(
name: "DisplayOrder",
table: "ProductsProductAttributes");
migrationBuilder.DropColumn(
name: "DisplayOrder",
table: "ProductsProductAttributeOptions");
}
}
}

2248
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200421101524_SetPricePrecision.Designer.cs

File diff suppressed because it is too large

45
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200421101524_SetPricePrecision.cs

@ -1,45 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace EasyMall.Migrations
{
public partial class SetPricePrecision : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<decimal>(
name: "Price",
table: "ProductsProductSkus",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)");
migrationBuilder.AlterColumn<decimal>(
name: "OriginalPrice",
table: "ProductsProductSkus",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<decimal>(
name: "Price",
table: "ProductsProductSkus",
type: "decimal(18,2)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AlterColumn<decimal>(
name: "OriginalPrice",
table: "ProductsProductSkus",
type: "decimal(18,2)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
}
}
}

2307
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200427153957_AddedProductStore.Designer.cs

File diff suppressed because it is too large

85
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200427153957_AddedProductStore.cs

@ -1,85 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace EasyMall.Migrations
{
public partial class AddedProductStore : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "StoreId",
table: "ProductsProducts");
migrationBuilder.DropColumn(
name: "TenantId",
table: "ProductsProducts");
migrationBuilder.AddColumn<string>(
name: "Currency",
table: "ProductsProductSkus",
nullable: true);
migrationBuilder.AlterColumn<Guid>(
name: "StoreId",
table: "ProductsProductCategories",
nullable: false,
oldClrType: typeof(Guid),
oldType: "uniqueidentifier",
oldNullable: true);
migrationBuilder.CreateTable(
name: "ProductsProductStores",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
LastModificationTime = table.Column<DateTime>(nullable: true),
LastModifierId = table.Column<Guid>(nullable: true),
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(nullable: true),
DeletionTime = table.Column<DateTime>(nullable: true),
TenantId = table.Column<Guid>(nullable: true),
StoreId = table.Column<Guid>(nullable: false),
ProductId = table.Column<Guid>(nullable: false),
IsOwner = table.Column<bool>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ProductsProductStores", x => x.Id);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "ProductsProductStores");
migrationBuilder.DropColumn(
name: "Currency",
table: "ProductsProductSkus");
migrationBuilder.AddColumn<Guid>(
name: "StoreId",
table: "ProductsProducts",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.AddColumn<Guid>(
name: "TenantId",
table: "ProductsProducts",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.AlterColumn<Guid>(
name: "StoreId",
table: "ProductsProductCategories",
type: "uniqueidentifier",
nullable: true,
oldClrType: typeof(Guid));
}
}
}

2304
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200427175718_RemovedStoreIdFromProductCategory.Designer.cs

File diff suppressed because it is too large

25
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200427175718_RemovedStoreIdFromProductCategory.cs

@ -1,25 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace EasyMall.Migrations
{
public partial class RemovedStoreIdFromProductCategory : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "StoreId",
table: "ProductsProductCategories");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "StoreId",
table: "ProductsProductCategories",
type: "uniqueidentifier",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
}
}
}

2361
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200427184312_AddedStore.Designer.cs

File diff suppressed because it is too large

39
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200427184312_AddedStore.cs

@ -1,39 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace EasyMall.Migrations
{
public partial class AddedStore : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "StoresStores",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
LastModificationTime = table.Column<DateTime>(nullable: true),
LastModifierId = table.Column<Guid>(nullable: true),
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(nullable: true),
DeletionTime = table.Column<DateTime>(nullable: true),
TenantId = table.Column<Guid>(nullable: true),
Name = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_StoresStores", x => x.Id);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "StoresStores");
}
}
}

2398
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200428164406_ProductEntitiesAdjustment.Designer.cs

File diff suppressed because it is too large

167
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200428164406_ProductEntitiesAdjustment.cs

@ -1,167 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace EasyMall.Migrations
{
public partial class ProductEntitiesAdjustment : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_ProductsProductDetails_ProductsProducts_ProductId",
table: "ProductsProductDetails");
migrationBuilder.DropPrimaryKey(
name: "PK_ProductsProductDetails",
table: "ProductsProductDetails");
migrationBuilder.DropColumn(
name: "ProductId",
table: "ProductsProductDetails");
migrationBuilder.AddColumn<Guid>(
name: "ProductDetailId",
table: "ProductsProductSkus",
nullable: true);
migrationBuilder.AddColumn<Guid>(
name: "ProductDetailId",
table: "ProductsProducts",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.AddColumn<Guid>(
name: "Id",
table: "ProductsProductDetails",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.AddColumn<string>(
name: "ConcurrencyStamp",
table: "ProductsProductDetails",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "CreationTime",
table: "ProductsProductDetails",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<Guid>(
name: "CreatorId",
table: "ProductsProductDetails",
nullable: true);
migrationBuilder.AddColumn<Guid>(
name: "DeleterId",
table: "ProductsProductDetails",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "DeletionTime",
table: "ProductsProductDetails",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "ExtraProperties",
table: "ProductsProductDetails",
nullable: true);
migrationBuilder.AddColumn<bool>(
name: "IsDeleted",
table: "ProductsProductDetails",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<DateTime>(
name: "LastModificationTime",
table: "ProductsProductDetails",
nullable: true);
migrationBuilder.AddColumn<Guid>(
name: "LastModifierId",
table: "ProductsProductDetails",
nullable: true);
migrationBuilder.AddPrimaryKey(
name: "PK_ProductsProductDetails",
table: "ProductsProductDetails",
column: "Id");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropPrimaryKey(
name: "PK_ProductsProductDetails",
table: "ProductsProductDetails");
migrationBuilder.DropColumn(
name: "ProductDetailId",
table: "ProductsProductSkus");
migrationBuilder.DropColumn(
name: "ProductDetailId",
table: "ProductsProducts");
migrationBuilder.DropColumn(
name: "Id",
table: "ProductsProductDetails");
migrationBuilder.DropColumn(
name: "ConcurrencyStamp",
table: "ProductsProductDetails");
migrationBuilder.DropColumn(
name: "CreationTime",
table: "ProductsProductDetails");
migrationBuilder.DropColumn(
name: "CreatorId",
table: "ProductsProductDetails");
migrationBuilder.DropColumn(
name: "DeleterId",
table: "ProductsProductDetails");
migrationBuilder.DropColumn(
name: "DeletionTime",
table: "ProductsProductDetails");
migrationBuilder.DropColumn(
name: "ExtraProperties",
table: "ProductsProductDetails");
migrationBuilder.DropColumn(
name: "IsDeleted",
table: "ProductsProductDetails");
migrationBuilder.DropColumn(
name: "LastModificationTime",
table: "ProductsProductDetails");
migrationBuilder.DropColumn(
name: "LastModifierId",
table: "ProductsProductDetails");
migrationBuilder.AddColumn<Guid>(
name: "ProductId",
table: "ProductsProductDetails",
type: "uniqueidentifier",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.AddPrimaryKey(
name: "PK_ProductsProductDetails",
table: "ProductsProductDetails",
column: "ProductId");
migrationBuilder.AddForeignKey(
name: "FK_ProductsProductDetails_ProductsProducts_ProductId",
table: "ProductsProductDetails",
column: "ProductId",
principalTable: "ProductsProducts",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
}
}

2407
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200429100034_AddedIsHiddenAndIsStatic.Designer.cs

File diff suppressed because it is too large

43
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200429100034_AddedIsHiddenAndIsStatic.cs

@ -1,43 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace EasyMall.Migrations
{
public partial class AddedIsHiddenAndIsStatic : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "IsHidden",
table: "ProductsProducts",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "IsStatic",
table: "ProductsProducts",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "IsHidden",
table: "ProductsCategories",
nullable: false,
defaultValue: false);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "IsHidden",
table: "ProductsProducts");
migrationBuilder.DropColumn(
name: "IsStatic",
table: "ProductsProducts");
migrationBuilder.DropColumn(
name: "IsHidden",
table: "ProductsCategories");
}
}
}

2407
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200429104048_MakeOriginalPriceNullable.Designer.cs

File diff suppressed because it is too large

30
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200429104048_MakeOriginalPriceNullable.cs

@ -1,30 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace EasyMall.Migrations
{
public partial class MakeOriginalPriceNullable : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<decimal>(
name: "OriginalPrice",
table: "ProductsProductSkus",
type: "decimal(18,6)",
nullable: true,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<decimal>(
name: "OriginalPrice",
table: "ProductsProductSkus",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)",
oldNullable: true);
}
}
}

2465
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200502071826_AddedHistoryEntities.Designer.cs

File diff suppressed because it is too large

52
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200502071826_AddedHistoryEntities.cs

@ -1,52 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace EasyMall.Migrations
{
public partial class AddedHistoryEntities : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "ProductsProductDetailHistories",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
ProductDetailId = table.Column<Guid>(nullable: false),
ModificationTime = table.Column<DateTime>(nullable: false),
SerializedDto = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_ProductsProductDetailHistories", x => x.Id);
});
migrationBuilder.CreateTable(
name: "ProductsProductHistories",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
ProductId = table.Column<Guid>(nullable: false),
ModificationTime = table.Column<DateTime>(nullable: false),
SerializedDto = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_ProductsProductHistories", x => x.Id);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "ProductsProductDetailHistories");
migrationBuilder.DropTable(
name: "ProductsProductHistories");
}
}
}

2473
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200502095135_AddedHistoryEntityIndexes.Designer.cs

File diff suppressed because it is too large

49
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200502095135_AddedHistoryEntityIndexes.cs

@ -1,49 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace EasyMall.Migrations
{
public partial class AddedHistoryEntityIndexes : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateIndex(
name: "IX_ProductsProductHistories_ModificationTime",
table: "ProductsProductHistories",
column: "ModificationTime");
migrationBuilder.CreateIndex(
name: "IX_ProductsProductHistories_ProductId",
table: "ProductsProductHistories",
column: "ProductId");
migrationBuilder.CreateIndex(
name: "IX_ProductsProductDetailHistories_ModificationTime",
table: "ProductsProductDetailHistories",
column: "ModificationTime");
migrationBuilder.CreateIndex(
name: "IX_ProductsProductDetailHistories_ProductDetailId",
table: "ProductsProductDetailHistories",
column: "ProductDetailId");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_ProductsProductHistories_ModificationTime",
table: "ProductsProductHistories");
migrationBuilder.DropIndex(
name: "IX_ProductsProductHistories_ProductId",
table: "ProductsProductHistories");
migrationBuilder.DropIndex(
name: "IX_ProductsProductDetailHistories_ModificationTime",
table: "ProductsProductDetailHistories");
migrationBuilder.DropIndex(
name: "IX_ProductsProductDetailHistories_ProductDetailId",
table: "ProductsProductDetailHistories");
}
}
}

2661
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200505145542_AddedOrder.Designer.cs

File diff suppressed because it is too large

98
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200505145542_AddedOrder.cs

@ -1,98 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace EasyMall.Migrations
{
public partial class AddedOrder : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "OrdersOrders",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
LastModificationTime = table.Column<DateTime>(nullable: true),
LastModifierId = table.Column<Guid>(nullable: true),
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(nullable: true),
DeletionTime = table.Column<DateTime>(nullable: true),
TenantId = table.Column<Guid>(nullable: true),
StoreId = table.Column<Guid>(nullable: false),
CustomerUserId = table.Column<Guid>(nullable: false),
OrderStatus = table.Column<int>(nullable: false),
Currency = table.Column<string>(nullable: true),
ProductTotalPrice = table.Column<decimal>(nullable: false),
TotalDiscount = table.Column<decimal>(nullable: false),
TotalPrice = table.Column<decimal>(nullable: false),
RefundedAmount = table.Column<decimal>(nullable: false),
CustomerRemark = table.Column<string>(nullable: true),
StaffRemark = table.Column<string>(nullable: true),
PaidTime = table.Column<DateTime>(nullable: true),
CompletionTime = table.Column<DateTime>(nullable: true),
CancelledTime = table.Column<DateTime>(nullable: true),
ReducedInventoryAfterPlacingTime = table.Column<DateTime>(nullable: true),
ReducedInventoryAfterPaymentTime = table.Column<DateTime>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_OrdersOrders", x => x.Id);
});
migrationBuilder.CreateTable(
name: "OrdersOrderLines",
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),
ProductId = table.Column<Guid>(nullable: false),
ProductSkuId = table.Column<Guid>(nullable: false),
ProductModificationTime = table.Column<DateTime>(nullable: false),
ProductDetailModificationTime = table.Column<DateTime>(nullable: false),
ProductName = table.Column<string>(nullable: true),
SkuDescription = table.Column<string>(nullable: true),
MediaResources = table.Column<string>(nullable: true),
Currency = table.Column<string>(nullable: true),
UnitPrice = table.Column<decimal>(nullable: false),
TotalPrice = table.Column<decimal>(nullable: false),
TotalDiscount = table.Column<decimal>(nullable: false),
Quantity = table.Column<int>(nullable: false),
OrderId = table.Column<Guid>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_OrdersOrderLines", x => x.Id);
table.ForeignKey(
name: "FK_OrdersOrderLines_OrdersOrders_OrderId",
column: x => x.OrderId,
principalTable: "OrdersOrders",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateIndex(
name: "IX_OrdersOrderLines_OrderId",
table: "OrdersOrderLines",
column: "OrderId");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "OrdersOrderLines");
migrationBuilder.DropTable(
name: "OrdersOrders");
}
}
}

2661
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200506014116_AddedColumnTypes.Designer.cs

File diff suppressed because it is too large

125
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200506014116_AddedColumnTypes.cs

@ -1,125 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace EasyMall.Migrations
{
public partial class AddedColumnTypes : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<decimal>(
name: "TotalPrice",
table: "OrdersOrders",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)");
migrationBuilder.AlterColumn<decimal>(
name: "TotalDiscount",
table: "OrdersOrders",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)");
migrationBuilder.AlterColumn<decimal>(
name: "RefundedAmount",
table: "OrdersOrders",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)");
migrationBuilder.AlterColumn<decimal>(
name: "ProductTotalPrice",
table: "OrdersOrders",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)");
migrationBuilder.AlterColumn<decimal>(
name: "UnitPrice",
table: "OrdersOrderLines",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)");
migrationBuilder.AlterColumn<decimal>(
name: "TotalPrice",
table: "OrdersOrderLines",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)");
migrationBuilder.AlterColumn<decimal>(
name: "TotalDiscount",
table: "OrdersOrderLines",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<decimal>(
name: "TotalPrice",
table: "OrdersOrders",
type: "decimal(18,2)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AlterColumn<decimal>(
name: "TotalDiscount",
table: "OrdersOrders",
type: "decimal(18,2)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AlterColumn<decimal>(
name: "RefundedAmount",
table: "OrdersOrders",
type: "decimal(18,2)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AlterColumn<decimal>(
name: "ProductTotalPrice",
table: "OrdersOrders",
type: "decimal(18,2)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AlterColumn<decimal>(
name: "UnitPrice",
table: "OrdersOrderLines",
type: "decimal(18,2)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AlterColumn<decimal>(
name: "TotalPrice",
table: "OrdersOrderLines",
type: "decimal(18,2)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AlterColumn<decimal>(
name: "TotalDiscount",
table: "OrdersOrderLines",
type: "decimal(18,2)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
}
}
}

2891
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200507072922_AddedPayment.Designer.cs

File diff suppressed because it is too large

118
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200507072922_AddedPayment.cs

@ -1,118 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace EasyMall.Migrations
{
public partial class AddedPayment : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "PaymentsPayments",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
LastModificationTime = table.Column<DateTime>(nullable: true),
LastModifierId = table.Column<Guid>(nullable: true),
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(nullable: true),
DeletionTime = table.Column<DateTime>(nullable: true),
TenantId = table.Column<Guid>(nullable: true),
PaymentMethod = table.Column<string>(nullable: true),
ExternalTradingCode = table.Column<string>(nullable: true),
Currency = table.Column<string>(nullable: true),
OriginalPaymentAmount = table.Column<decimal>(nullable: false),
PaymentDiscount = table.Column<decimal>(nullable: false),
ActualPaymentAmount = table.Column<decimal>(nullable: false),
RefundAmount = table.Column<decimal>(nullable: false),
CompletionTime = table.Column<DateTime>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PaymentsPayments", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PaymentsRefunds",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
LastModificationTime = table.Column<DateTime>(nullable: true),
LastModifierId = table.Column<Guid>(nullable: true),
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(nullable: true),
DeletionTime = table.Column<DateTime>(nullable: true),
TenantId = table.Column<Guid>(nullable: true),
StoreId = table.Column<Guid>(nullable: false),
OrderId = table.Column<Guid>(nullable: false),
RefundPaymentMethod = table.Column<string>(nullable: true),
ExternalTradingCode = table.Column<string>(nullable: true),
Currency = table.Column<string>(nullable: true),
RefundAmount = table.Column<decimal>(nullable: false),
CustomerRemark = table.Column<string>(nullable: true),
StaffRemark = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PaymentsRefunds", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PaymentsPaymentItems",
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),
ItemType = table.Column<string>(nullable: true),
ItemKey = table.Column<Guid>(nullable: false),
Currency = table.Column<string>(nullable: true),
OriginalPaymentAmount = table.Column<decimal>(nullable: false),
PaymentDiscount = table.Column<decimal>(nullable: false),
ActualPaymentAmount = table.Column<decimal>(nullable: false),
RefundAmount = table.Column<decimal>(nullable: false),
PaymentId = table.Column<Guid>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PaymentsPaymentItems", x => x.Id);
table.ForeignKey(
name: "FK_PaymentsPaymentItems_PaymentsPayments_PaymentId",
column: x => x.PaymentId,
principalTable: "PaymentsPayments",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateIndex(
name: "IX_PaymentsPaymentItems_PaymentId",
table: "PaymentsPaymentItems",
column: "PaymentId");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "PaymentsPaymentItems");
migrationBuilder.DropTable(
name: "PaymentsRefunds");
migrationBuilder.DropTable(
name: "PaymentsPayments");
}
}
}

2894
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200507073613_AddedPaymentIdToOrder.Designer.cs

File diff suppressed because it is too large

23
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200507073613_AddedPaymentIdToOrder.cs

@ -1,23 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace EasyMall.Migrations
{
public partial class AddedPaymentIdToOrder : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "PaymentId",
table: "OrdersOrders",
nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "PaymentId",
table: "OrdersOrders");
}
}
}

2894
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200507080841_AddedPaymentColumnTypes.Designer.cs

File diff suppressed because it is too large

157
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200507080841_AddedPaymentColumnTypes.cs

@ -1,157 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace EasyMall.Migrations
{
public partial class AddedPaymentColumnTypes : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<decimal>(
name: "RefundAmount",
table: "PaymentsRefunds",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)");
migrationBuilder.AlterColumn<decimal>(
name: "RefundAmount",
table: "PaymentsPayments",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)");
migrationBuilder.AlterColumn<decimal>(
name: "PaymentDiscount",
table: "PaymentsPayments",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)");
migrationBuilder.AlterColumn<decimal>(
name: "OriginalPaymentAmount",
table: "PaymentsPayments",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)");
migrationBuilder.AlterColumn<decimal>(
name: "ActualPaymentAmount",
table: "PaymentsPayments",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)");
migrationBuilder.AlterColumn<decimal>(
name: "RefundAmount",
table: "PaymentsPaymentItems",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)");
migrationBuilder.AlterColumn<decimal>(
name: "PaymentDiscount",
table: "PaymentsPaymentItems",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)");
migrationBuilder.AlterColumn<decimal>(
name: "OriginalPaymentAmount",
table: "PaymentsPaymentItems",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)");
migrationBuilder.AlterColumn<decimal>(
name: "ActualPaymentAmount",
table: "PaymentsPaymentItems",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<decimal>(
name: "RefundAmount",
table: "PaymentsRefunds",
type: "decimal(18,2)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AlterColumn<decimal>(
name: "RefundAmount",
table: "PaymentsPayments",
type: "decimal(18,2)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AlterColumn<decimal>(
name: "PaymentDiscount",
table: "PaymentsPayments",
type: "decimal(18,2)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AlterColumn<decimal>(
name: "OriginalPaymentAmount",
table: "PaymentsPayments",
type: "decimal(18,2)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AlterColumn<decimal>(
name: "ActualPaymentAmount",
table: "PaymentsPayments",
type: "decimal(18,2)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AlterColumn<decimal>(
name: "RefundAmount",
table: "PaymentsPaymentItems",
type: "decimal(18,2)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AlterColumn<decimal>(
name: "PaymentDiscount",
table: "PaymentsPaymentItems",
type: "decimal(18,2)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AlterColumn<decimal>(
name: "OriginalPaymentAmount",
table: "PaymentsPaymentItems",
type: "decimal(18,2)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AlterColumn<decimal>(
name: "ActualPaymentAmount",
table: "PaymentsPaymentItems",
type: "decimal(18,2)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
}
}
}

2897
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200507103409_AddedPayeeAccount.Designer.cs

File diff suppressed because it is too large

22
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200507103409_AddedPayeeAccount.cs

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

2900
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200508090003_AddedUserIdToPayment.Designer.cs

File diff suppressed because it is too large

24
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200508090003_AddedUserIdToPayment.cs

@ -1,24 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace EasyMall.Migrations
{
public partial class AddedUserIdToPayment : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "UserId",
table: "PaymentsPayments",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "UserId",
table: "PaymentsPayments");
}
}
}

2900
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200517161833_UsedPaymentServiceModule.Designer.cs

File diff suppressed because it is too large

226
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200517161833_UsedPaymentServiceModule.cs

@ -1,226 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace EasyMall.Migrations
{
public partial class UsedPaymentServiceModule : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "PaymentsPaymentItems");
migrationBuilder.DropTable(
name: "PaymentsRefunds");
migrationBuilder.DropTable(
name: "PaymentsPayments");
migrationBuilder.CreateTable(
name: "PaymentServicePayments",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
LastModificationTime = table.Column<DateTime>(nullable: true),
LastModifierId = table.Column<Guid>(nullable: true),
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(nullable: true),
DeletionTime = table.Column<DateTime>(nullable: true),
TenantId = table.Column<Guid>(nullable: true),
UserId = table.Column<Guid>(nullable: false),
PaymentMethod = table.Column<string>(nullable: true),
PayeeAccount = table.Column<string>(nullable: true),
ExternalTradingCode = table.Column<string>(nullable: true),
Currency = table.Column<string>(nullable: true),
OriginalPaymentAmount = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
PaymentDiscount = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
ActualPaymentAmount = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
RefundAmount = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
CompletionTime = table.Column<DateTime>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PaymentServicePayments", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PaymentServiceRefunds",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
LastModificationTime = table.Column<DateTime>(nullable: true),
LastModifierId = table.Column<Guid>(nullable: true),
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(nullable: true),
DeletionTime = table.Column<DateTime>(nullable: true),
TenantId = table.Column<Guid>(nullable: true),
PaymentId = table.Column<Guid>(nullable: false),
PaymentItemId = table.Column<Guid>(nullable: false),
RefundPaymentMethod = table.Column<string>(nullable: true),
ExternalTradingCode = table.Column<string>(nullable: true),
Currency = table.Column<string>(nullable: true),
RefundAmount = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
CustomerRemark = table.Column<string>(nullable: true),
StaffRemark = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PaymentServiceRefunds", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PaymentServicePaymentItems",
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),
ItemType = table.Column<string>(nullable: true),
ItemKey = table.Column<Guid>(nullable: false),
Currency = table.Column<string>(nullable: true),
OriginalPaymentAmount = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
PaymentDiscount = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
ActualPaymentAmount = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
RefundAmount = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
PaymentId = table.Column<Guid>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PaymentServicePaymentItems", x => x.Id);
table.ForeignKey(
name: "FK_PaymentServicePaymentItems_PaymentServicePayments_PaymentId",
column: x => x.PaymentId,
principalTable: "PaymentServicePayments",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateIndex(
name: "IX_PaymentServicePaymentItems_PaymentId",
table: "PaymentServicePaymentItems",
column: "PaymentId");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "PaymentServicePaymentItems");
migrationBuilder.DropTable(
name: "PaymentServiceRefunds");
migrationBuilder.DropTable(
name: "PaymentServicePayments");
migrationBuilder.CreateTable(
name: "PaymentsPayments",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ActualPaymentAmount = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
CompletionTime = table.Column<DateTime>(type: "datetime2", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(max)", nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Currency = table.Column<string>(type: "nvarchar(max)", nullable: true),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true),
ExternalTradingCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
OriginalPaymentAmount = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
PayeeAccount = table.Column<string>(type: "nvarchar(max)", nullable: true),
PaymentDiscount = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
PaymentMethod = table.Column<string>(type: "nvarchar(max)", nullable: true),
RefundAmount = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_PaymentsPayments", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PaymentsRefunds",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(max)", nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Currency = table.Column<string>(type: "nvarchar(max)", nullable: true),
CustomerRemark = table.Column<string>(type: "nvarchar(max)", nullable: true),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true),
ExternalTradingCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
OrderId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RefundAmount = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
RefundPaymentMethod = table.Column<string>(type: "nvarchar(max)", nullable: true),
StaffRemark = table.Column<string>(type: "nvarchar(max)", nullable: true),
StoreId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PaymentsRefunds", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PaymentsPaymentItems",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ActualPaymentAmount = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Currency = table.Column<string>(type: "nvarchar(max)", nullable: true),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
ItemKey = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ItemType = table.Column<string>(type: "nvarchar(max)", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
OriginalPaymentAmount = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
PaymentDiscount = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
PaymentId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
RefundAmount = table.Column<decimal>(type: "decimal(18,6)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_PaymentsPaymentItems", x => x.Id);
table.ForeignKey(
name: "FK_PaymentsPaymentItems_PaymentsPayments_PaymentId",
column: x => x.PaymentId,
principalTable: "PaymentsPayments",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateIndex(
name: "IX_PaymentsPaymentItems_PaymentId",
table: "PaymentsPaymentItems",
column: "PaymentId");
}
}
}

2900
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200519091521_RenamedTables.Designer.cs

File diff suppressed because it is too large

553
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200519091521_RenamedTables.cs

@ -1,553 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace EasyMall.Migrations
{
public partial class RenamedTables : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_OrdersOrderLines_OrdersOrders_OrderId",
table: "OrdersOrderLines");
migrationBuilder.DropForeignKey(
name: "FK_ProductsProductAttributeOptions_ProductsProductAttributes_ProductAttributeId",
table: "ProductsProductAttributeOptions");
migrationBuilder.DropForeignKey(
name: "FK_ProductsProductAttributes_ProductsProducts_ProductId",
table: "ProductsProductAttributes");
migrationBuilder.DropForeignKey(
name: "FK_ProductsProductSkus_ProductsProducts_ProductId",
table: "ProductsProductSkus");
migrationBuilder.DropPrimaryKey(
name: "PK_StoresStores",
table: "StoresStores");
migrationBuilder.DropPrimaryKey(
name: "PK_ProductsProductTypes",
table: "ProductsProductTypes");
migrationBuilder.DropPrimaryKey(
name: "PK_ProductsProductStores",
table: "ProductsProductStores");
migrationBuilder.DropPrimaryKey(
name: "PK_ProductsProductSkus",
table: "ProductsProductSkus");
migrationBuilder.DropPrimaryKey(
name: "PK_ProductsProducts",
table: "ProductsProducts");
migrationBuilder.DropPrimaryKey(
name: "PK_ProductsProductHistories",
table: "ProductsProductHistories");
migrationBuilder.DropPrimaryKey(
name: "PK_ProductsProductDetails",
table: "ProductsProductDetails");
migrationBuilder.DropPrimaryKey(
name: "PK_ProductsProductDetailHistories",
table: "ProductsProductDetailHistories");
migrationBuilder.DropPrimaryKey(
name: "PK_ProductsProductCategories",
table: "ProductsProductCategories");
migrationBuilder.DropPrimaryKey(
name: "PK_ProductsProductAttributes",
table: "ProductsProductAttributes");
migrationBuilder.DropPrimaryKey(
name: "PK_ProductsProductAttributeOptions",
table: "ProductsProductAttributeOptions");
migrationBuilder.DropPrimaryKey(
name: "PK_ProductsCategories",
table: "ProductsCategories");
migrationBuilder.DropPrimaryKey(
name: "PK_OrdersOrders",
table: "OrdersOrders");
migrationBuilder.DropPrimaryKey(
name: "PK_OrdersOrderLines",
table: "OrdersOrderLines");
migrationBuilder.RenameTable(
name: "StoresStores",
newName: "EShopStoresStores");
migrationBuilder.RenameTable(
name: "ProductsProductTypes",
newName: "EShopProductsProductTypes");
migrationBuilder.RenameTable(
name: "ProductsProductStores",
newName: "EShopProductsProductStores");
migrationBuilder.RenameTable(
name: "ProductsProductSkus",
newName: "EShopProductsProductSkus");
migrationBuilder.RenameTable(
name: "ProductsProducts",
newName: "EShopProductsProducts");
migrationBuilder.RenameTable(
name: "ProductsProductHistories",
newName: "EShopProductsProductHistories");
migrationBuilder.RenameTable(
name: "ProductsProductDetails",
newName: "EShopProductsProductDetails");
migrationBuilder.RenameTable(
name: "ProductsProductDetailHistories",
newName: "EShopProductsProductDetailHistories");
migrationBuilder.RenameTable(
name: "ProductsProductCategories",
newName: "EShopProductsProductCategories");
migrationBuilder.RenameTable(
name: "ProductsProductAttributes",
newName: "EShopProductsProductAttributes");
migrationBuilder.RenameTable(
name: "ProductsProductAttributeOptions",
newName: "EShopProductsProductAttributeOptions");
migrationBuilder.RenameTable(
name: "ProductsCategories",
newName: "EShopProductsCategories");
migrationBuilder.RenameTable(
name: "OrdersOrders",
newName: "EShopOrdersOrders");
migrationBuilder.RenameTable(
name: "OrdersOrderLines",
newName: "EShopOrdersOrderLines");
migrationBuilder.RenameIndex(
name: "IX_ProductsProductSkus_ProductId",
table: "EShopProductsProductSkus",
newName: "IX_EShopProductsProductSkus_ProductId");
migrationBuilder.RenameIndex(
name: "IX_ProductsProductHistories_ProductId",
table: "EShopProductsProductHistories",
newName: "IX_EShopProductsProductHistories_ProductId");
migrationBuilder.RenameIndex(
name: "IX_ProductsProductHistories_ModificationTime",
table: "EShopProductsProductHistories",
newName: "IX_EShopProductsProductHistories_ModificationTime");
migrationBuilder.RenameIndex(
name: "IX_ProductsProductDetailHistories_ProductDetailId",
table: "EShopProductsProductDetailHistories",
newName: "IX_EShopProductsProductDetailHistories_ProductDetailId");
migrationBuilder.RenameIndex(
name: "IX_ProductsProductDetailHistories_ModificationTime",
table: "EShopProductsProductDetailHistories",
newName: "IX_EShopProductsProductDetailHistories_ModificationTime");
migrationBuilder.RenameIndex(
name: "IX_ProductsProductAttributes_ProductId",
table: "EShopProductsProductAttributes",
newName: "IX_EShopProductsProductAttributes_ProductId");
migrationBuilder.RenameIndex(
name: "IX_ProductsProductAttributeOptions_ProductAttributeId",
table: "EShopProductsProductAttributeOptions",
newName: "IX_EShopProductsProductAttributeOptions_ProductAttributeId");
migrationBuilder.RenameIndex(
name: "IX_OrdersOrderLines_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_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_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_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);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_EShopOrdersOrderLines_EShopOrdersOrders_OrderId",
table: "EShopOrdersOrderLines");
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_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_EShopOrdersOrders",
table: "EShopOrdersOrders");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopOrdersOrderLines",
table: "EShopOrdersOrderLines");
migrationBuilder.RenameTable(
name: "EShopStoresStores",
newName: "StoresStores");
migrationBuilder.RenameTable(
name: "EShopProductsProductTypes",
newName: "ProductsProductTypes");
migrationBuilder.RenameTable(
name: "EShopProductsProductStores",
newName: "ProductsProductStores");
migrationBuilder.RenameTable(
name: "EShopProductsProductSkus",
newName: "ProductsProductSkus");
migrationBuilder.RenameTable(
name: "EShopProductsProducts",
newName: "ProductsProducts");
migrationBuilder.RenameTable(
name: "EShopProductsProductHistories",
newName: "ProductsProductHistories");
migrationBuilder.RenameTable(
name: "EShopProductsProductDetails",
newName: "ProductsProductDetails");
migrationBuilder.RenameTable(
name: "EShopProductsProductDetailHistories",
newName: "ProductsProductDetailHistories");
migrationBuilder.RenameTable(
name: "EShopProductsProductCategories",
newName: "ProductsProductCategories");
migrationBuilder.RenameTable(
name: "EShopProductsProductAttributes",
newName: "ProductsProductAttributes");
migrationBuilder.RenameTable(
name: "EShopProductsProductAttributeOptions",
newName: "ProductsProductAttributeOptions");
migrationBuilder.RenameTable(
name: "EShopProductsCategories",
newName: "ProductsCategories");
migrationBuilder.RenameTable(
name: "EShopOrdersOrders",
newName: "OrdersOrders");
migrationBuilder.RenameTable(
name: "EShopOrdersOrderLines",
newName: "OrdersOrderLines");
migrationBuilder.RenameIndex(
name: "IX_EShopProductsProductSkus_ProductId",
table: "ProductsProductSkus",
newName: "IX_ProductsProductSkus_ProductId");
migrationBuilder.RenameIndex(
name: "IX_EShopProductsProductHistories_ProductId",
table: "ProductsProductHistories",
newName: "IX_ProductsProductHistories_ProductId");
migrationBuilder.RenameIndex(
name: "IX_EShopProductsProductHistories_ModificationTime",
table: "ProductsProductHistories",
newName: "IX_ProductsProductHistories_ModificationTime");
migrationBuilder.RenameIndex(
name: "IX_EShopProductsProductDetailHistories_ProductDetailId",
table: "ProductsProductDetailHistories",
newName: "IX_ProductsProductDetailHistories_ProductDetailId");
migrationBuilder.RenameIndex(
name: "IX_EShopProductsProductDetailHistories_ModificationTime",
table: "ProductsProductDetailHistories",
newName: "IX_ProductsProductDetailHistories_ModificationTime");
migrationBuilder.RenameIndex(
name: "IX_EShopProductsProductAttributes_ProductId",
table: "ProductsProductAttributes",
newName: "IX_ProductsProductAttributes_ProductId");
migrationBuilder.RenameIndex(
name: "IX_EShopProductsProductAttributeOptions_ProductAttributeId",
table: "ProductsProductAttributeOptions",
newName: "IX_ProductsProductAttributeOptions_ProductAttributeId");
migrationBuilder.RenameIndex(
name: "IX_EShopOrdersOrderLines_OrderId",
table: "OrdersOrderLines",
newName: "IX_OrdersOrderLines_OrderId");
migrationBuilder.AddPrimaryKey(
name: "PK_StoresStores",
table: "StoresStores",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_ProductsProductTypes",
table: "ProductsProductTypes",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_ProductsProductStores",
table: "ProductsProductStores",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_ProductsProductSkus",
table: "ProductsProductSkus",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_ProductsProducts",
table: "ProductsProducts",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_ProductsProductHistories",
table: "ProductsProductHistories",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_ProductsProductDetails",
table: "ProductsProductDetails",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_ProductsProductDetailHistories",
table: "ProductsProductDetailHistories",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_ProductsProductCategories",
table: "ProductsProductCategories",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_ProductsProductAttributes",
table: "ProductsProductAttributes",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_ProductsProductAttributeOptions",
table: "ProductsProductAttributeOptions",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_ProductsCategories",
table: "ProductsCategories",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_OrdersOrders",
table: "OrdersOrders",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_OrdersOrderLines",
table: "OrdersOrderLines",
column: "Id");
migrationBuilder.AddForeignKey(
name: "FK_OrdersOrderLines_OrdersOrders_OrderId",
table: "OrdersOrderLines",
column: "OrderId",
principalTable: "OrdersOrders",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_ProductsProductAttributeOptions_ProductsProductAttributes_ProductAttributeId",
table: "ProductsProductAttributeOptions",
column: "ProductAttributeId",
principalTable: "ProductsProductAttributes",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_ProductsProductAttributes_ProductsProducts_ProductId",
table: "ProductsProductAttributes",
column: "ProductId",
principalTable: "ProductsProducts",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_ProductsProductSkus_ProductsProducts_ProductId",
table: "ProductsProductSkus",
column: "ProductId",
principalTable: "ProductsProducts",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
}
}
}

111
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200519094910_UpgradedPaymentServiceModuleTo014.cs

@ -1,111 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace EasyMall.Migrations
{
public partial class UpgradedPaymentServiceModuleTo014 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<DateTime>(
name: "CancelledTime",
table: "PaymentServicePayments",
nullable: true);
migrationBuilder.CreateTable(
name: "PaymentServiceWeChatPayPaymentRecords",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
TenantId = table.Column<Guid>(nullable: true),
PaymentId = table.Column<Guid>(nullable: false),
ReturnCode = table.Column<string>(nullable: true),
ReturnMsg = table.Column<string>(nullable: true),
AppId = table.Column<string>(nullable: true),
MchId = table.Column<string>(nullable: true),
DeviceInfo = table.Column<string>(nullable: true),
NonceStr = table.Column<string>(nullable: true),
Sign = table.Column<string>(nullable: true),
SignType = table.Column<string>(nullable: true),
ResultCode = table.Column<string>(nullable: true),
ErrCode = table.Column<string>(nullable: true),
ErrCodeDes = table.Column<string>(nullable: true),
Openid = table.Column<string>(nullable: true),
IsSubscribe = table.Column<string>(nullable: true),
TradeType = table.Column<string>(nullable: true),
BankType = table.Column<string>(nullable: true),
TotalFee = table.Column<int>(nullable: false),
SettlementTotalFee = table.Column<int>(nullable: true),
FeeType = table.Column<string>(nullable: true),
CashFee = table.Column<int>(nullable: false),
CashFeeType = table.Column<string>(nullable: true),
CouponFee = table.Column<int>(nullable: true),
CouponCount = table.Column<int>(nullable: true),
CouponTypes = table.Column<string>(nullable: true),
CouponIds = table.Column<string>(nullable: true),
CouponFees = table.Column<string>(nullable: true),
TransactionId = table.Column<string>(nullable: true),
OutTradeNo = table.Column<string>(nullable: true),
Attach = table.Column<string>(nullable: true),
TimeEnd = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PaymentServiceWeChatPayPaymentRecords", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PaymentServiceWeChatPayRefundRecords",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
TenantId = table.Column<Guid>(nullable: true),
PaymentId = table.Column<Guid>(nullable: false),
ReturnCode = table.Column<string>(nullable: true),
ReturnMsg = table.Column<string>(nullable: true),
AppId = table.Column<string>(nullable: true),
MchId = table.Column<string>(nullable: true),
NonceStr = table.Column<string>(nullable: true),
ReqInfo = table.Column<string>(nullable: true),
TransactionId = table.Column<string>(nullable: true),
OutTradeNo = table.Column<string>(nullable: true),
RefundId = table.Column<string>(nullable: true),
OutRefundNo = table.Column<string>(nullable: true),
TotalFee = table.Column<int>(nullable: false),
SettlementTotalFee = table.Column<int>(nullable: true),
RefundFee = table.Column<int>(nullable: false),
SettlementRefundFee = table.Column<int>(nullable: false),
RefundStatus = table.Column<string>(nullable: true),
SuccessTime = table.Column<string>(nullable: true),
RefundRecvAccout = table.Column<string>(nullable: true),
RefundAccount = table.Column<string>(nullable: true),
RefundRequestSource = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PaymentServiceWeChatPayRefundRecords", x => x.Id);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "PaymentServiceWeChatPayPaymentRecords");
migrationBuilder.DropTable(
name: "PaymentServiceWeChatPayRefundRecords");
migrationBuilder.DropColumn(
name: "CancelledTime",
table: "PaymentServicePayments");
}
}
}

2903
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200525082759_AddedCodePropertyToProduct.Designer.cs

File diff suppressed because it is too large

22
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200525082759_AddedCodePropertyToProduct.cs

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

10
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200519094910_UpgradedPaymentServiceModuleTo014.Designer.cs → samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200526074907_AddedCodeToProductSku.Designer.cs

@ -10,8 +10,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace EasyMall.Migrations
{
[DbContext(typeof(EasyMallMigrationsDbContext))]
[Migration("20200519094910_UpgradedPaymentServiceModuleTo014")]
partial class UpgradedPaymentServiceModuleTo014
[Migration("20200526074907_AddedCodeToProductSku")]
partial class AddedCodeToProductSku
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
@ -573,6 +573,9 @@ namespace EasyMall.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("Code")
.HasColumnType("nvarchar(max)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
@ -760,6 +763,9 @@ namespace EasyMall.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("Code")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");

643
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200106080719_Initial.cs → samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200526074907_AddedCodeToProductSku.cs

@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
namespace EasyMall.Migrations
{
public partial class Initial : Migration
public partial class AddedCodeToProductSku : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
@ -201,6 +201,243 @@ namespace EasyMall.Migrations
table.PrimaryKey("PK_AbpUsers", x => x.Id);
});
migrationBuilder.CreateTable(
name: "EShopOrdersOrders",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
LastModificationTime = table.Column<DateTime>(nullable: true),
LastModifierId = table.Column<Guid>(nullable: true),
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(nullable: true),
DeletionTime = table.Column<DateTime>(nullable: true),
TenantId = table.Column<Guid>(nullable: true),
StoreId = table.Column<Guid>(nullable: false),
CustomerUserId = table.Column<Guid>(nullable: false),
OrderStatus = table.Column<int>(nullable: false),
Currency = table.Column<string>(nullable: true),
ProductTotalPrice = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
TotalDiscount = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
TotalPrice = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
RefundedAmount = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
CustomerRemark = table.Column<string>(nullable: true),
StaffRemark = table.Column<string>(nullable: true),
PaymentId = table.Column<Guid>(nullable: true),
PaidTime = table.Column<DateTime>(nullable: true),
CompletionTime = table.Column<DateTime>(nullable: true),
CancelledTime = table.Column<DateTime>(nullable: true),
ReducedInventoryAfterPlacingTime = table.Column<DateTime>(nullable: true),
ReducedInventoryAfterPaymentTime = table.Column<DateTime>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_EShopOrdersOrders", x => x.Id);
});
migrationBuilder.CreateTable(
name: "EShopProductsCategories",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
LastModificationTime = table.Column<DateTime>(nullable: true),
LastModifierId = table.Column<Guid>(nullable: true),
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(nullable: true),
DeletionTime = table.Column<DateTime>(nullable: true),
TenantId = table.Column<Guid>(nullable: true),
ParentCategoryId = table.Column<Guid>(nullable: true),
DisplayName = table.Column<string>(nullable: true),
Description = table.Column<string>(nullable: true),
MediaResources = table.Column<string>(nullable: true),
IsHidden = table.Column<bool>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_EShopProductsCategories", x => x.Id);
});
migrationBuilder.CreateTable(
name: "EShopProductsProductCategories",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
LastModificationTime = table.Column<DateTime>(nullable: true),
LastModifierId = table.Column<Guid>(nullable: true),
TenantId = table.Column<Guid>(nullable: true),
CategoryId = table.Column<Guid>(nullable: false),
ProductId = table.Column<Guid>(nullable: false),
DisplayOrder = table.Column<int>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_EShopProductsProductCategories", x => x.Id);
});
migrationBuilder.CreateTable(
name: "EShopProductsProductDetailHistories",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
ProductDetailId = table.Column<Guid>(nullable: false),
ModificationTime = table.Column<DateTime>(nullable: false),
SerializedDto = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_EShopProductsProductDetailHistories", x => x.Id);
});
migrationBuilder.CreateTable(
name: "EShopProductsProductDetails",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
LastModificationTime = table.Column<DateTime>(nullable: true),
LastModifierId = table.Column<Guid>(nullable: true),
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(nullable: true),
DeletionTime = table.Column<DateTime>(nullable: true),
Description = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_EShopProductsProductDetails", x => x.Id);
});
migrationBuilder.CreateTable(
name: "EShopProductsProductHistories",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
ProductId = table.Column<Guid>(nullable: false),
ModificationTime = table.Column<DateTime>(nullable: false),
SerializedDto = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_EShopProductsProductHistories", x => x.Id);
});
migrationBuilder.CreateTable(
name: "EShopProductsProducts",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
LastModificationTime = table.Column<DateTime>(nullable: true),
LastModifierId = table.Column<Guid>(nullable: true),
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(nullable: true),
DeletionTime = table.Column<DateTime>(nullable: true),
ProductTypeId = table.Column<Guid>(nullable: false),
ProductDetailId = table.Column<Guid>(nullable: false),
Code = table.Column<string>(nullable: true),
DisplayName = table.Column<string>(nullable: true),
InventoryStrategy = table.Column<int>(nullable: false),
MediaResources = table.Column<string>(nullable: true),
DisplayOrder = table.Column<int>(nullable: false),
IsPublished = table.Column<bool>(nullable: false),
IsStatic = table.Column<bool>(nullable: false),
IsHidden = table.Column<bool>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_EShopProductsProducts", x => x.Id);
});
migrationBuilder.CreateTable(
name: "EShopProductsProductStores",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
LastModificationTime = table.Column<DateTime>(nullable: true),
LastModifierId = table.Column<Guid>(nullable: true),
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(nullable: true),
DeletionTime = table.Column<DateTime>(nullable: true),
TenantId = table.Column<Guid>(nullable: true),
StoreId = table.Column<Guid>(nullable: false),
ProductId = table.Column<Guid>(nullable: false),
IsOwner = table.Column<bool>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_EShopProductsProductStores", x => x.Id);
});
migrationBuilder.CreateTable(
name: "EShopProductsProductTypes",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
LastModificationTime = table.Column<DateTime>(nullable: true),
LastModifierId = table.Column<Guid>(nullable: true),
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(nullable: true),
DeletionTime = table.Column<DateTime>(nullable: true),
Name = table.Column<string>(nullable: true),
DisplayName = table.Column<string>(nullable: true),
Description = table.Column<string>(nullable: true),
MultiTenancySide = table.Column<int>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_EShopProductsProductTypes", x => x.Id);
});
migrationBuilder.CreateTable(
name: "EShopStoresStores",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
LastModificationTime = table.Column<DateTime>(nullable: true),
LastModifierId = table.Column<Guid>(nullable: true),
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(nullable: true),
DeletionTime = table.Column<DateTime>(nullable: true),
TenantId = table.Column<Guid>(nullable: true),
Name = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_EShopStoresStores", x => x.Id);
});
migrationBuilder.CreateTable(
name: "IdentityServerApiResources",
columns: table => new
@ -352,6 +589,149 @@ namespace EasyMall.Migrations
table.PrimaryKey("PK_IdentityServerPersistedGrants", x => x.Key);
});
migrationBuilder.CreateTable(
name: "PaymentServicePayments",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
LastModificationTime = table.Column<DateTime>(nullable: true),
LastModifierId = table.Column<Guid>(nullable: true),
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(nullable: true),
DeletionTime = table.Column<DateTime>(nullable: true),
TenantId = table.Column<Guid>(nullable: true),
UserId = table.Column<Guid>(nullable: false),
PaymentMethod = table.Column<string>(nullable: true),
PayeeAccount = table.Column<string>(nullable: true),
ExternalTradingCode = table.Column<string>(nullable: true),
Currency = table.Column<string>(nullable: true),
OriginalPaymentAmount = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
PaymentDiscount = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
ActualPaymentAmount = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
RefundAmount = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
CompletionTime = table.Column<DateTime>(nullable: true),
CancelledTime = table.Column<DateTime>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PaymentServicePayments", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PaymentServiceRefunds",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
LastModificationTime = table.Column<DateTime>(nullable: true),
LastModifierId = table.Column<Guid>(nullable: true),
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(nullable: true),
DeletionTime = table.Column<DateTime>(nullable: true),
TenantId = table.Column<Guid>(nullable: true),
PaymentId = table.Column<Guid>(nullable: false),
PaymentItemId = table.Column<Guid>(nullable: false),
RefundPaymentMethod = table.Column<string>(nullable: true),
ExternalTradingCode = table.Column<string>(nullable: true),
Currency = table.Column<string>(nullable: true),
RefundAmount = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
CustomerRemark = table.Column<string>(nullable: true),
StaffRemark = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PaymentServiceRefunds", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PaymentServiceWeChatPayPaymentRecords",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
TenantId = table.Column<Guid>(nullable: true),
PaymentId = table.Column<Guid>(nullable: false),
ReturnCode = table.Column<string>(nullable: true),
ReturnMsg = table.Column<string>(nullable: true),
AppId = table.Column<string>(nullable: true),
MchId = table.Column<string>(nullable: true),
DeviceInfo = table.Column<string>(nullable: true),
NonceStr = table.Column<string>(nullable: true),
Sign = table.Column<string>(nullable: true),
SignType = table.Column<string>(nullable: true),
ResultCode = table.Column<string>(nullable: true),
ErrCode = table.Column<string>(nullable: true),
ErrCodeDes = table.Column<string>(nullable: true),
Openid = table.Column<string>(nullable: true),
IsSubscribe = table.Column<string>(nullable: true),
TradeType = table.Column<string>(nullable: true),
BankType = table.Column<string>(nullable: true),
TotalFee = table.Column<int>(nullable: false),
SettlementTotalFee = table.Column<int>(nullable: true),
FeeType = table.Column<string>(nullable: true),
CashFee = table.Column<int>(nullable: false),
CashFeeType = table.Column<string>(nullable: true),
CouponFee = table.Column<int>(nullable: true),
CouponCount = table.Column<int>(nullable: true),
CouponTypes = table.Column<string>(nullable: true),
CouponIds = table.Column<string>(nullable: true),
CouponFees = table.Column<string>(nullable: true),
TransactionId = table.Column<string>(nullable: true),
OutTradeNo = table.Column<string>(nullable: true),
Attach = table.Column<string>(nullable: true),
TimeEnd = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PaymentServiceWeChatPayPaymentRecords", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PaymentServiceWeChatPayRefundRecords",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
TenantId = table.Column<Guid>(nullable: true),
PaymentId = table.Column<Guid>(nullable: false),
ReturnCode = table.Column<string>(nullable: true),
ReturnMsg = table.Column<string>(nullable: true),
AppId = table.Column<string>(nullable: true),
MchId = table.Column<string>(nullable: true),
NonceStr = table.Column<string>(nullable: true),
ReqInfo = table.Column<string>(nullable: true),
TransactionId = table.Column<string>(nullable: true),
OutTradeNo = table.Column<string>(nullable: true),
RefundId = table.Column<string>(nullable: true),
OutRefundNo = table.Column<string>(nullable: true),
TotalFee = table.Column<int>(nullable: false),
SettlementTotalFee = table.Column<int>(nullable: true),
RefundFee = table.Column<int>(nullable: false),
SettlementRefundFee = table.Column<int>(nullable: false),
RefundStatus = table.Column<string>(nullable: true),
SuccessTime = table.Column<string>(nullable: true),
RefundRecvAccout = table.Column<string>(nullable: true),
RefundAccount = table.Column<string>(nullable: true),
RefundRequestSource = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PaymentServiceWeChatPayRefundRecords", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AbpAuditLogActions",
columns: table => new
@ -530,6 +910,105 @@ namespace EasyMall.Migrations
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "EShopOrdersOrderLines",
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),
ProductId = table.Column<Guid>(nullable: false),
ProductSkuId = table.Column<Guid>(nullable: false),
ProductModificationTime = table.Column<DateTime>(nullable: false),
ProductDetailModificationTime = table.Column<DateTime>(nullable: false),
ProductName = table.Column<string>(nullable: true),
SkuDescription = table.Column<string>(nullable: true),
MediaResources = table.Column<string>(nullable: true),
Currency = table.Column<string>(nullable: true),
UnitPrice = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
TotalPrice = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
TotalDiscount = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
Quantity = table.Column<int>(nullable: false),
OrderId = table.Column<Guid>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_EShopOrdersOrderLines", x => x.Id);
table.ForeignKey(
name: "FK_EShopOrdersOrderLines_EShopOrdersOrders_OrderId",
column: x => x.OrderId,
principalTable: "EShopOrdersOrders",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "EShopProductsProductAttributes",
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),
DisplayName = table.Column<string>(nullable: true),
Description = table.Column<string>(nullable: true),
DisplayOrder = table.Column<int>(nullable: false),
ProductId = table.Column<Guid>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_EShopProductsProductAttributes", x => x.Id);
table.ForeignKey(
name: "FK_EShopProductsProductAttributes_EShopProductsProducts_ProductId",
column: x => x.ProductId,
principalTable: "EShopProductsProducts",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "EShopProductsProductSkus",
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),
SerializedAttributeOptionIds = table.Column<string>(nullable: true),
Code = table.Column<string>(nullable: true),
Currency = table.Column<string>(nullable: true),
OriginalPrice = table.Column<decimal>(type: "decimal(18,6)", nullable: true),
Price = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
Inventory = table.Column<int>(nullable: false),
Sold = table.Column<int>(nullable: false),
OrderMinQuantity = table.Column<int>(nullable: false),
ProductDetailId = table.Column<Guid>(nullable: true),
ProductId = table.Column<Guid>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_EShopProductsProductSkus", x => x.Id);
table.ForeignKey(
name: "FK_EShopProductsProductSkus_EShopProductsProducts_ProductId",
column: x => x.ProductId,
principalTable: "EShopProductsProducts",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "IdentityServerApiClaims",
columns: table => new
@ -777,6 +1256,38 @@ namespace EasyMall.Migrations
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "PaymentServicePaymentItems",
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),
ItemType = table.Column<string>(nullable: true),
ItemKey = table.Column<Guid>(nullable: false),
Currency = table.Column<string>(nullable: true),
OriginalPaymentAmount = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
PaymentDiscount = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
ActualPaymentAmount = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
RefundAmount = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
PaymentId = table.Column<Guid>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PaymentServicePaymentItems", x => x.Id);
table.ForeignKey(
name: "FK_PaymentServicePaymentItems_PaymentServicePayments_PaymentId",
column: x => x.PaymentId,
principalTable: "PaymentServicePayments",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "AbpEntityPropertyChanges",
columns: table => new
@ -800,6 +1311,34 @@ namespace EasyMall.Migrations
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "EShopProductsProductAttributeOptions",
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),
DisplayName = table.Column<string>(nullable: true),
Description = table.Column<string>(nullable: true),
DisplayOrder = table.Column<int>(nullable: false),
ProductAttributeId = table.Column<Guid>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_EShopProductsProductAttributeOptions", x => x.Id);
table.ForeignKey(
name: "FK_EShopProductsProductAttributeOptions_EShopProductsProductAttributes_ProductAttributeId",
column: x => x.ProductAttributeId,
principalTable: "EShopProductsProductAttributes",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "IdentityServerApiScopeClaims",
columns: table => new
@ -924,6 +1463,46 @@ namespace EasyMall.Migrations
table: "AbpUsers",
column: "UserName");
migrationBuilder.CreateIndex(
name: "IX_EShopOrdersOrderLines_OrderId",
table: "EShopOrdersOrderLines",
column: "OrderId");
migrationBuilder.CreateIndex(
name: "IX_EShopProductsProductAttributeOptions_ProductAttributeId",
table: "EShopProductsProductAttributeOptions",
column: "ProductAttributeId");
migrationBuilder.CreateIndex(
name: "IX_EShopProductsProductAttributes_ProductId",
table: "EShopProductsProductAttributes",
column: "ProductId");
migrationBuilder.CreateIndex(
name: "IX_EShopProductsProductDetailHistories_ModificationTime",
table: "EShopProductsProductDetailHistories",
column: "ModificationTime");
migrationBuilder.CreateIndex(
name: "IX_EShopProductsProductDetailHistories_ProductDetailId",
table: "EShopProductsProductDetailHistories",
column: "ProductDetailId");
migrationBuilder.CreateIndex(
name: "IX_EShopProductsProductHistories_ModificationTime",
table: "EShopProductsProductHistories",
column: "ModificationTime");
migrationBuilder.CreateIndex(
name: "IX_EShopProductsProductHistories_ProductId",
table: "EShopProductsProductHistories",
column: "ProductId");
migrationBuilder.CreateIndex(
name: "IX_EShopProductsProductSkus_ProductId",
table: "EShopProductsProductSkus",
column: "ProductId");
migrationBuilder.CreateIndex(
name: "IX_IdentityServerClients_ClientId",
table: "IdentityServerClients",
@ -955,6 +1534,11 @@ namespace EasyMall.Migrations
name: "IX_IdentityServerPersistedGrants_SubjectId_ClientId_Type",
table: "IdentityServerPersistedGrants",
columns: new[] { "SubjectId", "ClientId", "Type" });
migrationBuilder.CreateIndex(
name: "IX_PaymentServicePaymentItems_PaymentId",
table: "PaymentServicePaymentItems",
column: "PaymentId");
}
protected override void Down(MigrationBuilder migrationBuilder)
@ -998,6 +1582,39 @@ namespace EasyMall.Migrations
migrationBuilder.DropTable(
name: "AbpUserTokens");
migrationBuilder.DropTable(
name: "EShopOrdersOrderLines");
migrationBuilder.DropTable(
name: "EShopProductsCategories");
migrationBuilder.DropTable(
name: "EShopProductsProductAttributeOptions");
migrationBuilder.DropTable(
name: "EShopProductsProductCategories");
migrationBuilder.DropTable(
name: "EShopProductsProductDetailHistories");
migrationBuilder.DropTable(
name: "EShopProductsProductDetails");
migrationBuilder.DropTable(
name: "EShopProductsProductHistories");
migrationBuilder.DropTable(
name: "EShopProductsProductSkus");
migrationBuilder.DropTable(
name: "EShopProductsProductStores");
migrationBuilder.DropTable(
name: "EShopProductsProductTypes");
migrationBuilder.DropTable(
name: "EShopStoresStores");
migrationBuilder.DropTable(
name: "IdentityServerApiClaims");
@ -1043,6 +1660,18 @@ namespace EasyMall.Migrations
migrationBuilder.DropTable(
name: "IdentityServerPersistedGrants");
migrationBuilder.DropTable(
name: "PaymentServicePaymentItems");
migrationBuilder.DropTable(
name: "PaymentServiceRefunds");
migrationBuilder.DropTable(
name: "PaymentServiceWeChatPayPaymentRecords");
migrationBuilder.DropTable(
name: "PaymentServiceWeChatPayRefundRecords");
migrationBuilder.DropTable(
name: "AbpEntityChanges");
@ -1055,6 +1684,12 @@ namespace EasyMall.Migrations
migrationBuilder.DropTable(
name: "AbpUsers");
migrationBuilder.DropTable(
name: "EShopOrdersOrders");
migrationBuilder.DropTable(
name: "EShopProductsProductAttributes");
migrationBuilder.DropTable(
name: "IdentityServerApiScopes");
@ -1064,9 +1699,15 @@ namespace EasyMall.Migrations
migrationBuilder.DropTable(
name: "IdentityServerIdentityResources");
migrationBuilder.DropTable(
name: "PaymentServicePayments");
migrationBuilder.DropTable(
name: "AbpAuditLogs");
migrationBuilder.DropTable(
name: "EShopProductsProducts");
migrationBuilder.DropTable(
name: "IdentityServerApiResources");
}

3
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/EasyMallMigrationsDbContextModelSnapshot.cs

@ -761,6 +761,9 @@ namespace EasyMall.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("Code")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");

Loading…
Cancel
Save