Generator Changes at 11/14/2025 3:36:13 PM +03:30

This commit is contained in:
masoodafar-web
2025-11-14 15:39:28 +03:30
parent 70da726cba
commit 1975fedfbf
10 changed files with 139 additions and 0 deletions

View File

@@ -60,6 +60,18 @@ service UserContract
body: "*"
};
};
rpc CreateContractOtpToken(CreateContractOtpTokenRequest) returns (google.protobuf.Empty){
option (google.api.http) = {
post: "/CreateContractOtpToken"
body: "*"
};
};
rpc AcceptContract(AcceptContractRequest) returns (google.protobuf.Empty){
option (google.api.http) = {
post: "/AcceptContract"
body: "*"
};
};
}
message UpdateUserRequest
{
@@ -188,6 +200,15 @@ message SetPasswordForUserRequest
string new_password = 2;
string confirm_password = 3;
}
message CreateContractOtpTokenRequest
{
google.protobuf.StringValue cotract_guid = 1;
}
message AcceptContractRequest
{
google.protobuf.StringValue code = 1;
google.protobuf.StringValue contract_html = 2;
}
message PaginationState
{

View File

@@ -0,0 +1,17 @@
using FluentValidation;
using FrontOfficeMicroservice.Protobuf.Protos.User;
namespace FrontOfficeMicroservice.Protobuf.Validator.User;
public class AcceptContractRequestValidator : AbstractValidator<AcceptContractRequest>
{
public AcceptContractRequestValidator()
{
}
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
{
var result = await ValidateAsync(ValidationContext<AcceptContractRequest>.CreateWithOptions((AcceptContractRequest)model, x => x.IncludeProperties(propertyName)));
if (result.IsValid)
return Array.Empty<string>();
return result.Errors.Select(e => e.ErrorMessage);
};
}

View File

@@ -0,0 +1,17 @@
using FluentValidation;
using FrontOfficeMicroservice.Protobuf.Protos.User;
namespace FrontOfficeMicroservice.Protobuf.Validator.User;
public class CreateContractOtpTokenRequestValidator : AbstractValidator<CreateContractOtpTokenRequest>
{
public CreateContractOtpTokenRequestValidator()
{
}
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
{
var result = await ValidateAsync(ValidationContext<CreateContractOtpTokenRequest>.CreateWithOptions((CreateContractOtpTokenRequest)model, x => x.IncludeProperties(propertyName)));
if (result.IsValid)
return Array.Empty<string>();
return result.Errors.Select(e => e.ErrorMessage);
};
}