427d2cce1d
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 6m45s
- Changed package purchase method from DirectPurchase to Manual in multiple command handlers to reflect new business logic. - Added Manual purchase method to PackagePurchaseMethod enum for clarity. - Introduced new RPC method GetCustomerPackagePurchaseRollup in Protobuf for summarizing customer package purchases. - Updated UserPackagePurchaseProfile and UserPackagePurchaseService to support new rollup functionality. - Bumped Protobuf project version to accommodate new features.
52 lines
1.8 KiB
C#
52 lines
1.8 KiB
C#
using CMSMicroservice.Domain.Enums;
|
|
|
|
namespace CMSMicroservice.Application.UserPackagePurchaseCQ.Queries.GetCustomerPackagePurchaseRollup;
|
|
|
|
public record GetCustomerPackagePurchaseRollupQuery : IRequest<GetCustomerPackagePurchaseRollupResponseDto>
|
|
{
|
|
public PaginationState? PaginationState { get; init; }
|
|
public GetCustomerPackagePurchaseRollupFilter? Filter { get; init; }
|
|
}
|
|
|
|
public class GetCustomerPackagePurchaseRollupFilter
|
|
{
|
|
public long? UserId { get; set; }
|
|
public PackagePurchaseMethod? PurchaseMethod { get; set; }
|
|
public DateTime? PurchasedFrom { get; set; }
|
|
public DateTime? PurchasedTo { get; set; }
|
|
}
|
|
|
|
public class GetCustomerPackagePurchaseRollupResponseDto
|
|
{
|
|
public MetaData MetaData { get; set; } = new();
|
|
public List<CustomerPackagePurchaseRollupModel> Models { get; set; } = new();
|
|
}
|
|
|
|
public class CustomerPackagePurchaseRollupModel
|
|
{
|
|
public long UserId { get; set; }
|
|
public string UserName { get; set; } = string.Empty;
|
|
public string UserMobile { get; set; } = string.Empty;
|
|
|
|
public long FirstPackageId { get; set; }
|
|
public string FirstPackageName { get; set; } = string.Empty;
|
|
public long FirstAmount { get; set; }
|
|
public DateTime FirstPurchasedAt { get; set; }
|
|
|
|
public long LastPackageId { get; set; }
|
|
public string LastPackageName { get; set; } = string.Empty;
|
|
public long LastAmount { get; set; }
|
|
public DateTime LastPurchasedAt { get; set; }
|
|
public PackagePurchaseMethod LastPurchaseMethod { get; set; }
|
|
|
|
public int PurchaseCount { get; set; }
|
|
public long TotalAmount { get; set; }
|
|
|
|
public int DayaCount { get; set; }
|
|
public long DayaAmount { get; set; }
|
|
public int ManualCount { get; set; }
|
|
public long ManualAmount { get; set; }
|
|
public int GatewayCount { get; set; }
|
|
public long GatewayAmount { get; set; }
|
|
}
|