u
This commit is contained in:
1 parent
d9c49b34db
commit
d33cef825a
36 files changed
+753
-1077
No files matched your search
@@ -7,7 +7,6 @@ option go_package = "money";
|
||||
import "api.proto";
|
||||
import "money/money_category_types.proto";
|
||||
import "money/money_record_types.proto";
|
||||
import "google/protobuf/empty.proto";
|
||||
|
||||
service MoneyCategoryService {
|
||||
rpc List(ListMoneyCategoryReq) returns (ListMoneyCategoryResp){
|
||||
@@ -28,8 +27,8 @@ service MoneyCategoryService {
|
||||
}
|
||||
|
||||
service MoneyRecordService {
|
||||
rpc QueryMoneyRecord(QueryMoneyRecordsParams) returns (QueryMoneyRecordsResult){
|
||||
option (api.post) = '/money/record/query';
|
||||
rpc ListMoneyRecords(ListMoneyRecordsParams) returns (ListMoneyRecordsResult){
|
||||
option (api.post) = '/money/records';
|
||||
}
|
||||
rpc InsertMoneyRecord(InsertMoneyRecordParams) returns (InsertMoneyRecordResult){
|
||||
option (api.post) = '/money/record/insert';
|
||||
|
||||
@@ -64,15 +64,15 @@ message CreateMoneyCategoryResp {
|
||||
message UpdateMoneyCategoryReq {
|
||||
int64 Id = 1[
|
||||
(api.body)="id"
|
||||
];;
|
||||
];
|
||||
string Name = 2 [
|
||||
(api.body)="name",
|
||||
(api.vd) = "$ != ''"
|
||||
];;
|
||||
];
|
||||
string Icon = 3 [
|
||||
(api.body)="icon",
|
||||
(api.vd) = "$ != ''"
|
||||
];;
|
||||
];
|
||||
}
|
||||
|
||||
message UpdateMoneyCategoryResp {}
|
||||
@@ -19,14 +19,13 @@ message MoneyRecord {
|
||||
string Username = 9 [(api.body)="username"];
|
||||
}
|
||||
|
||||
|
||||
// 查询记账记录请求参数
|
||||
message QueryMoneyRecordsParams {
|
||||
message ListMoneyRecordsParams {
|
||||
string RecordTime = 1 [(api.body)="record_time"];
|
||||
}
|
||||
|
||||
// 查询记账记录结果
|
||||
message QueryMoneyRecordsResult {
|
||||
message ListMoneyRecordsResult {
|
||||
repeated MoneyRecord Records = 1 [(api.body)="records"];
|
||||
}
|
||||
|
||||
@@ -46,14 +45,7 @@ message InsertMoneyRecordParams {
|
||||
|
||||
// 新增记账记录结果
|
||||
message InsertMoneyRecordResult {
|
||||
int64 Id = 1 [(api.body)="id"];
|
||||
int64 CategoryId = 2 [(api.body)="category_id"];
|
||||
int64 UserId = 3 [(api.body)="user_id"];
|
||||
string Amount = 4 [(api.body)="amount"];
|
||||
string Remark = 5 [(api.body)="remark"];
|
||||
string RecordTime = 6 [(api.body)="record_time"];
|
||||
string CreateTime = 7 [(api.body)="create_time"];
|
||||
string UpdateTime = 8 [(api.body)="update_time"];
|
||||
|
||||
}
|
||||
|
||||
// 更新记账记录
|
||||
|
||||
Reference in new issue
Block a user