62 lines
1.3 KiB
Protocol Buffer
62 lines
1.3 KiB
Protocol Buffer
syntax = "proto3";
|
|
package request;
|
|
option go_package = "git.techease.ru/Smart-search/smart-search-back/pkg/pb/request";
|
|
|
|
import "google/protobuf/timestamp.proto";
|
|
|
|
service RequestService {
|
|
rpc CreateTZ(CreateTZRequest) returns (CreateTZResponse);
|
|
rpc ApproveTZ(ApproveTZRequest) returns (ApproveTZResponse);
|
|
rpc GetMailingList(GetMailingListRequest) returns (GetMailingListResponse);
|
|
rpc GetMailingListByID(GetMailingListByIDRequest) returns (GetMailingListByIDResponse);
|
|
}
|
|
|
|
message CreateTZRequest {
|
|
int64 user_id = 1;
|
|
string request_txt = 2;
|
|
bytes file_data = 3;
|
|
string file_name = 4;
|
|
}
|
|
|
|
message CreateTZResponse {
|
|
string request_id = 1;
|
|
string tz_text = 2;
|
|
}
|
|
|
|
message ApproveTZRequest {
|
|
string request_id = 1;
|
|
string final_tz = 2;
|
|
int64 user_id = 3;
|
|
}
|
|
|
|
message ApproveTZResponse {
|
|
bool success = 1;
|
|
string mailing_status = 2;
|
|
}
|
|
|
|
message GetMailingListRequest {
|
|
int64 user_id = 1;
|
|
}
|
|
|
|
message GetMailingListResponse {
|
|
repeated MailingItem items = 1;
|
|
}
|
|
|
|
message GetMailingListByIDRequest {
|
|
string request_id = 1;
|
|
int64 user_id = 2;
|
|
}
|
|
|
|
message GetMailingListByIDResponse {
|
|
MailingItem item = 1;
|
|
}
|
|
|
|
message MailingItem {
|
|
string request_id = 1;
|
|
string request_txt = 2;
|
|
string final_tz = 3;
|
|
string mailing_status = 4;
|
|
google.protobuf.Timestamp created_at = 5;
|
|
int32 suppliers_found = 6;
|
|
}
|