feat: add hall and seat proto

This commit is contained in:
Sergey Krylov 2026-04-18 08:35:24 +03:00
parent a735405b7e
commit bb9ff65861
3 changed files with 86 additions and 0 deletions

49
proto/hall.proto Normal file
View File

@ -0,0 +1,49 @@
syntax = "proto3";
package hall.v1;
service HallService {
rpc CreateHall (CreateHallRequest) returns (CreateHallResponse);
rpc GetHall (GetHallRequest) returns (GetHallResponse);
rpc ListHallsByTheater (ListHallsByTheaterRequest) returns (ListHallsByTheaterResponse);
}
message CreateHallRequest {
string name = 1;
string theater_id = 2;
repeated RowLayout layout = 3;
}
message CreateHallResponse {
Hall hall = 1;
}
message ListHallsByTheaterRequest {
string theater_id = 1;
}
message ListHallsByTheaterResponse {
repeated Hall halls = 1;
}
message GetHallRequest {
string id = 1;
}
message GetHallResponse {
Hall hall = 1;
}
message Hall {
string id = 1;
string name = 2;
string theater_id = 3;
repeated RowLayout layout = 4;
}
message RowLayout {
int32 row = 1;
int32 columns = 2;
string type = 3;
int32 price = 4;
}

33
proto/seat.proto Normal file
View File

@ -0,0 +1,33 @@
syntax = "proto3";
package seat.v1;
service SeatService {
rpc GetSeat (GetSeatRequest) returns (GetSeatResponse);
rpc ListSeatsByHall (ListSeatsByHallRequest) returns (ListSeatsByHallResponse);
}
message GetSeatRequest {
string id = 1;
}
message GetSeatResponse {
Seat seat = 1;
}
message ListSeatsByHallRequest {
string hall_id = 1;
string screening_id = 2;
}
message ListSeatsByHallResponse {
repeated Seat seats = 1;
}
message Seat {
string id = 1;
int32 row = 2;
int32 number = 3;
int32 price = 4;
string status = 5;
string type = 6;
string hall_id = 7;
}

View File

@ -36,4 +36,8 @@ export const PROTO_PATHS = {
CATEGORY: join(__dirname, '../../proto/category.proto'), CATEGORY: join(__dirname, '../../proto/category.proto'),
/** Путь к `theater.proto` (пакет `theater.v1`) */ /** Путь к `theater.proto` (пакет `theater.v1`) */
THEATER: join(__dirname, '../../proto/theater.proto'), THEATER: join(__dirname, '../../proto/theater.proto'),
/** Путь к `hall.proto` (пакет `hall.v1`) */
HALL: join(__dirname, '../../proto/hall.proto'),
/** Путь к `seat.proto` (пакет `seat.v1`) */
SEAT: join(__dirname, '../../proto/seat.proto'),
} as const } as const