9185aa227d
- Added CurrentDiscountBalance and ChangeDiscountValue properties to GetCustomerWalletChangeLogResponseDto. - Updated userwallet.proto to include current_discount_balance and change_discount_value fields. - Enhanced CommissionProfile mapping to support GetMyCommissionPayouts requests and responses. - Implemented GetMyCommissionPayouts query and handler to retrieve user commission payouts. - Added validation for GetMyCommissionPayouts query. - Updated UserOrderService to handle user orders, including VAT calculations and wallet transactions. - Enhanced UserWalletService to include new properties in wallet change log responses.
26 lines
821 B
C#
26 lines
821 B
C#
using FluentValidation;
|
|
|
|
namespace CMSMicroservice.Application.CommissionCQ.Queries.GetMyCommissionPayouts;
|
|
|
|
public class GetMyCommissionPayoutsQueryValidator : AbstractValidator<GetMyCommissionPayoutsQuery>
|
|
{
|
|
public GetMyCommissionPayoutsQueryValidator()
|
|
{
|
|
RuleFor(x => x.PaginationState)
|
|
.NotNull()
|
|
.WithMessage("Pagination state is required");
|
|
|
|
When(x => x.PaginationState != null, () =>
|
|
{
|
|
RuleFor(x => x.PaginationState!.PageNumber)
|
|
.GreaterThan(0)
|
|
.WithMessage("Page number must be greater than 0");
|
|
|
|
RuleFor(x => x.PaginationState!.PageSize)
|
|
.GreaterThan(0)
|
|
.LessThanOrEqualTo(100)
|
|
.WithMessage("Page size must be between 1 and 100");
|
|
});
|
|
}
|
|
}
|