Files
smart-search-back/api/proto/invite/invite.proto
vallyenfail e2968722ed
Some checks failed
Deploy Smart Search Backend / deploy (push) Failing after 1m54s
add service
2026-01-17 20:41:37 +03:00

37 lines
796 B
Protocol Buffer

syntax = "proto3";
package invite;
option go_package = "git.techease.ru/Smart-search/smart-search-back/pkg/pb/invite";
import "google/protobuf/timestamp.proto";
service InviteService {
rpc Generate(GenerateRequest) returns (GenerateResponse);
rpc GetInfo(GetInfoRequest) returns (GetInfoResponse);
}
message GenerateRequest {
int64 user_id = 1;
int32 ttl_days = 2;
int32 max_uses = 3;
}
message GenerateResponse {
string code = 1;
int32 max_uses = 2;
google.protobuf.Timestamp expires_at = 3;
}
message GetInfoRequest {
string code = 1;
}
message GetInfoResponse {
string code = 1;
int64 user_id = 2;
int32 can_be_used_count = 3;
int32 used_count = 4;
google.protobuf.Timestamp expires_at = 5;
bool is_active = 6;
google.protobuf.Timestamp created_at = 7;
}