u
This commit is contained in:
1 parent
5308dc8fda
commit
d51eacb8ad
32 files changed
+1788
-513
No files matched your search
@@ -1,15 +1,15 @@
|
||||
syntax = "proto3";
|
||||
|
||||
|
||||
package money_category;
|
||||
package money;
|
||||
|
||||
option go_package = "money_category";
|
||||
option go_package = "money";
|
||||
|
||||
import "api.proto";
|
||||
|
||||
|
||||
message QueryUserMoneyCategoryReq{}
|
||||
message UserMoneyCategory {
|
||||
message QueryMoneyCategoryReq{}
|
||||
message MoneyCategory {
|
||||
int64 id = 1;
|
||||
string name = 2;
|
||||
string icon = 3;
|
||||
@@ -17,23 +17,37 @@ message UserMoneyCategory {
|
||||
int32 sort_number = 5;
|
||||
}
|
||||
|
||||
message QueryUserMoneyCategoryResp {
|
||||
repeated UserMoneyCategory categories = 1;
|
||||
message QueryMoneyCategoryResp {
|
||||
repeated MoneyCategory categories = 1;
|
||||
}
|
||||
|
||||
message DeleteUserMoneyCategoryReq{
|
||||
int64 Id = 1[(api.body)="id",(api.vd)="$!=''"];
|
||||
message DeleteMoneyCategoryReq{
|
||||
int64 Id = 1[(api.body)="id",(api.vd)="$ != 0"];
|
||||
}
|
||||
|
||||
message DeleteUserMoneyCategoryResp {
|
||||
message DeleteMoneyCategoryResp {
|
||||
}
|
||||
|
||||
message MoneyCategorySortItem {
|
||||
int64 id = 1;
|
||||
int32 sort_number = 2;
|
||||
}
|
||||
|
||||
message UpdateMoneyCategorySortReq {
|
||||
repeated MoneyCategorySortItem data = 1;
|
||||
}
|
||||
|
||||
message UpdateMoneyCategorySortResp {}
|
||||
|
||||
service MoneyCategoryService {
|
||||
rpc QueryUserMoneyCategory(QueryUserMoneyCategoryReq) returns (QueryUserMoneyCategoryResp){
|
||||
rpc QueryUserMoneyCategory(QueryMoneyCategoryReq) returns (QueryMoneyCategoryResp){
|
||||
option (api.get) = '/money/category';
|
||||
};
|
||||
rpc DeleteUserMoneyCategory(DeleteUserMoneyCategoryReq) returns (DeleteUserMoneyCategoryResp){
|
||||
option (api.get) = '/money/category/delete';
|
||||
rpc DeleteUserMoneyCategory(DeleteMoneyCategoryReq) returns (DeleteMoneyCategoryResp){
|
||||
option (api.post) = '/money/category/delete';
|
||||
};
|
||||
rpc UpdateMoneyCategorySort(UpdateMoneyCategorySortReq) returns (UpdateMoneyCategorySortResp){
|
||||
option (api.post) = '/money/category/updateSort';
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package money;
|
||||
|
||||
option go_package = "money";
|
||||
|
||||
import "api.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
message MoneyRecordBase {
|
||||
int64 id = 1;
|
||||
int64 category_id = 2;
|
||||
int64 user_id = 3;
|
||||
string amount = 4;
|
||||
string remark = 5;
|
||||
google.protobuf.Timestamp record_time = 6;
|
||||
google.protobuf.Timestamp create_time = 7;
|
||||
google.protobuf.Timestamp update_time = 8;
|
||||
}
|
||||
|
||||
message MoneyRecordItem {
|
||||
MoneyRecordBase base = 1;
|
||||
|
||||
string category_name = 2;
|
||||
string category_icon = 3;
|
||||
int32 category_type = 4;
|
||||
}
|
||||
|
||||
message MoneyRecordGroup {
|
||||
string record_time = 1;
|
||||
|
||||
string expense = 2;
|
||||
string income = 3;
|
||||
|
||||
repeated MoneyRecordItem records = 4;
|
||||
}
|
||||
|
||||
message QueryMoneyRecordsParams {
|
||||
string record_time = 1;
|
||||
}
|
||||
message QueryMoneyRecordsResult {
|
||||
repeated MoneyRecordGroup records = 1;
|
||||
|
||||
string total_income = 2;
|
||||
string total_expense = 3;
|
||||
}
|
||||
|
||||
service MoneyRecordService {
|
||||
rpc QueryMoneyRecord(QueryMoneyRecordsParams) returns (QueryMoneyRecordsResult){
|
||||
option (api.post) = '/money/record';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user