-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathabi.proto
83 lines (68 loc) · 1.28 KB
/
abi.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
72
73
74
75
76
77
78
79
80
81
82
83
syntax = "proto3";
package abi;
message Course {
uint32 articleCount = 1;
string brief = 2;
bool done = 3;
string id = 4;
string image = 5;
uint32 price = 6;
string purchasedCount = 7;
string teacherName = 8;
string teacherTitle = 9;
string title = 10;
repeated Section sections = 11;
string description = 12;
StudyInfo studyInfo = 13;
}
message StudyInfo {
float percent = 1;
uint64 lastStudyAt = 2;
}
message ListCourseResponse {
repeated Course courses = 1;
bool more = 2;
}
message Section {
string id = 1;
string title = 2;
repeated Article articles = 3;
}
message SectionList {
repeated Section sections = 1;
}
message Article {
string id = 1;
string title = 2;
string publishDate = 3;
bool done = 4;
string content = 5;
Course course = 6;
Section section = 7;
StudyInfo studyInfo = 8;
}
message ArticleList {
repeated Article articles = 1;
}
message Comment {
string content = 1;
uint32 likeCount = 2;
string nickName = 3;
repeated Comment replies = 4;
}
message CommentList {
repeated Comment comments = 1;
}
message UserInfo {
string id = 1;
UserRole role = 2;
}
enum UserRole {
Visitor = 0;
Reader = 1;
}
message SaveStudyInfoRequest {
string articleId = 1;
string courseId = 2;
float percent = 3;
}