add get ticket

This commit is contained in:
2026-09-18 16:14:56 +07:00
parent 1be16d706e
commit 22250cb68e
9 changed files with 727 additions and 187 deletions
+30
View File
@@ -528,6 +528,17 @@ service EveningDetectiveServer {
};
}
rpc GetTicket(GetTicketReq) returns (GetTicketRsp) {
option (google.api.http) = {
get: "/api/tickets/{token}"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
security: { security_requirement: {} }
tags: "Билеты";
summary: "Получить данные билета";
};
}
// Создать сессию экрана. Экран получает токен и показывает QR для привязки.
rpc CreateScreenSession(CreateScreenSessionReq) returns (CreateScreenSessionRsp) {
option (google.api.http) = {
@@ -1891,3 +1902,22 @@ message Ticket {
int32 id = 1;
string url = 2;
}
message GetTicketReq {
string token = 1;
}
message GetTicketRsp {
string error = 1;
TicketPage ticket = 2;
}
message TicketPage {
int32 id = 1;
string game_name = 2;
google.protobuf.Timestamp start_at = 3;
string location = 4;
string status = 5;
string game_status = 6;
optional google.protobuf.Timestamp used_at = 7;
}