diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/CreateOrderDto.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/CreateOrderDto.cs index e6447e0f..00288406 100644 --- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/CreateOrderDto.cs +++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/CreateOrderDto.cs @@ -4,11 +4,11 @@ using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Linq; using EasyAbp.EShop.Stores.Stores; -using Volo.Abp.Data; +using Volo.Abp.ObjectExtending; namespace EasyAbp.EShop.Orders.Orders.Dtos { - public class CreateOrderDto : IHasExtraProperties, IValidatableObject, IMultiStore + public class CreateOrderDto : ExtensibleObject, IMultiStore { [DisplayName("OrderStoreId")] public Guid StoreId { get; set; } @@ -18,12 +18,11 @@ namespace EasyAbp.EShop.Orders.Orders.Dtos [DisplayName("OrderLine")] public List OrderLines { get; set; } - - [DisplayName("OrderExtraProperties")] - public Dictionary ExtraProperties { get; set; } - public IEnumerable Validate(ValidationContext validationContext) + public override IEnumerable Validate(ValidationContext validationContext) { + base.Validate(validationContext); + if (OrderLines.Count == 0) { yield return new ValidationResult( diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/CreateOrderLineDto.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/CreateOrderLineDto.cs index 5cd072f4..b1a31aad 100644 --- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/CreateOrderLineDto.cs +++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/CreateOrderLineDto.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using System.ComponentModel; namespace EasyAbp.EShop.Orders.Orders.Dtos diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp/EShop/Payments/Payments/Dtos/CreatePaymentDto.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp/EShop/Payments/Payments/Dtos/CreatePaymentDto.cs index f23f7a89..58ee9732 100644 --- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp/EShop/Payments/Payments/Dtos/CreatePaymentDto.cs +++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp/EShop/Payments/Payments/Dtos/CreatePaymentDto.cs @@ -2,17 +2,20 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; +using Volo.Abp.ObjectExtending; namespace EasyAbp.EShop.Payments.Payments.Dtos { - public class CreatePaymentDto : IValidatableObject + public class CreatePaymentDto : ExtensibleObject { public string PaymentMethod { get; set; } public List OrderIds { get; set; } - public IEnumerable Validate(ValidationContext validationContext) + public override IEnumerable Validate(ValidationContext validationContext) { + base.Validate(validationContext); + if (OrderIds.Count == 0) { yield return new ValidationResult( diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp/EShop/Payments/Refunds/Dtos/CreateEShopRefundInput.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp/EShop/Payments/Refunds/Dtos/CreateEShopRefundInput.cs index 6a49bf51..f4870bca 100644 --- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp/EShop/Payments/Refunds/Dtos/CreateEShopRefundInput.cs +++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp/EShop/Payments/Refunds/Dtos/CreateEShopRefundInput.cs @@ -3,10 +3,11 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using JetBrains.Annotations; +using Volo.Abp.ObjectExtending; namespace EasyAbp.EShop.Payments.Refunds.Dtos { - public class CreateEShopRefundInput : IValidatableObject + public class CreateEShopRefundInput : ExtensibleObject { public Guid PaymentId { get; set; } @@ -21,8 +22,10 @@ namespace EasyAbp.EShop.Payments.Refunds.Dtos public List RefundItems { get; set; } = new List(); - public IEnumerable Validate(ValidationContext validationContext) + public override IEnumerable Validate(ValidationContext validationContext) { + base.Validate(validationContext); + if (RefundItems.IsNullOrEmpty()) { yield return new ValidationResult( diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp/EShop/Payments/Refunds/Dtos/CreateEShopRefundItemInput.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp/EShop/Payments/Refunds/Dtos/CreateEShopRefundItemInput.cs index f54a8592..abee1c2c 100644 --- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp/EShop/Payments/Refunds/Dtos/CreateEShopRefundItemInput.cs +++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp/EShop/Payments/Refunds/Dtos/CreateEShopRefundItemInput.cs @@ -1,10 +1,11 @@ using System; using System.Collections.Generic; using JetBrains.Annotations; +using Volo.Abp.ObjectExtending; namespace EasyAbp.EShop.Payments.Refunds.Dtos { - public class CreateEShopRefundItemInput + public class CreateEShopRefundItemInput : ExtensibleObject { public Guid OrderId { get; set; } diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp/EShop/Payments/Refunds/Dtos/RefundDto.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp/EShop/Payments/Refunds/Dtos/RefundDto.cs index 9675f107..5ee7ddd2 100644 --- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp/EShop/Payments/Refunds/Dtos/RefundDto.cs +++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp/EShop/Payments/Refunds/Dtos/RefundDto.cs @@ -5,7 +5,7 @@ using Volo.Abp.Application.Dtos; namespace EasyAbp.EShop.Payments.Refunds.Dtos { - public class RefundDto : FullAuditedEntityDto, IRefund + public class RefundDto : ExtensibleFullAuditedEntityDto, IRefund { #region Base properties diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Categories/Dtos/CategoryDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Categories/Dtos/CategoryDto.cs index 77777228..db973a4e 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Categories/Dtos/CategoryDto.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Categories/Dtos/CategoryDto.cs @@ -5,7 +5,7 @@ using Volo.Abp.Application.Dtos; namespace EasyAbp.EShop.Products.Categories.Dtos { - public class CategoryDto : FullAuditedEntityDto + public class CategoryDto : ExtensibleFullAuditedEntityDto { public string UniqueName { get; set; } diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Categories/Dtos/CreateUpdateCategoryDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Categories/Dtos/CreateUpdateCategoryDto.cs index 6925b2ca..78c492a9 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Categories/Dtos/CreateUpdateCategoryDto.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Categories/Dtos/CreateUpdateCategoryDto.cs @@ -1,10 +1,11 @@ using System; using System.ComponentModel; using System.ComponentModel.DataAnnotations; +using Volo.Abp.ObjectExtending; namespace EasyAbp.EShop.Products.Categories.Dtos { - public class CreateUpdateCategoryDto + public class CreateUpdateCategoryDto : ExtensibleObject { [DisplayName("CategoryUniqueName")] public string UniqueName { get; set; } diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductCategories/Dtos/ProductCategoryDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductCategories/Dtos/ProductCategoryDto.cs index 373a5e3e..d0c60522 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductCategories/Dtos/ProductCategoryDto.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductCategories/Dtos/ProductCategoryDto.cs @@ -3,7 +3,7 @@ using Volo.Abp.Application.Dtos; namespace EasyAbp.EShop.Products.ProductCategories.Dtos { - public class ProductCategoryDto : AuditedEntityDto + public class ProductCategoryDto : ExtensibleAuditedEntityDto { public Guid CategoryId { get; set; } diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductDetailHistories/Dtos/ProductDetailHistoryDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductDetailHistories/Dtos/ProductDetailHistoryDto.cs index 32a187d4..a974ae4d 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductDetailHistories/Dtos/ProductDetailHistoryDto.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductDetailHistories/Dtos/ProductDetailHistoryDto.cs @@ -3,7 +3,7 @@ using Volo.Abp.Application.Dtos; namespace EasyAbp.EShop.Products.ProductDetailHistories.Dtos { - public class ProductDetailHistoryDto : EntityDto + public class ProductDetailHistoryDto : ExtensibleEntityDto { public Guid ProductDetailId { get; set; } diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductDetails/Dtos/CreateUpdateProductDetailDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductDetails/Dtos/CreateUpdateProductDetailDto.cs index e388a3d4..2dfbbca2 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductDetails/Dtos/CreateUpdateProductDetailDto.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductDetails/Dtos/CreateUpdateProductDetailDto.cs @@ -1,9 +1,10 @@ using System; using System.ComponentModel; +using Volo.Abp.ObjectExtending; namespace EasyAbp.EShop.Products.ProductDetails.Dtos { - public class CreateUpdateProductDetailDto + public class CreateUpdateProductDetailDto : ExtensibleObject { /// /// This property is for product management permission checking diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductDetails/Dtos/ProductDetailDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductDetails/Dtos/ProductDetailDto.cs index 9cc81634..b3e1ff2e 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductDetails/Dtos/ProductDetailDto.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductDetails/Dtos/ProductDetailDto.cs @@ -4,7 +4,7 @@ using Volo.Abp.Application.Dtos; namespace EasyAbp.EShop.Products.ProductDetails.Dtos { [Serializable] - public class ProductDetailDto : EntityDto + public class ProductDetailDto : ExtensibleEntityDto { public string Description { get; set; } } diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductHistories/Dtos/ProductHistoryDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductHistories/Dtos/ProductHistoryDto.cs index 8bf7eff5..0677aa1f 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductHistories/Dtos/ProductHistoryDto.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductHistories/Dtos/ProductHistoryDto.cs @@ -3,7 +3,7 @@ using Volo.Abp.Application.Dtos; namespace EasyAbp.EShop.Products.ProductHistories.Dtos { - public class ProductHistoryDto : EntityDto + public class ProductHistoryDto : ExtensibleEntityDto { public Guid ProductId { get; set; } diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductInventories/Dtos/ProductInventoryDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductInventories/Dtos/ProductInventoryDto.cs index 63506d91..4dc5ca9d 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductInventories/Dtos/ProductInventoryDto.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductInventories/Dtos/ProductInventoryDto.cs @@ -4,7 +4,7 @@ using Volo.Abp.Application.Dtos; namespace EasyAbp.EShop.Products.ProductInventories.Dtos { [Serializable] - public class ProductInventoryDto : FullAuditedEntityDto + public class ProductInventoryDto : ExtensibleFullAuditedEntityDto { public Guid ProductId { get; set; } diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductInventories/Dtos/UpdateProductInventoryDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductInventories/Dtos/UpdateProductInventoryDto.cs index 8aaa5ba5..e88bfa0c 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductInventories/Dtos/UpdateProductInventoryDto.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductInventories/Dtos/UpdateProductInventoryDto.cs @@ -1,8 +1,10 @@ using System; +using Volo.Abp.ObjectExtending; + namespace EasyAbp.EShop.Products.ProductInventories.Dtos { [Serializable] - public class UpdateProductInventoryDto + public class UpdateProductInventoryDto : ExtensibleObject { public Guid ProductId { get; set; } diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/CreateUpdateProductAttributeDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/CreateUpdateProductAttributeDto.cs index d7dda3de..c7bb9e10 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/CreateUpdateProductAttributeDto.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/CreateUpdateProductAttributeDto.cs @@ -1,10 +1,11 @@ using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations; +using Volo.Abp.ObjectExtending; namespace EasyAbp.EShop.Products.Products.Dtos { - public class CreateUpdateProductAttributeDto + public class CreateUpdateProductAttributeDto : ExtensibleObject { [Required] [DisplayName("ProductAttributeDisplayName")] diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/CreateUpdateProductAttributeOptionDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/CreateUpdateProductAttributeOptionDto.cs index d20fdf57..9014622a 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/CreateUpdateProductAttributeOptionDto.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/CreateUpdateProductAttributeOptionDto.cs @@ -1,9 +1,10 @@ using System.ComponentModel; using System.ComponentModel.DataAnnotations; +using Volo.Abp.ObjectExtending; namespace EasyAbp.EShop.Products.Products.Dtos { - public class CreateUpdateProductAttributeOptionDto + public class CreateUpdateProductAttributeOptionDto: ExtensibleObject { [Required] [DisplayName("ProductAttributeOptionDisplayName")] diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/CreateUpdateProductDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/CreateUpdateProductDto.cs index f7799540..8b91d36b 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/CreateUpdateProductDto.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/CreateUpdateProductDto.cs @@ -3,10 +3,11 @@ using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Linq; +using Volo.Abp.ObjectExtending; namespace EasyAbp.EShop.Products.Products.Dtos { - public class CreateUpdateProductDto : IValidatableObject + public class CreateUpdateProductDto : ExtensibleObject { [DisplayName("ProductProductGroupName")] public string ProductGroupName { get; set; } @@ -44,8 +45,10 @@ namespace EasyAbp.EShop.Products.Products.Dtos [DisplayName("ProductIsPublished")] public bool IsPublished { get; set; } - public IEnumerable Validate(ValidationContext validationContext) + public override IEnumerable Validate(ValidationContext validationContext) { + base.Validate(validationContext); + if (ProductAttributes.Select(a => a.DisplayName.Trim()).Distinct().Count() != ProductAttributes.Count) { yield return new ValidationResult( diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/CreateUpdateProductSkuDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/CreateUpdateProductSkuDto.cs index 1ad43583..5d5f9ce7 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/CreateUpdateProductSkuDto.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/CreateUpdateProductSkuDto.cs @@ -2,10 +2,11 @@ using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations; +using Volo.Abp.ObjectExtending; namespace EasyAbp.EShop.Products.Products.Dtos { - public class UpdateProductSkuDto + public class UpdateProductSkuDto : ExtensibleObject { [DisplayName("ProductSkuName")] public string Name { get; set; } diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductAttributeDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductAttributeDto.cs index 7ad584e0..d8a47ca4 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductAttributeDto.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductAttributeDto.cs @@ -5,7 +5,7 @@ using Volo.Abp.Application.Dtos; namespace EasyAbp.EShop.Products.Products.Dtos { - public class ProductAttributeDto : FullAuditedEntityDto + public class ProductAttributeDto : ExtensibleFullAuditedEntityDto { [Required] public string DisplayName { get; set; } diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductAttributeOptionDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductAttributeOptionDto.cs index 0ba1c5dc..d3224279 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductAttributeOptionDto.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductAttributeOptionDto.cs @@ -4,7 +4,7 @@ using Volo.Abp.Application.Dtos; namespace EasyAbp.EShop.Products.Products.Dtos { - public class ProductAttributeOptionDto : FullAuditedEntityDto + public class ProductAttributeOptionDto : ExtensibleFullAuditedEntityDto { [Required] public string DisplayName { get; set; } diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductDto.cs index 01d3f9a1..c2e00d62 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductDto.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductDto.cs @@ -6,7 +6,7 @@ using Volo.Abp.Application.Dtos; namespace EasyAbp.EShop.Products.Products.Dtos { [Serializable] - public class ProductDto : FullAuditedEntityDto + public class ProductDto : ExtensibleFullAuditedEntityDto { public string ProductGroupName { get; set; } diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductSkuDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductSkuDto.cs index fdad70fc..b22d589e 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductSkuDto.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductSkuDto.cs @@ -4,7 +4,7 @@ using Volo.Abp.Application.Dtos; namespace EasyAbp.EShop.Products.Products.Dtos { - public class ProductSkuDto : FullAuditedEntityDto + public class ProductSkuDto : ExtensibleFullAuditedEntityDto { public List AttributeOptionIds { get; set; } diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductAttribute.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductAttribute.cs index aa3b22c0..da24f820 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductAttribute.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductAttribute.cs @@ -1,11 +1,12 @@ using System; using System.Collections.Generic; using JetBrains.Annotations; +using Volo.Abp.Data; using Volo.Abp.Domain.Entities.Auditing; namespace EasyAbp.EShop.Products.Products { - public class ProductAttribute : FullAuditedEntity, IProductAttribute + public class ProductAttribute : FullAuditedEntity, IProductAttribute, IHasExtraProperties { [NotNull] public virtual string DisplayName { get; protected set; } @@ -15,6 +16,8 @@ namespace EasyAbp.EShop.Products.Products public virtual int DisplayOrder { get; protected set; } + public virtual Dictionary ExtraProperties { get; protected set; } + public virtual List ProductAttributeOptions { get; protected set; } protected ProductAttribute() diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductAttributeOption.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductAttributeOption.cs index f754ff8d..4b4874dd 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductAttributeOption.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductAttributeOption.cs @@ -1,10 +1,12 @@ using System; +using System.Collections.Generic; using JetBrains.Annotations; +using Volo.Abp.Data; using Volo.Abp.Domain.Entities.Auditing; namespace EasyAbp.EShop.Products.Products { - public class ProductAttributeOption : FullAuditedEntity, IProductAttributeOption + public class ProductAttributeOption : FullAuditedEntity, IProductAttributeOption, IHasExtraProperties { [NotNull] public virtual string DisplayName { get; protected set; } @@ -14,6 +16,8 @@ namespace EasyAbp.EShop.Products.Products public virtual int DisplayOrder { get; protected set; } + public virtual Dictionary ExtraProperties { get; protected set; } + protected ProductAttributeOption() {} public ProductAttributeOption( diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductSku.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductSku.cs index d7fc2f0c..94fdb255 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductSku.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductSku.cs @@ -1,10 +1,12 @@ using System; +using System.Collections.Generic; using JetBrains.Annotations; +using Volo.Abp.Data; using Volo.Abp.Domain.Entities.Auditing; namespace EasyAbp.EShop.Products.Products { - public class ProductSku : FullAuditedEntity, IProductSku + public class ProductSku : FullAuditedEntity, IProductSku, IHasExtraProperties { [NotNull] public virtual string SerializedAttributeOptionIds { get; protected set; } @@ -25,6 +27,9 @@ namespace EasyAbp.EShop.Products.Products [CanBeNull] public virtual string MediaResources { get; protected set; } + + + public virtual Dictionary ExtraProperties { get; protected set; } public Guid? ProductDetailId { get; set; } diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/StoreOwners/Dtos/CreateUpdateStoreOwnerDto.cs b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/StoreOwners/Dtos/CreateUpdateStoreOwnerDto.cs index cfb77860..b0abb299 100644 --- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/StoreOwners/Dtos/CreateUpdateStoreOwnerDto.cs +++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/StoreOwners/Dtos/CreateUpdateStoreOwnerDto.cs @@ -1,10 +1,11 @@ using System; using System.ComponentModel.DataAnnotations; using EasyAbp.EShop.Stores.Stores; +using Volo.Abp.ObjectExtending; namespace EasyAbp.EShop.Stores.StoreOwners.Dtos { - public class CreateUpdateStoreOwnerDto : IMultiStore + public class CreateUpdateStoreOwnerDto : ExtensibleObject, IMultiStore { [Required] public Guid StoreId { get; set; } diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/Stores/Dtos/CreateUpdateStoreDto.cs b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/Stores/Dtos/CreateUpdateStoreDto.cs index 75b4e83c..d2f78266 100644 --- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/Stores/Dtos/CreateUpdateStoreDto.cs +++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/Stores/Dtos/CreateUpdateStoreDto.cs @@ -3,10 +3,11 @@ using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using Volo.Abp.Application.Dtos; +using Volo.Abp.ObjectExtending; namespace EasyAbp.EShop.Stores.Stores.Dtos { - public class CreateUpdateStoreDto + public class CreateUpdateStoreDto : ExtensibleObject { [Required] [DisplayName("StoreName")] diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/Transactions/Dtos/CreateUpdateTransactionDto.cs b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/Transactions/Dtos/CreateUpdateTransactionDto.cs index 19e17728..1ae5a02a 100644 --- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/Transactions/Dtos/CreateUpdateTransactionDto.cs +++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/Transactions/Dtos/CreateUpdateTransactionDto.cs @@ -1,9 +1,11 @@ using System; using System.ComponentModel; +using Volo.Abp.ObjectExtending; + namespace EasyAbp.EShop.Stores.Transactions.Dtos { [Serializable] - public class CreateUpdateTransactionDto + public class CreateUpdateTransactionDto : ExtensibleObject { public Guid StoreId { get; set; } diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/Transactions/Dtos/TransactionDto.cs b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/Transactions/Dtos/TransactionDto.cs index 9f19a611..a92a2bf7 100644 --- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/Transactions/Dtos/TransactionDto.cs +++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/Transactions/Dtos/TransactionDto.cs @@ -4,7 +4,7 @@ using Volo.Abp.Application.Dtos; namespace EasyAbp.EShop.Stores.Transactions.Dtos { [Serializable] - public class TransactionDto : CreationAuditedEntityDto + public class TransactionDto : ExtensibleCreationAuditedEntityDto { public Guid StoreId { get; set; } diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/EasyAbp/EShop/Plugins/Baskets/BasketItems/Dtos/BasketItemDto.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/EasyAbp/EShop/Plugins/Baskets/BasketItems/Dtos/BasketItemDto.cs index 4bab708c..45d44aa0 100644 --- a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/EasyAbp/EShop/Plugins/Baskets/BasketItems/Dtos/BasketItemDto.cs +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/EasyAbp/EShop/Plugins/Baskets/BasketItems/Dtos/BasketItemDto.cs @@ -4,7 +4,7 @@ using Volo.Abp.Application.Dtos; namespace EasyAbp.EShop.Plugins.Baskets.BasketItems.Dtos { [Serializable] - public class BasketItemDto : AuditedEntityDto + public class BasketItemDto : ExtensibleAuditedEntityDto { public string BasketName { get; set; } diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/EasyAbp/EShop/Plugins/Baskets/BasketItems/Dtos/CreateBasketItemDto.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/EasyAbp/EShop/Plugins/Baskets/BasketItems/Dtos/CreateBasketItemDto.cs index a65d50bf..ee6064ee 100644 --- a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/EasyAbp/EShop/Plugins/Baskets/BasketItems/Dtos/CreateBasketItemDto.cs +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/EasyAbp/EShop/Plugins/Baskets/BasketItems/Dtos/CreateBasketItemDto.cs @@ -2,11 +2,12 @@ using System; using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations; +using Volo.Abp.ObjectExtending; namespace EasyAbp.EShop.Plugins.Baskets.BasketItems.Dtos { [Serializable] - public class CreateBasketItemDto : IValidatableObject + public class CreateBasketItemDto : ExtensibleObject { public string BasketName { get; set; } = BasketsConsts.DefaultBasketName; @@ -23,8 +24,10 @@ namespace EasyAbp.EShop.Plugins.Baskets.BasketItems.Dtos public int Quantity { get; set; } - public new IEnumerable Validate(ValidationContext validationContext) + public override IEnumerable Validate(ValidationContext validationContext) { + base.Validate(validationContext); + if (Quantity <= 0) { yield return new ValidationResult( diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/EasyAbp/EShop/Plugins/Baskets/BasketItems/Dtos/UpdateBasketItemDto.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/EasyAbp/EShop/Plugins/Baskets/BasketItems/Dtos/UpdateBasketItemDto.cs index 5e7b2e05..bc10628d 100644 --- a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/EasyAbp/EShop/Plugins/Baskets/BasketItems/Dtos/UpdateBasketItemDto.cs +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/EasyAbp/EShop/Plugins/Baskets/BasketItems/Dtos/UpdateBasketItemDto.cs @@ -1,16 +1,19 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; +using Volo.Abp.ObjectExtending; namespace EasyAbp.EShop.Plugins.Baskets.BasketItems.Dtos { [Serializable] - public class UpdateBasketItemDto : IValidatableObject + public class UpdateBasketItemDto : ExtensibleObject { public int Quantity { get; set; } - public IEnumerable Validate(ValidationContext validationContext) + public override IEnumerable Validate(ValidationContext validationContext) { + base.Validate(validationContext); + if (Quantity <= 0) { yield return new ValidationResult(