Browse Source

Create IOrder and IOrderLine interfaces

pull/87/head v0.4.2
gdlcf88 6 years ago
parent
commit
db529ed189
  1. 2
      common.props
  2. 1
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp.EShop.Orders.Domain.Shared.csproj
  3. 4
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/EShopOrdersDomainSharedModule.cs
  4. 40
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/IOrder.cs
  5. 31
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/IOrderLine.cs
  6. 9
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/OrderEto.cs
  7. 2
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/OrderLineEto.cs
  8. 1
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp.EShop.Orders.Domain.csproj
  9. 5
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/EShopOrdersDomainModule.cs
  10. 3
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/Order.cs
  11. 2
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderLine.cs

2
common.props

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

1
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp.EShop.Orders.Domain.Shared.csproj

@ -9,6 +9,7 @@
<ItemGroup>
<PackageReference Include="Volo.Abp.Validation" Version="3.0.1" />
<ProjectReference Include="..\..\..\EasyAbp.EShop.Stores\src\EasyAbp.EShop.Stores.Domain.Shared\EasyAbp.EShop.Stores.Domain.Shared.csproj" />
</ItemGroup>
<ItemGroup>

4
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/EShopOrdersDomainSharedModule.cs

@ -1,6 +1,7 @@
using Volo.Abp.Modularity;
using Volo.Abp.Localization;
using EasyAbp.EShop.Orders.Localization;
using EasyAbp.EShop.Stores;
using Volo.Abp.Localization.ExceptionHandling;
using Volo.Abp.Validation;
using Volo.Abp.Validation.Localization;
@ -9,7 +10,8 @@ using Volo.Abp.VirtualFileSystem;
namespace EasyAbp.EShop.Orders
{
[DependsOn(
typeof(AbpValidationModule)
typeof(AbpValidationModule),
typeof(EShopStoresDomainSharedModule)
)]
public class EShopOrdersDomainSharedModule : AbpModule
{

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

@ -0,0 +1,40 @@
using System;
using EasyAbp.EShop.Stores.Stores;
namespace EasyAbp.EShop.Orders.Orders
{
public interface IOrder : IMultiStore
{
string OrderNumber { get; }
Guid CustomerUserId { get; }
OrderStatus OrderStatus { get; }
string Currency { get; }
decimal ProductTotalPrice { get; }
decimal TotalDiscount { get; }
decimal TotalPrice { get; }
decimal RefundedAmount { get; }
string CustomerRemark { get; }
string StaffRemark { get; }
Guid? PaymentId { get; }
DateTime? PaidTime { get; }
DateTime? CompletionTime { get; }
DateTime? CanceledTime { get; }
DateTime? ReducedInventoryAfterPlacingTime { get; }
DateTime? ReducedInventoryAfterPaymentTime { get; }
}
}

31
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/IOrderLine.cs

@ -0,0 +1,31 @@
using System;
namespace EasyAbp.EShop.Orders.Orders
{
public interface IOrderLine
{
Guid ProductId { get; }
Guid ProductSkuId { get; }
DateTime ProductModificationTime { get; }
DateTime ProductDetailModificationTime { get; }
string ProductName { get; }
string SkuDescription { get; }
string MediaResources { get; }
string Currency { get; }
decimal UnitPrice { get; }
decimal TotalPrice { get; }
decimal TotalDiscount { get; }
int Quantity { get; }
}
}

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

@ -1,10 +1,11 @@
using System;
using System.Collections.Generic;
using Volo.Abp.MultiTenancy;
namespace EasyAbp.EShop.Orders.Orders
{
[Serializable]
public class OrderEto
public class OrderEto : IOrder, IMultiTenant
{
public Guid Id { get; set; }
@ -31,12 +32,18 @@ namespace EasyAbp.EShop.Orders.Orders
public string CustomerRemark { get; set; }
public string StaffRemark { get; set; }
public Guid? PaymentId { get; }
public DateTime? PaidTime { get; set; }
public DateTime? CompletionTime { get; set; }
public DateTime? CanceledTime { get; set; }
public DateTime? ReducedInventoryAfterPlacingTime { get; }
public DateTime? ReducedInventoryAfterPaymentTime { get; }
public List<OrderLineEto> OrderLines { get; set; }
}

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

@ -3,7 +3,7 @@
namespace EasyAbp.EShop.Orders.Orders
{
[Serializable]
public class OrderLineEto
public class OrderLineEto : IOrderLine
{
public Guid Id { get; set; }

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

@ -13,7 +13,6 @@
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="3.0.1" />
<ProjectReference Include="..\..\..\EasyAbp.EShop.Payments\src\EasyAbp.EShop.Payments.Domain.Shared\EasyAbp.EShop.Payments.Domain.Shared.csproj" />
<ProjectReference Include="..\..\..\EasyAbp.EShop.Products\src\EasyAbp.EShop.Products.Domain.Shared\EasyAbp.EShop.Products.Domain.Shared.csproj" />
<ProjectReference Include="..\..\..\EasyAbp.EShop.Stores\src\EasyAbp.EShop.Stores.Domain.Shared\EasyAbp.EShop.Stores.Domain.Shared.csproj" />
<ProjectReference Include="..\EasyAbp.EShop.Orders.Domain.Shared\EasyAbp.EShop.Orders.Domain.Shared.csproj" />
</ItemGroup>

5
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/EShopOrdersDomainModule.cs

@ -10,9 +10,8 @@ namespace EasyAbp.EShop.Orders
{
[DependsOn(
typeof(AbpAutoMapperModule),
typeof(EShopOrdersDomainSharedModule),
typeof(EShopStoresDomainSharedModule)
)]
typeof(EShopOrdersDomainSharedModule)
)]
public class EShopOrdersDomainModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)

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

@ -1,13 +1,12 @@
using System;
using System.Collections.Generic;
using EasyAbp.EShop.Stores.Stores;
using JetBrains.Annotations;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;
namespace EasyAbp.EShop.Orders.Orders
{
public class Order : FullAuditedAggregateRoot<Guid>, IMultiTenant, IMultiStore
public class Order : FullAuditedAggregateRoot<Guid>, IOrder, IMultiTenant
{
public virtual Guid? TenantId { get; protected set; }

2
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderLine.cs

@ -4,7 +4,7 @@ using Volo.Abp.Domain.Entities.Auditing;
namespace EasyAbp.EShop.Orders.Orders
{
public class OrderLine : FullAuditedEntity<Guid>
public class OrderLine : FullAuditedEntity<Guid>, IOrderLine
{
public virtual Guid ProductId { get; protected set; }

Loading…
Cancel
Save