Generator Changes at 11/16/2025 1:53:26 AM +03:30
This commit is contained in:
@@ -2,8 +2,10 @@ namespace FrontOffice.BFF.Application.UserCQ.Commands.AcceptContract;
|
||||
public record AcceptContractCommand : IRequest<Unit>
|
||||
{
|
||||
//کد otp
|
||||
public string? Code { get; init; }
|
||||
public string Code { get; init; }
|
||||
//فایل قرارداد
|
||||
public string? ContractHtml { get; init; }
|
||||
public string ContractHtml { get; init; }
|
||||
//شناسه یکتای امضا
|
||||
public string SignGuid { get; init; }
|
||||
|
||||
}
|
||||
@@ -3,6 +3,12 @@ public class AcceptContractCommandValidator : AbstractValidator<AcceptContractCo
|
||||
{
|
||||
public AcceptContractCommandValidator()
|
||||
{
|
||||
RuleFor(model => model.Code)
|
||||
.NotEmpty();
|
||||
RuleFor(model => model.ContractHtml)
|
||||
.NotEmpty();
|
||||
RuleFor(model => model.SignGuid)
|
||||
.NotEmpty();
|
||||
}
|
||||
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
|
||||
{
|
||||
|
||||
@@ -57,9 +57,6 @@ public class UserService : UserContract.UserContractBase
|
||||
return await _dispatchRequestToCQRS.Handle<SetPasswordForUserRequest, SetPasswordForUserCommand>(request, context);
|
||||
}
|
||||
public override async Task<Empty> CreateContractOtpToken(CreateContractOtpTokenRequest request, ServerCallContext context)
|
||||
{
|
||||
return await _dispatchRequestToCQRS.Handle<CreateContractOtpTokenRequest, CreateContractOtpTokenCommand>(request, context);
|
||||
}
|
||||
public override async Task<Empty> AcceptContract(AcceptContractRequest request, ServerCallContext context)
|
||||
{
|
||||
return await _dispatchRequestToCQRS.Handle<AcceptContractRequest, AcceptContractCommand>(request, context);
|
||||
|
||||
@@ -60,12 +60,6 @@ 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"
|
||||
@@ -200,14 +194,11 @@ 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;
|
||||
string code = 1;
|
||||
string contract_html = 2;
|
||||
string sign_guid = 3;
|
||||
}
|
||||
|
||||
message PaginationState
|
||||
|
||||
@@ -6,6 +6,12 @@ public class AcceptContractRequestValidator : AbstractValidator<AcceptContractRe
|
||||
{
|
||||
public AcceptContractRequestValidator()
|
||||
{
|
||||
RuleFor(model => model.Code)
|
||||
.NotEmpty();
|
||||
RuleFor(model => model.ContractHtml)
|
||||
.NotEmpty();
|
||||
RuleFor(model => model.SignGuid)
|
||||
.NotEmpty();
|
||||
}
|
||||
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user