Generator Changes at 9/28/2025 6:52:18 AM

This commit is contained in:
MeysamMoghaddam
2025-09-28 07:04:12 +03:30
parent dc0ba7a5ef
commit fffc7abcbb
6 changed files with 3 additions and 26 deletions

View File

@@ -8,6 +8,6 @@ public record VerifyOtpTokenCommand : IRequest<VerifyOtpTokenResponseDto>
//کد
public string Code { get; init; }
//کد معرف والد
public string ParentReferralCode { get; init; }
public string? ParentReferralCode { get; init; }
}

View File

@@ -9,8 +9,6 @@ public class VerifyOtpTokenCommandValidator : AbstractValidator<VerifyOtpTokenCo
.NotEmpty();
RuleFor(model => model.Code)
.NotEmpty();
RuleFor(model => model.ParentReferralCode)
.NotEmpty();
}
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
{

View File

@@ -4,7 +4,7 @@
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>0.0.112</Version>
<Version>0.0.113</Version>
<DebugType>None</DebugType>
<DebugSymbols>False</DebugSymbols>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>

View File

@@ -135,7 +135,7 @@ message VerifyOtpTokenRequest
string mobile = 1;
string purpose = 2;
string code = 3;
string parent_referral_code = 4;
google.protobuf.StringValue parent_referral_code = 4;
}
message VerifyOtpTokenResponse
{

View File

@@ -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);
};
}

View File

@@ -12,8 +12,6 @@ public class VerifyOtpTokenRequestValidator : AbstractValidator<VerifyOtpTokenRe
.NotEmpty();
RuleFor(model => model.Code)
.NotEmpty();
RuleFor(model => model.ParentReferralCode)
.NotEmpty();
}
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
{