-
Notifications
You must be signed in to change notification settings - Fork 0
/
eventcatalog.proto
54 lines (42 loc) · 1.2 KB
/
eventcatalog.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
syntax = "proto3";
option csharp_namespace = "EasyTicket.Grpc";
import "google/protobuf/timestamp.proto";
package API;
service Events {
rpc GetAll (GetAllEventsRequest) returns (GetAllEventsResponse) {}
rpc GetAllByCategoryId (GetAllEventsByCategoryIdRequest) returns (GetAllEventsResponse) {}
rpc GetByEventId (GetByEventIdRequest) returns (GetByEventIdResponse) {}
rpc GetAllCategories (GetAllCategoriesRequest) returns (GetAllCategoriesResponse) {}
}
message GetAllEventsRequest {}
message GetAllEventsResponse {
repeated Event Events = 1;
}
message GetAllEventsByCategoryIdRequest {
string CategoryId = 1;
}
message GetByEventIdRequest {
string EventId = 1;
}
message GetByEventIdResponse {
Event Event = 1;
}
message GetAllCategoriesRequest {}
message GetAllCategoriesResponse {
repeated Category Categories = 1;
}
message Event {
string EventId = 1;
string Name = 2;
int32 Price = 3;
string Artist = 4;
google.protobuf.Timestamp Date = 5;
string Description = 6;
string ImageUrl = 7;
string CategoryId = 8;
string CategoryName = 9;
}
message Category {
string CategoryId = 1;
string Name = 2;
}