Skip to content

Commit

Permalink
group 66
Browse files Browse the repository at this point in the history
  • Loading branch information
bookpanda committed Jun 21, 2024
1 parent 4959ac9 commit a8a36d0
Showing 1 changed file with 101 additions and 0 deletions.
101 changes: 101 additions & 0 deletions rpkm67/backend/group/v1/group.proto
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;
}

0 comments on commit a8a36d0

Please sign in to comment.