Generator Changes at 9/28/2025 6:52:18 AM
This commit is contained in:
@@ -8,6 +8,6 @@ public record VerifyOtpTokenCommand : IRequest<VerifyOtpTokenResponseDto>
|
|||||||
//کد
|
//کد
|
||||||
public string Code { get; init; }
|
public string Code { get; init; }
|
||||||
//کد معرف والد
|
//کد معرف والد
|
||||||
public string ParentReferralCode { get; init; }
|
public string? ParentReferralCode { get; init; }
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -9,8 +9,6 @@ public class VerifyOtpTokenCommandValidator : AbstractValidator<VerifyOtpTokenCo
|
|||||||
.NotEmpty();
|
.NotEmpty();
|
||||||
RuleFor(model => model.Code)
|
RuleFor(model => model.Code)
|
||||||
.NotEmpty();
|
.NotEmpty();
|
||||||
RuleFor(model => model.ParentReferralCode)
|
|
||||||
.NotEmpty();
|
|
||||||
}
|
}
|
||||||
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
|
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<Version>0.0.112</Version>
|
<Version>0.0.113</Version>
|
||||||
<DebugType>None</DebugType>
|
<DebugType>None</DebugType>
|
||||||
<DebugSymbols>False</DebugSymbols>
|
<DebugSymbols>False</DebugSymbols>
|
||||||
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
|
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ message VerifyOtpTokenRequest
|
|||||||
string mobile = 1;
|
string mobile = 1;
|
||||||
string purpose = 2;
|
string purpose = 2;
|
||||||
string code = 3;
|
string code = 3;
|
||||||
string parent_referral_code = 4;
|
google.protobuf.StringValue parent_referral_code = 4;
|
||||||
}
|
}
|
||||||
message VerifyOtpTokenResponse
|
message VerifyOtpTokenResponse
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
using FluentValidation;
|
|
||||||
using FrontOffice.BFF.User.Protobuf.Protos.User;
|
|
||||||
namespace FrontOffice.BFF.User.Protobuf.Validator;
|
|
||||||
|
|
||||||
public class GetUserRequestValidator : AbstractValidator<GetUserRequest>
|
|
||||||
{
|
|
||||||
public GetUserRequestValidator()
|
|
||||||
{
|
|
||||||
RuleFor(model => model.Id)
|
|
||||||
.NotNull();
|
|
||||||
}
|
|
||||||
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
|
|
||||||
{
|
|
||||||
var result = await ValidateAsync(ValidationContext<GetUserRequest>.CreateWithOptions((GetUserRequest)model, x => x.IncludeProperties(propertyName)));
|
|
||||||
if (result.IsValid)
|
|
||||||
return Array.Empty<string>();
|
|
||||||
return result.Errors.Select(e => e.ErrorMessage);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -12,8 +12,6 @@ public class VerifyOtpTokenRequestValidator : AbstractValidator<VerifyOtpTokenRe
|
|||||||
.NotEmpty();
|
.NotEmpty();
|
||||||
RuleFor(model => model.Code)
|
RuleFor(model => model.Code)
|
||||||
.NotEmpty();
|
.NotEmpty();
|
||||||
RuleFor(model => model.ParentReferralCode)
|
|
||||||
.NotEmpty();
|
|
||||||
}
|
}
|
||||||
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
|
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user