Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Friend bill #8

Merged
merged 5 commits into from
Aug 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions protobuf/friend_bill.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
syntax = "proto3";
option go_package = "github.com/SpeedReach/monify";

import "google/api/annotations.proto";
import "google/protobuf/empty.proto";

service FriendBillService {
rpc CreateFriendBill(CreateFriendBillRequest) returns (CreateFriendBillResponse) {
option (google.api.http) = {
post: "/v1/friend_bill"
body: "*"
};
}

rpc DeleteFriendBill(DeleteFriendBillRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v1/friend_bill"
};
}

rpc ModifyFriendBill(ModifyFriendBillRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
put: "/v1/friend_bill"
body: "*"
};
}

rpc ListFriendBill (ListFriendBillRequest) returns (ListFriendBillResponse) {
option (google.api.http) = {
get: "/v1/friend_bill"
};
}
}

message CreateFriendBillRequest {
string relation_id = 1;
double amount = 2;
string title = 3;
string description = 4;
}

message CreateFriendBillResponse {
string friend_bill_id = 1;
}

message DeleteFriendBillRequest {
string friend_bill_id = 1;
}

message ModifyFriendBillRequest {
string friend_bill_id = 1;
double amount = 2;
string title = 3;
string description = 4;
}

message ListFriendBillRequest {
string relation_id = 1;
}

message ListFriendBillResponse {
repeated FriendBill friend_bills = 1;
//double total = 2;
}

message FriendBill {
string friend_bill_id = 1;
double amount = 2;
string title = 3;
string description = 4;
}
Loading
Loading