-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbooking.proto
62 lines (49 loc) · 1.16 KB
/
booking.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
55
56
57
58
59
60
61
62
syntax = "proto3";
package booking;
option go_package = "github.com/devopsprodigy/meeting-proto-uuid/booking";
import "room/room.proto";
import "user/user.proto";
import "google/protobuf/timestamp.proto";
service BookingService {
rpc Create (CreateReq) returns (CreateRes);
rpc Find (FindReq) returns (FindRes);
rpc Update (UpdateReq) returns (UpdateRes);
rpc Delete (DeleteReq) returns (DeleteRes);
}
message Booking {
bytes id = 1;
string name = 2;
google.protobuf.Timestamp startTime = 3;
google.protobuf.Timestamp endTime = 4;
bytes roomId = 5;
bytes userId = 6;
repeated bytes participantsId = 7;
room.Room room = 8;
user.User user = 9;
repeated user.User participants = 10;
}
message CreateReq {
Booking booking = 1;
}
message CreateRes {
Booking booking = 1;
}
message FindReq {
google.protobuf.Timestamp startTime = 1;
google.protobuf.Timestamp endTime = 2;
}
message FindRes {
repeated Booking booking = 1;
}
message UpdateReq {
Booking booking = 1;
}
message UpdateRes {
Booking booking = 1;
}
message DeleteReq {
bytes id = 1;
}
message DeleteRes {
string message = 2;
}