This repository has been archived by the owner on Sep 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathevent.proto
71 lines (57 loc) · 2.15 KB
/
event.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
63
64
65
66
67
68
69
70
71
syntax = "proto3";
package geekCamp;
import "google/protobuf/timestamp.proto";
import "google/protobuf/duration.proto";
option go_package = "./pb";
service Event {
rpc GetEvent(GetEventRequest) returns (GetEventResponse) {}
rpc CreateEvent(CreateEventRequest) returns (CreateEventResponse) {}
rpc RegisterAnswer(RegisterAnswerRequest) returns (RegisterAnswerResponse) {
}
}
message GetEventRequest {
string id = 1; // イベントid
string token = 2; // 認証用トークン
}
message GetEventResponse {
string id = 1; // イベントid
string name = 2; // イベント名
bool owner = 3; // イベント所有者か
google.protobuf.Duration timeUnit = 4; // 時間単位(秒)
google.protobuf.Duration duration = 5; // 所要時間
repeated Answer answers = 6; // 参加者の解答
repeated google.protobuf.Timestamp proposedStartTime = 7;
}
message CreateEventRequest {
string name = 1; // イベント名
string token = 2; // 認証用トークン
google.protobuf.Duration timeUnit = 3; // 時間単位
google.protobuf.Duration duration = 4; // 所要時間
// 候補の開始時間の配列
repeated google.protobuf.Timestamp proposedStartTime = 5;
}
message CreateEventResponse {
string eventId = 2; // イベントID
}
message RegisterAnswerRequest {
string eventId = 1; // イベントID
string token = 2; // 認証トークン
Answer answer = 3; // 名前、備考、回答
}
message RegisterAnswerResponse {}
message Answer {
string name = 1;
string note = 2;
repeated ProposedSchedule schedule = 3;
bool isOwnAnswer = 4;
message ProposedSchedule {
google.protobuf.Timestamp startTime = 1; // 開始時間
Availability availability = 2; // 参加可否
enum Availability {
UNSPECIFIED = 0;
AVAILABLE = 1;
MAYBE = 2;
UNAVAILABLE = 3;
}
}
}