-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
101 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
syntax = "proto3"; | ||
|
||
package rpkm67.backend.group.v1; | ||
|
||
import "rpkm67/backend/baan/v1/baan.proto"; | ||
|
||
option go_package = "rpkm67/backend/group/v1"; | ||
|
||
service GroupService { | ||
rpc FindOne(FindOneGroupRequest) returns (FindOneGroupResponse) {} | ||
rpc FindByToken(FindByTokenGroupRequest) returns (FindByTokenGroupResponse) {} | ||
rpc Update(UpdateGroupRequest) returns (UpdateGroupResponse) {} | ||
rpc Join(JoinGroupRequest) returns (JoinGroupResponse) {} | ||
rpc DeleteMember(DeleteMemberGroupRequest) returns (DeleteMemberGroupResponse){} | ||
rpc Leave(LeaveGroupRequest) returns (LeaveGroupResponse){} | ||
rpc SelectBaan(SelectBaanRequest) returns (SelectBaanResponse) {} | ||
} | ||
|
||
message Group{ | ||
string id = 1; | ||
string leaderID = 2; | ||
string token = 3; | ||
repeated UserInfo members = 4; | ||
repeated rpkm67.backend.baan.v1.BaanInfo baans = 5; | ||
} | ||
|
||
message UserInfo { | ||
string id = 1; | ||
string firstname = 2; | ||
string lastname = 3; | ||
string imageUrl = 4; | ||
} | ||
|
||
//Find One | ||
message FindOneGroupRequest{ | ||
string userId = 1; | ||
} | ||
|
||
message FindOneGroupResponse{ | ||
Group group = 1; | ||
} | ||
|
||
// Find By Token | ||
message FindByTokenGroupRequest{ | ||
string token = 1; | ||
} | ||
|
||
message FindByTokenGroupResponse{ | ||
string id = 1; | ||
string token = 2; | ||
UserInfo leader = 3; | ||
} | ||
|
||
// Update | ||
message UpdateGroupRequest{ | ||
Group group = 1; | ||
string leaderId = 2; | ||
} | ||
|
||
message UpdateGroupResponse{ | ||
Group group = 1; | ||
} | ||
|
||
//Join | ||
message JoinGroupRequest{ | ||
string token = 1; | ||
string userId = 2; | ||
} | ||
|
||
message JoinGroupResponse{ | ||
Group group = 1; | ||
} | ||
|
||
// Delete | ||
message DeleteMemberGroupRequest{ | ||
string userId = 1; | ||
string leaderId = 2; | ||
} | ||
|
||
message DeleteMemberGroupResponse{ | ||
Group group = 1; | ||
} | ||
|
||
// Leave | ||
message LeaveGroupRequest{ | ||
string userId = 1; | ||
} | ||
|
||
message LeaveGroupResponse{ | ||
Group group = 1; | ||
} | ||
|
||
// Select Baan | ||
message SelectBaanRequest{ | ||
string userId = 1; | ||
repeated string baans = 2; | ||
} | ||
|
||
message SelectBaanResponse{ | ||
bool success = 1; | ||
} |