@babacarthiamdev/contracts 1.0.26 → 1.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/proto/paths.d.ts +2 -0
- package/dist/proto/paths.js +3 -1
- package/gen/hall.ts +480 -0
- package/gen/seat.ts +339 -0
- package/gen/theater.ts +22 -20
- package/package.json +1 -1
- package/proto/hall.proto +51 -0
- package/proto/seat.proto +35 -0
- package/proto/theater.proto +4 -4
package/dist/proto/paths.d.ts
CHANGED
package/dist/proto/paths.js
CHANGED
|
@@ -9,5 +9,7 @@ exports.PROTO_PATHS = {
|
|
|
9
9
|
MEDIA: (0, node_path_1.join)(__dirname, '../../proto/media.proto'),
|
|
10
10
|
MOVIES: (0, node_path_1.join)(__dirname, '../../proto/movies.proto'),
|
|
11
11
|
CATEGORY: (0, node_path_1.join)(__dirname, '../../proto/category.proto'),
|
|
12
|
-
THEATER: (0, node_path_1.join)(__dirname, '../../proto/theater.proto')
|
|
12
|
+
THEATER: (0, node_path_1.join)(__dirname, '../../proto/theater.proto'),
|
|
13
|
+
HALL: (0, node_path_1.join)(__dirname, '../../proto/hall.proto'),
|
|
14
|
+
SEAT: (0, node_path_1.join)(__dirname, '../../proto/seat.proto'),
|
|
13
15
|
};
|
package/gen/hall.ts
ADDED
|
@@ -0,0 +1,480 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.10.1
|
|
4
|
+
// protoc v3.21.12
|
|
5
|
+
// source: hall.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
9
|
+
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
10
|
+
import { Observable } from "rxjs";
|
|
11
|
+
|
|
12
|
+
export const protobufPackage = "hall.v1";
|
|
13
|
+
|
|
14
|
+
export interface CreateHallRequest {
|
|
15
|
+
name: string;
|
|
16
|
+
theaterId: string;
|
|
17
|
+
layout: RowLayout[];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface CreateHallResponse {
|
|
21
|
+
hall: Hall | undefined;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface GetHallRequest {
|
|
25
|
+
id: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface GetHallResponse {
|
|
29
|
+
hall: Hall | undefined;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface ListHallsRequest {
|
|
33
|
+
theaterId: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface ListHallsResponse {
|
|
37
|
+
hall: Hall[];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface Hall {
|
|
41
|
+
id: string;
|
|
42
|
+
name: string;
|
|
43
|
+
theaterId: string;
|
|
44
|
+
layout: RowLayout[];
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface RowLayout {
|
|
48
|
+
row: number;
|
|
49
|
+
columns: number;
|
|
50
|
+
type: string;
|
|
51
|
+
price: number;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export const HALL_V1_PACKAGE_NAME = "hall.v1";
|
|
55
|
+
|
|
56
|
+
function createBaseCreateHallRequest(): CreateHallRequest {
|
|
57
|
+
return { name: "", theaterId: "", layout: [] };
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export const CreateHallRequest: MessageFns<CreateHallRequest> = {
|
|
61
|
+
encode(message: CreateHallRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
62
|
+
if (message.name !== "") {
|
|
63
|
+
writer.uint32(10).string(message.name);
|
|
64
|
+
}
|
|
65
|
+
if (message.theaterId !== "") {
|
|
66
|
+
writer.uint32(18).string(message.theaterId);
|
|
67
|
+
}
|
|
68
|
+
for (const v of message.layout) {
|
|
69
|
+
RowLayout.encode(v!, writer.uint32(26).fork()).join();
|
|
70
|
+
}
|
|
71
|
+
return writer;
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
decode(input: BinaryReader | Uint8Array, length?: number): CreateHallRequest {
|
|
75
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
76
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
77
|
+
const message = createBaseCreateHallRequest();
|
|
78
|
+
while (reader.pos < end) {
|
|
79
|
+
const tag = reader.uint32();
|
|
80
|
+
switch (tag >>> 3) {
|
|
81
|
+
case 1: {
|
|
82
|
+
if (tag !== 10) {
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
message.name = reader.string();
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
89
|
+
case 2: {
|
|
90
|
+
if (tag !== 18) {
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
message.theaterId = reader.string();
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
case 3: {
|
|
98
|
+
if (tag !== 26) {
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
message.layout.push(RowLayout.decode(reader, reader.uint32()));
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
reader.skip(tag & 7);
|
|
110
|
+
}
|
|
111
|
+
return message;
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
function createBaseCreateHallResponse(): CreateHallResponse {
|
|
116
|
+
return { hall: undefined };
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export const CreateHallResponse: MessageFns<CreateHallResponse> = {
|
|
120
|
+
encode(message: CreateHallResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
121
|
+
if (message.hall !== undefined) {
|
|
122
|
+
Hall.encode(message.hall, writer.uint32(10).fork()).join();
|
|
123
|
+
}
|
|
124
|
+
return writer;
|
|
125
|
+
},
|
|
126
|
+
|
|
127
|
+
decode(input: BinaryReader | Uint8Array, length?: number): CreateHallResponse {
|
|
128
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
129
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
130
|
+
const message = createBaseCreateHallResponse();
|
|
131
|
+
while (reader.pos < end) {
|
|
132
|
+
const tag = reader.uint32();
|
|
133
|
+
switch (tag >>> 3) {
|
|
134
|
+
case 1: {
|
|
135
|
+
if (tag !== 10) {
|
|
136
|
+
break;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
message.hall = Hall.decode(reader, reader.uint32());
|
|
140
|
+
continue;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
146
|
+
reader.skip(tag & 7);
|
|
147
|
+
}
|
|
148
|
+
return message;
|
|
149
|
+
},
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
function createBaseGetHallRequest(): GetHallRequest {
|
|
153
|
+
return { id: "" };
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export const GetHallRequest: MessageFns<GetHallRequest> = {
|
|
157
|
+
encode(message: GetHallRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
158
|
+
if (message.id !== "") {
|
|
159
|
+
writer.uint32(10).string(message.id);
|
|
160
|
+
}
|
|
161
|
+
return writer;
|
|
162
|
+
},
|
|
163
|
+
|
|
164
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GetHallRequest {
|
|
165
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
166
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
167
|
+
const message = createBaseGetHallRequest();
|
|
168
|
+
while (reader.pos < end) {
|
|
169
|
+
const tag = reader.uint32();
|
|
170
|
+
switch (tag >>> 3) {
|
|
171
|
+
case 1: {
|
|
172
|
+
if (tag !== 10) {
|
|
173
|
+
break;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
message.id = reader.string();
|
|
177
|
+
continue;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
181
|
+
break;
|
|
182
|
+
}
|
|
183
|
+
reader.skip(tag & 7);
|
|
184
|
+
}
|
|
185
|
+
return message;
|
|
186
|
+
},
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
function createBaseGetHallResponse(): GetHallResponse {
|
|
190
|
+
return { hall: undefined };
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export const GetHallResponse: MessageFns<GetHallResponse> = {
|
|
194
|
+
encode(message: GetHallResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
195
|
+
if (message.hall !== undefined) {
|
|
196
|
+
Hall.encode(message.hall, writer.uint32(10).fork()).join();
|
|
197
|
+
}
|
|
198
|
+
return writer;
|
|
199
|
+
},
|
|
200
|
+
|
|
201
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GetHallResponse {
|
|
202
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
203
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
204
|
+
const message = createBaseGetHallResponse();
|
|
205
|
+
while (reader.pos < end) {
|
|
206
|
+
const tag = reader.uint32();
|
|
207
|
+
switch (tag >>> 3) {
|
|
208
|
+
case 1: {
|
|
209
|
+
if (tag !== 10) {
|
|
210
|
+
break;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
message.hall = Hall.decode(reader, reader.uint32());
|
|
214
|
+
continue;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
218
|
+
break;
|
|
219
|
+
}
|
|
220
|
+
reader.skip(tag & 7);
|
|
221
|
+
}
|
|
222
|
+
return message;
|
|
223
|
+
},
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
function createBaseListHallsRequest(): ListHallsRequest {
|
|
227
|
+
return { theaterId: "" };
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export const ListHallsRequest: MessageFns<ListHallsRequest> = {
|
|
231
|
+
encode(message: ListHallsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
232
|
+
if (message.theaterId !== "") {
|
|
233
|
+
writer.uint32(10).string(message.theaterId);
|
|
234
|
+
}
|
|
235
|
+
return writer;
|
|
236
|
+
},
|
|
237
|
+
|
|
238
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ListHallsRequest {
|
|
239
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
240
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
241
|
+
const message = createBaseListHallsRequest();
|
|
242
|
+
while (reader.pos < end) {
|
|
243
|
+
const tag = reader.uint32();
|
|
244
|
+
switch (tag >>> 3) {
|
|
245
|
+
case 1: {
|
|
246
|
+
if (tag !== 10) {
|
|
247
|
+
break;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
message.theaterId = reader.string();
|
|
251
|
+
continue;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
255
|
+
break;
|
|
256
|
+
}
|
|
257
|
+
reader.skip(tag & 7);
|
|
258
|
+
}
|
|
259
|
+
return message;
|
|
260
|
+
},
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
function createBaseListHallsResponse(): ListHallsResponse {
|
|
264
|
+
return { hall: [] };
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export const ListHallsResponse: MessageFns<ListHallsResponse> = {
|
|
268
|
+
encode(message: ListHallsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
269
|
+
for (const v of message.hall) {
|
|
270
|
+
Hall.encode(v!, writer.uint32(10).fork()).join();
|
|
271
|
+
}
|
|
272
|
+
return writer;
|
|
273
|
+
},
|
|
274
|
+
|
|
275
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ListHallsResponse {
|
|
276
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
277
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
278
|
+
const message = createBaseListHallsResponse();
|
|
279
|
+
while (reader.pos < end) {
|
|
280
|
+
const tag = reader.uint32();
|
|
281
|
+
switch (tag >>> 3) {
|
|
282
|
+
case 1: {
|
|
283
|
+
if (tag !== 10) {
|
|
284
|
+
break;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
message.hall.push(Hall.decode(reader, reader.uint32()));
|
|
288
|
+
continue;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
292
|
+
break;
|
|
293
|
+
}
|
|
294
|
+
reader.skip(tag & 7);
|
|
295
|
+
}
|
|
296
|
+
return message;
|
|
297
|
+
},
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
function createBaseHall(): Hall {
|
|
301
|
+
return { id: "", name: "", theaterId: "", layout: [] };
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
export const Hall: MessageFns<Hall> = {
|
|
305
|
+
encode(message: Hall, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
306
|
+
if (message.id !== "") {
|
|
307
|
+
writer.uint32(10).string(message.id);
|
|
308
|
+
}
|
|
309
|
+
if (message.name !== "") {
|
|
310
|
+
writer.uint32(18).string(message.name);
|
|
311
|
+
}
|
|
312
|
+
if (message.theaterId !== "") {
|
|
313
|
+
writer.uint32(26).string(message.theaterId);
|
|
314
|
+
}
|
|
315
|
+
for (const v of message.layout) {
|
|
316
|
+
RowLayout.encode(v!, writer.uint32(34).fork()).join();
|
|
317
|
+
}
|
|
318
|
+
return writer;
|
|
319
|
+
},
|
|
320
|
+
|
|
321
|
+
decode(input: BinaryReader | Uint8Array, length?: number): Hall {
|
|
322
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
323
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
324
|
+
const message = createBaseHall();
|
|
325
|
+
while (reader.pos < end) {
|
|
326
|
+
const tag = reader.uint32();
|
|
327
|
+
switch (tag >>> 3) {
|
|
328
|
+
case 1: {
|
|
329
|
+
if (tag !== 10) {
|
|
330
|
+
break;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
message.id = reader.string();
|
|
334
|
+
continue;
|
|
335
|
+
}
|
|
336
|
+
case 2: {
|
|
337
|
+
if (tag !== 18) {
|
|
338
|
+
break;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
message.name = reader.string();
|
|
342
|
+
continue;
|
|
343
|
+
}
|
|
344
|
+
case 3: {
|
|
345
|
+
if (tag !== 26) {
|
|
346
|
+
break;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
message.theaterId = reader.string();
|
|
350
|
+
continue;
|
|
351
|
+
}
|
|
352
|
+
case 4: {
|
|
353
|
+
if (tag !== 34) {
|
|
354
|
+
break;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
message.layout.push(RowLayout.decode(reader, reader.uint32()));
|
|
358
|
+
continue;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
362
|
+
break;
|
|
363
|
+
}
|
|
364
|
+
reader.skip(tag & 7);
|
|
365
|
+
}
|
|
366
|
+
return message;
|
|
367
|
+
},
|
|
368
|
+
};
|
|
369
|
+
|
|
370
|
+
function createBaseRowLayout(): RowLayout {
|
|
371
|
+
return { row: 0, columns: 0, type: "", price: 0 };
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
export const RowLayout: MessageFns<RowLayout> = {
|
|
375
|
+
encode(message: RowLayout, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
376
|
+
if (message.row !== 0) {
|
|
377
|
+
writer.uint32(8).int32(message.row);
|
|
378
|
+
}
|
|
379
|
+
if (message.columns !== 0) {
|
|
380
|
+
writer.uint32(16).int32(message.columns);
|
|
381
|
+
}
|
|
382
|
+
if (message.type !== "") {
|
|
383
|
+
writer.uint32(26).string(message.type);
|
|
384
|
+
}
|
|
385
|
+
if (message.price !== 0) {
|
|
386
|
+
writer.uint32(32).int32(message.price);
|
|
387
|
+
}
|
|
388
|
+
return writer;
|
|
389
|
+
},
|
|
390
|
+
|
|
391
|
+
decode(input: BinaryReader | Uint8Array, length?: number): RowLayout {
|
|
392
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
393
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
394
|
+
const message = createBaseRowLayout();
|
|
395
|
+
while (reader.pos < end) {
|
|
396
|
+
const tag = reader.uint32();
|
|
397
|
+
switch (tag >>> 3) {
|
|
398
|
+
case 1: {
|
|
399
|
+
if (tag !== 8) {
|
|
400
|
+
break;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
message.row = reader.int32();
|
|
404
|
+
continue;
|
|
405
|
+
}
|
|
406
|
+
case 2: {
|
|
407
|
+
if (tag !== 16) {
|
|
408
|
+
break;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
message.columns = reader.int32();
|
|
412
|
+
continue;
|
|
413
|
+
}
|
|
414
|
+
case 3: {
|
|
415
|
+
if (tag !== 26) {
|
|
416
|
+
break;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
message.type = reader.string();
|
|
420
|
+
continue;
|
|
421
|
+
}
|
|
422
|
+
case 4: {
|
|
423
|
+
if (tag !== 32) {
|
|
424
|
+
break;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
message.price = reader.int32();
|
|
428
|
+
continue;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
432
|
+
break;
|
|
433
|
+
}
|
|
434
|
+
reader.skip(tag & 7);
|
|
435
|
+
}
|
|
436
|
+
return message;
|
|
437
|
+
},
|
|
438
|
+
};
|
|
439
|
+
|
|
440
|
+
export interface HallServiceClient {
|
|
441
|
+
createHall(request: CreateHallRequest): Observable<CreateHallResponse>;
|
|
442
|
+
|
|
443
|
+
getHall(request: GetHallRequest): Observable<GetHallResponse>;
|
|
444
|
+
|
|
445
|
+
listHallsByTheater(request: ListHallsRequest): Observable<ListHallsResponse>;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
export interface HallServiceController {
|
|
449
|
+
createHall(
|
|
450
|
+
request: CreateHallRequest,
|
|
451
|
+
): Promise<CreateHallResponse> | Observable<CreateHallResponse> | CreateHallResponse;
|
|
452
|
+
|
|
453
|
+
getHall(request: GetHallRequest): Promise<GetHallResponse> | Observable<GetHallResponse> | GetHallResponse;
|
|
454
|
+
|
|
455
|
+
listHallsByTheater(
|
|
456
|
+
request: ListHallsRequest,
|
|
457
|
+
): Promise<ListHallsResponse> | Observable<ListHallsResponse> | ListHallsResponse;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
export function HallServiceControllerMethods() {
|
|
461
|
+
return function (constructor: Function) {
|
|
462
|
+
const grpcMethods: string[] = ["createHall", "getHall", "listHallsByTheater"];
|
|
463
|
+
for (const method of grpcMethods) {
|
|
464
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
465
|
+
GrpcMethod("HallService", method)(constructor.prototype[method], method, descriptor);
|
|
466
|
+
}
|
|
467
|
+
const grpcStreamMethods: string[] = [];
|
|
468
|
+
for (const method of grpcStreamMethods) {
|
|
469
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
470
|
+
GrpcStreamMethod("HallService", method)(constructor.prototype[method], method, descriptor);
|
|
471
|
+
}
|
|
472
|
+
};
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
export const HALL_SERVICE_NAME = "HallService";
|
|
476
|
+
|
|
477
|
+
export interface MessageFns<T> {
|
|
478
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
479
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
480
|
+
}
|
package/gen/seat.ts
ADDED
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.10.1
|
|
4
|
+
// protoc v3.21.12
|
|
5
|
+
// source: seat.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
9
|
+
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
10
|
+
import { Observable } from "rxjs";
|
|
11
|
+
|
|
12
|
+
export const protobufPackage = "seat.v1";
|
|
13
|
+
|
|
14
|
+
export interface GetSeatRequest {
|
|
15
|
+
id: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface GetSeatResponse {
|
|
19
|
+
seat: Seat | undefined;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface ListSeatsRequest {
|
|
23
|
+
hallId: string;
|
|
24
|
+
screeningId: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface ListSeatsResponse {
|
|
28
|
+
seat: Seat[];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface Seat {
|
|
32
|
+
id: string;
|
|
33
|
+
row: number;
|
|
34
|
+
number: number;
|
|
35
|
+
price: number;
|
|
36
|
+
status: string;
|
|
37
|
+
type: string;
|
|
38
|
+
hallId: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export const SEAT_V1_PACKAGE_NAME = "seat.v1";
|
|
42
|
+
|
|
43
|
+
function createBaseGetSeatRequest(): GetSeatRequest {
|
|
44
|
+
return { id: "" };
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export const GetSeatRequest: MessageFns<GetSeatRequest> = {
|
|
48
|
+
encode(message: GetSeatRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
49
|
+
if (message.id !== "") {
|
|
50
|
+
writer.uint32(10).string(message.id);
|
|
51
|
+
}
|
|
52
|
+
return writer;
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GetSeatRequest {
|
|
56
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
57
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
58
|
+
const message = createBaseGetSeatRequest();
|
|
59
|
+
while (reader.pos < end) {
|
|
60
|
+
const tag = reader.uint32();
|
|
61
|
+
switch (tag >>> 3) {
|
|
62
|
+
case 1: {
|
|
63
|
+
if (tag !== 10) {
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
message.id = reader.string();
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
reader.skip(tag & 7);
|
|
75
|
+
}
|
|
76
|
+
return message;
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
function createBaseGetSeatResponse(): GetSeatResponse {
|
|
81
|
+
return { seat: undefined };
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export const GetSeatResponse: MessageFns<GetSeatResponse> = {
|
|
85
|
+
encode(message: GetSeatResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
86
|
+
if (message.seat !== undefined) {
|
|
87
|
+
Seat.encode(message.seat, writer.uint32(10).fork()).join();
|
|
88
|
+
}
|
|
89
|
+
return writer;
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GetSeatResponse {
|
|
93
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
94
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
95
|
+
const message = createBaseGetSeatResponse();
|
|
96
|
+
while (reader.pos < end) {
|
|
97
|
+
const tag = reader.uint32();
|
|
98
|
+
switch (tag >>> 3) {
|
|
99
|
+
case 1: {
|
|
100
|
+
if (tag !== 10) {
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
message.seat = Seat.decode(reader, reader.uint32());
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
reader.skip(tag & 7);
|
|
112
|
+
}
|
|
113
|
+
return message;
|
|
114
|
+
},
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
function createBaseListSeatsRequest(): ListSeatsRequest {
|
|
118
|
+
return { hallId: "", screeningId: "" };
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export const ListSeatsRequest: MessageFns<ListSeatsRequest> = {
|
|
122
|
+
encode(message: ListSeatsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
123
|
+
if (message.hallId !== "") {
|
|
124
|
+
writer.uint32(10).string(message.hallId);
|
|
125
|
+
}
|
|
126
|
+
if (message.screeningId !== "") {
|
|
127
|
+
writer.uint32(18).string(message.screeningId);
|
|
128
|
+
}
|
|
129
|
+
return writer;
|
|
130
|
+
},
|
|
131
|
+
|
|
132
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ListSeatsRequest {
|
|
133
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
134
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
135
|
+
const message = createBaseListSeatsRequest();
|
|
136
|
+
while (reader.pos < end) {
|
|
137
|
+
const tag = reader.uint32();
|
|
138
|
+
switch (tag >>> 3) {
|
|
139
|
+
case 1: {
|
|
140
|
+
if (tag !== 10) {
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
message.hallId = reader.string();
|
|
145
|
+
continue;
|
|
146
|
+
}
|
|
147
|
+
case 2: {
|
|
148
|
+
if (tag !== 18) {
|
|
149
|
+
break;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
message.screeningId = reader.string();
|
|
153
|
+
continue;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
157
|
+
break;
|
|
158
|
+
}
|
|
159
|
+
reader.skip(tag & 7);
|
|
160
|
+
}
|
|
161
|
+
return message;
|
|
162
|
+
},
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
function createBaseListSeatsResponse(): ListSeatsResponse {
|
|
166
|
+
return { seat: [] };
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export const ListSeatsResponse: MessageFns<ListSeatsResponse> = {
|
|
170
|
+
encode(message: ListSeatsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
171
|
+
for (const v of message.seat) {
|
|
172
|
+
Seat.encode(v!, writer.uint32(10).fork()).join();
|
|
173
|
+
}
|
|
174
|
+
return writer;
|
|
175
|
+
},
|
|
176
|
+
|
|
177
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ListSeatsResponse {
|
|
178
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
179
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
180
|
+
const message = createBaseListSeatsResponse();
|
|
181
|
+
while (reader.pos < end) {
|
|
182
|
+
const tag = reader.uint32();
|
|
183
|
+
switch (tag >>> 3) {
|
|
184
|
+
case 1: {
|
|
185
|
+
if (tag !== 10) {
|
|
186
|
+
break;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
message.seat.push(Seat.decode(reader, reader.uint32()));
|
|
190
|
+
continue;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
194
|
+
break;
|
|
195
|
+
}
|
|
196
|
+
reader.skip(tag & 7);
|
|
197
|
+
}
|
|
198
|
+
return message;
|
|
199
|
+
},
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
function createBaseSeat(): Seat {
|
|
203
|
+
return { id: "", row: 0, number: 0, price: 0, status: "", type: "", hallId: "" };
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export const Seat: MessageFns<Seat> = {
|
|
207
|
+
encode(message: Seat, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
208
|
+
if (message.id !== "") {
|
|
209
|
+
writer.uint32(10).string(message.id);
|
|
210
|
+
}
|
|
211
|
+
if (message.row !== 0) {
|
|
212
|
+
writer.uint32(16).int32(message.row);
|
|
213
|
+
}
|
|
214
|
+
if (message.number !== 0) {
|
|
215
|
+
writer.uint32(24).int32(message.number);
|
|
216
|
+
}
|
|
217
|
+
if (message.price !== 0) {
|
|
218
|
+
writer.uint32(32).int32(message.price);
|
|
219
|
+
}
|
|
220
|
+
if (message.status !== "") {
|
|
221
|
+
writer.uint32(42).string(message.status);
|
|
222
|
+
}
|
|
223
|
+
if (message.type !== "") {
|
|
224
|
+
writer.uint32(50).string(message.type);
|
|
225
|
+
}
|
|
226
|
+
if (message.hallId !== "") {
|
|
227
|
+
writer.uint32(58).string(message.hallId);
|
|
228
|
+
}
|
|
229
|
+
return writer;
|
|
230
|
+
},
|
|
231
|
+
|
|
232
|
+
decode(input: BinaryReader | Uint8Array, length?: number): Seat {
|
|
233
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
234
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
235
|
+
const message = createBaseSeat();
|
|
236
|
+
while (reader.pos < end) {
|
|
237
|
+
const tag = reader.uint32();
|
|
238
|
+
switch (tag >>> 3) {
|
|
239
|
+
case 1: {
|
|
240
|
+
if (tag !== 10) {
|
|
241
|
+
break;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
message.id = reader.string();
|
|
245
|
+
continue;
|
|
246
|
+
}
|
|
247
|
+
case 2: {
|
|
248
|
+
if (tag !== 16) {
|
|
249
|
+
break;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
message.row = reader.int32();
|
|
253
|
+
continue;
|
|
254
|
+
}
|
|
255
|
+
case 3: {
|
|
256
|
+
if (tag !== 24) {
|
|
257
|
+
break;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
message.number = reader.int32();
|
|
261
|
+
continue;
|
|
262
|
+
}
|
|
263
|
+
case 4: {
|
|
264
|
+
if (tag !== 32) {
|
|
265
|
+
break;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
message.price = reader.int32();
|
|
269
|
+
continue;
|
|
270
|
+
}
|
|
271
|
+
case 5: {
|
|
272
|
+
if (tag !== 42) {
|
|
273
|
+
break;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
message.status = reader.string();
|
|
277
|
+
continue;
|
|
278
|
+
}
|
|
279
|
+
case 6: {
|
|
280
|
+
if (tag !== 50) {
|
|
281
|
+
break;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
message.type = reader.string();
|
|
285
|
+
continue;
|
|
286
|
+
}
|
|
287
|
+
case 7: {
|
|
288
|
+
if (tag !== 58) {
|
|
289
|
+
break;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
message.hallId = reader.string();
|
|
293
|
+
continue;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
297
|
+
break;
|
|
298
|
+
}
|
|
299
|
+
reader.skip(tag & 7);
|
|
300
|
+
}
|
|
301
|
+
return message;
|
|
302
|
+
},
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
export interface SeatServiceClient {
|
|
306
|
+
getSeat(request: GetSeatRequest): Observable<GetSeatResponse>;
|
|
307
|
+
|
|
308
|
+
listSeatsByHall(request: ListSeatsRequest): Observable<ListSeatsResponse>;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
export interface SeatServiceController {
|
|
312
|
+
getSeat(request: GetSeatRequest): Promise<GetSeatResponse> | Observable<GetSeatResponse> | GetSeatResponse;
|
|
313
|
+
|
|
314
|
+
listSeatsByHall(
|
|
315
|
+
request: ListSeatsRequest,
|
|
316
|
+
): Promise<ListSeatsResponse> | Observable<ListSeatsResponse> | ListSeatsResponse;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export function SeatServiceControllerMethods() {
|
|
320
|
+
return function (constructor: Function) {
|
|
321
|
+
const grpcMethods: string[] = ["getSeat", "listSeatsByHall"];
|
|
322
|
+
for (const method of grpcMethods) {
|
|
323
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
324
|
+
GrpcMethod("SeatService", method)(constructor.prototype[method], method, descriptor);
|
|
325
|
+
}
|
|
326
|
+
const grpcStreamMethods: string[] = [];
|
|
327
|
+
for (const method of grpcStreamMethods) {
|
|
328
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
329
|
+
GrpcStreamMethod("SeatService", method)(constructor.prototype[method], method, descriptor);
|
|
330
|
+
}
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
export const SEAT_SERVICE_NAME = "SeatService";
|
|
335
|
+
|
|
336
|
+
export interface MessageFns<T> {
|
|
337
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
338
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
339
|
+
}
|
package/gen/theater.ts
CHANGED
|
@@ -16,11 +16,11 @@ export interface ListTheatersResponse {
|
|
|
16
16
|
theaters: Theater[];
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
export interface
|
|
19
|
+
export interface GetTheaterRequest {
|
|
20
20
|
id: string;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
export interface
|
|
23
|
+
export interface GetTheaterResponse {
|
|
24
24
|
theater: Theater | undefined;
|
|
25
25
|
}
|
|
26
26
|
|
|
@@ -30,7 +30,7 @@ export interface CreateTheaterRequest {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
export interface CreateTheaterResponse {
|
|
33
|
-
|
|
33
|
+
theater: Theater | undefined;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
export interface Theater {
|
|
@@ -78,22 +78,22 @@ export const ListTheatersResponse: MessageFns<ListTheatersResponse> = {
|
|
|
78
78
|
},
|
|
79
79
|
};
|
|
80
80
|
|
|
81
|
-
function
|
|
81
|
+
function createBaseGetTheaterRequest(): GetTheaterRequest {
|
|
82
82
|
return { id: "" };
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
export const
|
|
86
|
-
encode(message:
|
|
85
|
+
export const GetTheaterRequest: MessageFns<GetTheaterRequest> = {
|
|
86
|
+
encode(message: GetTheaterRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
87
87
|
if (message.id !== "") {
|
|
88
88
|
writer.uint32(10).string(message.id);
|
|
89
89
|
}
|
|
90
90
|
return writer;
|
|
91
91
|
},
|
|
92
92
|
|
|
93
|
-
decode(input: BinaryReader | Uint8Array, length?: number):
|
|
93
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GetTheaterRequest {
|
|
94
94
|
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
95
95
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
96
|
-
const message =
|
|
96
|
+
const message = createBaseGetTheaterRequest();
|
|
97
97
|
while (reader.pos < end) {
|
|
98
98
|
const tag = reader.uint32();
|
|
99
99
|
switch (tag >>> 3) {
|
|
@@ -115,22 +115,22 @@ export const GetMovieRequest: MessageFns<GetMovieRequest> = {
|
|
|
115
115
|
},
|
|
116
116
|
};
|
|
117
117
|
|
|
118
|
-
function
|
|
118
|
+
function createBaseGetTheaterResponse(): GetTheaterResponse {
|
|
119
119
|
return { theater: undefined };
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
export const
|
|
123
|
-
encode(message:
|
|
122
|
+
export const GetTheaterResponse: MessageFns<GetTheaterResponse> = {
|
|
123
|
+
encode(message: GetTheaterResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
124
124
|
if (message.theater !== undefined) {
|
|
125
125
|
Theater.encode(message.theater, writer.uint32(10).fork()).join();
|
|
126
126
|
}
|
|
127
127
|
return writer;
|
|
128
128
|
},
|
|
129
129
|
|
|
130
|
-
decode(input: BinaryReader | Uint8Array, length?: number):
|
|
130
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GetTheaterResponse {
|
|
131
131
|
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
132
132
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
133
|
-
const message =
|
|
133
|
+
const message = createBaseGetTheaterResponse();
|
|
134
134
|
while (reader.pos < end) {
|
|
135
135
|
const tag = reader.uint32();
|
|
136
136
|
switch (tag >>> 3) {
|
|
@@ -201,13 +201,13 @@ export const CreateTheaterRequest: MessageFns<CreateTheaterRequest> = {
|
|
|
201
201
|
};
|
|
202
202
|
|
|
203
203
|
function createBaseCreateTheaterResponse(): CreateTheaterResponse {
|
|
204
|
-
return {
|
|
204
|
+
return { theater: undefined };
|
|
205
205
|
}
|
|
206
206
|
|
|
207
207
|
export const CreateTheaterResponse: MessageFns<CreateTheaterResponse> = {
|
|
208
208
|
encode(message: CreateTheaterResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
209
|
-
if (message.
|
|
210
|
-
writer.uint32(
|
|
209
|
+
if (message.theater !== undefined) {
|
|
210
|
+
Theater.encode(message.theater, writer.uint32(10).fork()).join();
|
|
211
211
|
}
|
|
212
212
|
return writer;
|
|
213
213
|
},
|
|
@@ -220,11 +220,11 @@ export const CreateTheaterResponse: MessageFns<CreateTheaterResponse> = {
|
|
|
220
220
|
const tag = reader.uint32();
|
|
221
221
|
switch (tag >>> 3) {
|
|
222
222
|
case 1: {
|
|
223
|
-
if (tag !==
|
|
223
|
+
if (tag !== 10) {
|
|
224
224
|
break;
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
message.
|
|
227
|
+
message.theater = Theater.decode(reader, reader.uint32());
|
|
228
228
|
continue;
|
|
229
229
|
}
|
|
230
230
|
}
|
|
@@ -299,7 +299,7 @@ export const Theater: MessageFns<Theater> = {
|
|
|
299
299
|
export interface TheaterServiceClient {
|
|
300
300
|
listTheaters(request: Empty): Observable<ListTheatersResponse>;
|
|
301
301
|
|
|
302
|
-
getTheater(request:
|
|
302
|
+
getTheater(request: GetTheaterRequest): Observable<GetTheaterResponse>;
|
|
303
303
|
|
|
304
304
|
createTheater(request: CreateTheaterRequest): Observable<CreateTheaterResponse>;
|
|
305
305
|
}
|
|
@@ -307,7 +307,9 @@ export interface TheaterServiceClient {
|
|
|
307
307
|
export interface TheaterServiceController {
|
|
308
308
|
listTheaters(request: Empty): Promise<ListTheatersResponse> | Observable<ListTheatersResponse> | ListTheatersResponse;
|
|
309
309
|
|
|
310
|
-
getTheater(
|
|
310
|
+
getTheater(
|
|
311
|
+
request: GetTheaterRequest,
|
|
312
|
+
): Promise<GetTheaterResponse> | Observable<GetTheaterResponse> | GetTheaterResponse;
|
|
311
313
|
|
|
312
314
|
createTheater(
|
|
313
315
|
request: CreateTheaterRequest,
|
package/package.json
CHANGED
package/proto/hall.proto
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package hall.v1;
|
|
4
|
+
|
|
5
|
+
service HallService {
|
|
6
|
+
rpc CreateHall (CreateHallRequest) returns (CreateHallResponse);
|
|
7
|
+
|
|
8
|
+
rpc GetHall (GetHallRequest) returns (GetHallResponse);
|
|
9
|
+
rpc ListHallsByTheater (ListHallsRequest) returns (ListHallsResponse);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
message CreateHallRequest {
|
|
13
|
+
string name = 1;
|
|
14
|
+
string theater_id = 2;
|
|
15
|
+
repeated RowLayout layout = 3;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
message CreateHallResponse {
|
|
19
|
+
Hall hall = 1;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
message GetHallRequest {
|
|
23
|
+
string id = 1;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
message GetHallResponse {
|
|
27
|
+
Hall hall = 1;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
message ListHallsRequest {
|
|
31
|
+
string theater_id = 1;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
message ListHallsResponse {
|
|
35
|
+
repeated Hall hall = 1;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
message Hall {
|
|
39
|
+
string id = 1;
|
|
40
|
+
string name = 2;
|
|
41
|
+
string theater_id = 3;
|
|
42
|
+
repeated RowLayout layout = 4;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
message RowLayout {
|
|
46
|
+
int32 row = 1;
|
|
47
|
+
int32 columns = 2;
|
|
48
|
+
string type = 3;
|
|
49
|
+
int32 price = 4;
|
|
50
|
+
|
|
51
|
+
}
|
package/proto/seat.proto
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package seat.v1;
|
|
4
|
+
|
|
5
|
+
service SeatService {
|
|
6
|
+
rpc GetSeat (GetSeatRequest) returns (GetSeatResponse);
|
|
7
|
+
rpc ListSeatsByHall (ListSeatsRequest) returns (ListSeatsResponse);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
message GetSeatRequest {
|
|
11
|
+
string id = 1;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
message GetSeatResponse {
|
|
15
|
+
Seat seat = 1;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
message ListSeatsRequest {
|
|
19
|
+
string hall_id = 1;
|
|
20
|
+
string screening_id = 2;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
message ListSeatsResponse {
|
|
24
|
+
repeated Seat seat = 1;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
message Seat {
|
|
28
|
+
string id = 1;
|
|
29
|
+
int32 row = 2;
|
|
30
|
+
int32 number = 3;
|
|
31
|
+
int32 price = 4;
|
|
32
|
+
string status = 5;
|
|
33
|
+
string type = 6;
|
|
34
|
+
string hall_id = 7;
|
|
35
|
+
}
|
package/proto/theater.proto
CHANGED
|
@@ -6,7 +6,7 @@ import "google/protobuf/empty.proto";
|
|
|
6
6
|
|
|
7
7
|
service TheaterService {
|
|
8
8
|
rpc ListTheaters (google.protobuf.Empty) returns (ListTheatersResponse);
|
|
9
|
-
rpc GetTheater (
|
|
9
|
+
rpc GetTheater (GetTheaterRequest) returns (GetTheaterResponse);
|
|
10
10
|
|
|
11
11
|
rpc CreateTheater (CreateTheaterRequest) returns (CreateTheaterResponse);
|
|
12
12
|
}
|
|
@@ -15,11 +15,11 @@ message ListTheatersResponse {
|
|
|
15
15
|
repeated Theater theaters = 1;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
message
|
|
18
|
+
message GetTheaterRequest {
|
|
19
19
|
string id = 1;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
message
|
|
22
|
+
message GetTheaterResponse {
|
|
23
23
|
Theater theater = 1;
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -29,7 +29,7 @@ message CreateTheaterRequest {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
message CreateTheaterResponse {
|
|
32
|
-
|
|
32
|
+
Theater theater = 1;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
message Theater {
|