add service
This commit is contained in:
61
api/proto/request/request.proto
Normal file
61
api/proto/request/request.proto
Normal file
@@ -0,0 +1,61 @@
|
||||
syntax = "proto3";
|
||||
package request;
|
||||
option go_package = "github.com/smart-search-gateway/api/proto/request/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;
|
||||
}
|
||||
Reference in New Issue
Block a user