feat: add manual membership payment and update commission queries
Build and Deploy / build (push) Successful in 2m29s
Build and Deploy / build (push) Successful in 2m29s
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
namespace BackOffice.BFF.Application.CommissionCQ.Queries.GetUserPayouts;
|
||||
|
||||
public class GetUserPayoutsQueryValidator : AbstractValidator<GetUserPayoutsQuery>
|
||||
{
|
||||
public GetUserPayoutsQueryValidator()
|
||||
{
|
||||
RuleFor(x => x.PaginationState)
|
||||
.NotNull()
|
||||
.WithMessage("موقعیت صفحهبندی الزامی است");
|
||||
|
||||
When(x => x.Filter != null, () =>
|
||||
{
|
||||
RuleFor(x => x.Filter!.UserId)
|
||||
.GreaterThan(0)
|
||||
.When(x => x.Filter!.UserId.HasValue)
|
||||
.WithMessage("شناسه کاربر معتبر نیست");
|
||||
|
||||
RuleFor(x => x.Filter!.WeekNumber)
|
||||
.Matches(@"^\d{4}-W\d{2}$")
|
||||
.When(x => !string.IsNullOrWhiteSpace(x.Filter!.WeekNumber))
|
||||
.WithMessage("فرمت شماره هفته باید به صورت YYYY-Www باشد (مثال: 2025-W48)");
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user