diff --git a/code/allapp/allapp-go/biz/handler/money/money_category_service.go b/code/allapp/allapp-go/biz/handler/money/money_category_service.go
index 609ffdbf..2e82fc09 100644
--- a/code/allapp/allapp-go/biz/handler/money/money_category_service.go
+++ b/code/allapp/allapp-go/biz/handler/money/money_category_service.go
@@ -164,3 +164,39 @@ func CreateMoneyCategory(ctx context.Context, c *app.RequestContext) {
response.Success(c).Data(resp).Send()
}
+
+// UpdateMoneyCategory .
+// @router /money/category/update [POST]
+func UpdateMoneyCategory(ctx context.Context, c *app.RequestContext) {
+ var err error
+ var req money.UpdateMoneyCategoryReq
+ err = c.BindAndValidate(&req)
+ if err != nil {
+ c.String(consts.StatusBadRequest, err.Error())
+ return
+ }
+
+ resp := new(money.UpdateMoneyCategoryResp)
+
+ params := repo.UpdateMoneyCategoryParams{
+ ID: req.Id,
+ Name: req.Name,
+ Icon: req.Icon,
+ }
+
+ // 插入
+ err = db.WithTx(ctx, func(q *repo.Queries) error {
+ err = q.UpdateMoneyCategory(ctx, params)
+ if err != nil {
+ return err
+ }
+ return nil
+ })
+
+ if err != nil {
+ errorx.AddError(c, err)
+ return
+ }
+
+ response.Success(c).Data(resp).Send()
+}
diff --git a/code/allapp/allapp-go/biz/handler/money/money_record_service.go b/code/allapp/allapp-go/biz/handler/money/money_record_service.go
index 87f4f785..f06b12f5 100644
--- a/code/allapp/allapp-go/biz/handler/money/money_record_service.go
+++ b/code/allapp/allapp-go/biz/handler/money/money_record_service.go
@@ -12,11 +12,9 @@ import (
"allapp/utils/response"
"context"
"fmt"
- "sort"
"time"
"github.com/jackc/pgx/v5/pgtype"
- "github.com/shopspring/decimal"
money "allapp/biz/model/money"
@@ -46,19 +44,19 @@ func QueryMoneyRecord(ctx context.Context, c *app.RequestContext) {
spaceID, ok := middleware.GetSpaceID(ctx)
// 定义统一的 records 切片
- var dbRecordsUser []repo.FindUserMoneyRecordsRow
+ var dbRecordsUser []repo.MoneyRecord
var dbRecordsSpace []repo.FindMoneyRecordsBySpaceRow
var errQuery error
// 最终返回统一类型
- var records []*money.MoneyRecordItem
+ var records []*money.MoneyRecord
// 有空间ID,查询空间内所有用户
if ok {
params := repo.FindMoneyRecordsBySpaceParams{
SpaceID: spaceID,
- RecordTime: pgtype.Timestamp{Time: startTime, Valid: true},
- RecordTime_2: pgtype.Timestamp{Time: endTime, Valid: true},
+ RecordTime: pgtype.Date{Time: startTime, Valid: true},
+ RecordTime_2: pgtype.Date{Time: endTime, Valid: true},
}
dbRecordsSpace, errQuery = db.Queries.FindMoneyRecordsBySpace(ctx, params)
if errQuery != nil {
@@ -67,27 +65,24 @@ func QueryMoneyRecord(ctx context.Context, c *app.RequestContext) {
}
for _, r := range dbRecordsSpace {
- records = append(records, &money.MoneyRecordItem{
- Id: r.ID,
- CategoryId: r.CategoryID,
- CategoryType: r.CategoryType.Int32,
- CategoryIcon: r.CategoryIcon.String,
- CategoryName: r.CategoryName.String,
- UserId: r.UserID,
- Username: r.Username.String,
- Amount: pgtypex.NumericToString(r.Amount),
- Remark: r.Remark.String,
- RecordTime: pgtypex.TimestampToDateString(r.RecordTime),
- CreateTime: pgtypex.TimestampToDateTimeString(r.CreateTime),
- UpdateTime: pgtypex.TimestampToDateTimeString(r.UpdateTime),
+ records = append(records, &money.MoneyRecord{
+ Id: r.ID,
+ CategoryId: r.CategoryID,
+ UserId: r.UserID,
+ Username: r.Username.String,
+ Amount: pgtypex.NumericToString(r.Amount),
+ Remark: r.Remark.String,
+ RecordTime: pgtypex.DateToString(r.RecordTime),
+ CreateTime: pgtypex.TimestampToMillis(r.CreateTime),
+ UpdateTime: pgtypex.TimestampToMillis(r.UpdateTime),
})
}
} else {
// 没有空间ID,只查询单用户
params := repo.FindUserMoneyRecordsParams{
UserID: userID,
- RecordTime: pgtype.Timestamp{Time: startTime, Valid: true},
- RecordTime_2: pgtype.Timestamp{Time: endTime, Valid: true},
+ RecordTime: pgtype.Date{Time: startTime, Valid: true},
+ RecordTime_2: pgtype.Date{Time: endTime, Valid: true},
}
dbRecordsUser, errQuery = db.Queries.FindUserMoneyRecords(ctx, params)
if errQuery != nil {
@@ -96,76 +91,22 @@ func QueryMoneyRecord(ctx context.Context, c *app.RequestContext) {
}
for _, r := range dbRecordsUser {
- records = append(records, &money.MoneyRecordItem{
- Id: r.ID,
- CategoryId: r.CategoryID,
- CategoryType: r.CategoryType.Int32,
- CategoryIcon: r.CategoryIcon.String,
- CategoryName: r.CategoryName.String,
- UserId: r.UserID,
- Username: "",
- Amount: pgtypex.NumericToString(r.Amount),
- Remark: r.Remark.String,
- RecordTime: pgtypex.TimestampToDateString(r.RecordTime),
- CreateTime: pgtypex.TimestampToDateTimeString(r.CreateTime),
- UpdateTime: pgtypex.TimestampToDateTimeString(r.UpdateTime),
+ records = append(records, &money.MoneyRecord{
+ Id: r.ID,
+ CategoryId: r.CategoryID,
+ UserId: r.UserID,
+ Username: "",
+ Amount: pgtypex.NumericToString(r.Amount),
+ Remark: r.Remark.String,
+ RecordTime: pgtypex.DateToString(r.RecordTime),
+ CreateTime: pgtypex.TimestampToMillis(r.CreateTime),
+ UpdateTime: pgtypex.TimestampToMillis(r.UpdateTime),
})
}
}
- // 分组统计
- groupMap := make(map[string]*money.MoneyRecordGroup)
- totalIncome := decimal.NewFromInt(0)
- totalExpense := decimal.NewFromInt(0)
-
- for _, r := range records {
- day := r.RecordTime[:10] // "YYYY-MM-DD"
-
- group, ok := groupMap[day]
- if !ok {
- group = &money.MoneyRecordGroup{
- RecordTime: day,
- Income: "0.00",
- Expense: "0.00",
- Records: make([]*money.MoneyRecordItem, 0),
- }
- groupMap[day] = group
- }
-
- group.Records = append(group.Records, r)
-
- // 收支累加
- amount := decimal.RequireFromString(r.Amount)
- if r.CategoryType == 1 {
- incomeDec, _ := decimal.NewFromString(group.Income)
- incomeDec = incomeDec.Add(amount)
- group.Income = incomeDec.Round(2).StringFixed(2)
- totalIncome = totalIncome.Add(amount)
- } else if r.CategoryType == 0 {
- expenseDec, _ := decimal.NewFromString(group.Expense)
- expenseDec = expenseDec.Add(amount)
- group.Expense = expenseDec.Round(2).StringFixed(2)
- totalExpense = totalExpense.Add(amount)
- }
- }
-
- // 对日期排序
- dates := make([]string, 0, len(groupMap))
- for k := range groupMap {
- dates = append(dates, k)
- }
- sort.Slice(dates, func(i, j int) bool { return dates[i] > dates[j] })
-
- resultGroups := make([]*money.MoneyRecordGroup, 0, len(dates))
- for _, day := range dates {
- resultGroups = append(resultGroups, groupMap[day])
- }
-
result := &money.QueryMoneyRecordsResult{
- Records: resultGroups,
- TotalIncome: totalIncome.Round(2).StringFixed(2),
- TotalExpense: totalExpense.Round(2).StringFixed(2),
- TotalBalance: totalIncome.Sub(totalExpense).Round(2).StringFixed(2),
+ Records: records,
}
response.Success(c).Data(result).Send()
@@ -192,17 +133,22 @@ func InsertMoneyRecord(ctx context.Context, c *app.RequestContext) {
UserID: middleware.GetUserID(ctx),
Amount: pgtypex.StringToNumeric(req.Amount),
Remark: pgtypex.StringToText(req.Remark),
- RecordTime: pgtypex.StringToTimestamp(req.RecordTime),
+ RecordTime: pgtypex.StringToDate(req.RecordTime),
}
record, err := db.Queries.InsertMoneyRecord(ctx, params)
+ if err != nil {
+ errorx.AddError(c, err)
+ return
+ }
+
resp.Id = record.ID
resp.CategoryId = record.CategoryID
resp.UserId = record.UserID
resp.Amount = pgtypex.NumericToString(record.Amount)
resp.Remark = record.Remark.String
- resp.RecordTime = pgtypex.TimestampToDateString(record.RecordTime)
+ resp.RecordTime = pgtypex.DateToString(record.RecordTime)
resp.CreateTime = pgtypex.TimestampToDateTimeString(record.CreateTime)
resp.UpdateTime = pgtypex.TimestampToDateTimeString(record.UpdateTime)
@@ -234,7 +180,7 @@ func UpdateMoneyRecord(ctx context.Context, c *app.RequestContext) {
CategoryID: req.CategoryId,
Amount: pgtypex.StringToNumeric(req.Amount),
Remark: pgtypex.StringToText(req.Remark),
- RecordTime: pgtypex.StringToTimestamp(req.RecordTime),
+ RecordTime: pgtypex.StringToDate(req.RecordTime),
}
if err := db.Queries.UpdateMoneyRecord(ctx, params); err != nil {
diff --git a/code/allapp/allapp-go/biz/model/api/api.pb.go b/code/allapp/allapp-go/biz/model/api/api.pb.go
index d82e6a07..ff03c0ce 100644
--- a/code/allapp/allapp-go/biz/model/api/api.pb.go
+++ b/code/allapp/allapp-go/biz/model/api/api.pb.go
@@ -3,7 +3,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
-// protoc v4.25.3
+// protoc v6.33.1
// source: api.proto
package api
diff --git a/code/allapp/allapp-go/biz/model/money/money.pb.go b/code/allapp/allapp-go/biz/model/money/money.pb.go
index bd7e2651..e1a7aaab 100644
--- a/code/allapp/allapp-go/biz/model/money/money.pb.go
+++ b/code/allapp/allapp-go/biz/model/money/money.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
-// protoc v4.25.3
+// protoc v6.33.1
// source: money.proto
package money
@@ -10,6 +10,7 @@ import (
_ "allapp/biz/model/api"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ _ "google.golang.org/protobuf/types/known/emptypb"
reflect "reflect"
)
@@ -29,67 +30,76 @@ var file_money_proto_rawDesc = []byte{
0x65, 0x67, 0x6f, 0x72, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x1a, 0x1e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2f, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x5f, 0x72,
0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x32, 0xd9, 0x03, 0x0a, 0x14, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67,
- 0x6f, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x56, 0x0a, 0x04, 0x4c, 0x69,
- 0x73, 0x74, 0x12, 0x1b, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d,
- 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x1a,
- 0x1c, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x6f, 0x6e, 0x65,
- 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x22, 0x13, 0xca,
- 0xc1, 0x18, 0x0f, 0x2f, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f,
- 0x72, 0x79, 0x12, 0x74, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72,
- 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x1d, 0x2e,
- 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x6f, 0x6e, 0x65,
- 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x6d,
- 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x6f, 0x6e, 0x65, 0x79,
- 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x22, 0x1a, 0xd2, 0xc1,
- 0x18, 0x16, 0x2f, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72,
- 0x79, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x80, 0x01, 0x0a, 0x17, 0x55, 0x70, 0x64,
+ 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xcb,
+ 0x04, 0x0a, 0x14, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79,
+ 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x56, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12,
+ 0x1b, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x6f, 0x6e, 0x65,
+ 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x6d,
+ 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61,
+ 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x22, 0x13, 0xca, 0xc1, 0x18, 0x0f,
+ 0x2f, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12,
+ 0x74, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x6e,
+ 0x65, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x1d, 0x2e, 0x6d, 0x6f, 0x6e,
+ 0x65, 0x79, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61,
+ 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x6d, 0x6f, 0x6e, 0x65,
+ 0x79, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74,
+ 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x22, 0x1a, 0xd2, 0xc1, 0x18, 0x16, 0x2f,
+ 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x2f, 0x64,
+ 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x80, 0x01, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
+ 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x53, 0x6f, 0x72,
+ 0x74, 0x12, 0x21, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
+ 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x53, 0x6f, 0x72,
+ 0x74, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79,
- 0x53, 0x6f, 0x72, 0x74, 0x12, 0x21, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x55, 0x70, 0x64,
- 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79,
- 0x53, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e,
- 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67,
- 0x6f, 0x72, 0x79, 0x53, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x1e, 0xd2, 0xc1, 0x18,
- 0x1a, 0x2f, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79,
- 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x6f, 0x72, 0x74, 0x12, 0x70, 0x0a, 0x13, 0x43,
- 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f,
- 0x72, 0x79, 0x12, 0x1d, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,
- 0x65, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65,
- 0x71, 0x1a, 0x1e, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
- 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73,
- 0x70, 0x22, 0x1a, 0xd2, 0xc1, 0x18, 0x16, 0x2f, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2f, 0x63, 0x61,
- 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x32, 0xce, 0x03,
- 0x0a, 0x12, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x53, 0x65, 0x72,
- 0x76, 0x69, 0x63, 0x65, 0x12, 0x6b, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x6e,
- 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x1e, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79,
- 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72,
- 0x64, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x1e, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79,
- 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72,
- 0x64, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x17, 0xd2, 0xc1, 0x18, 0x13, 0x2f, 0x6d,
- 0x6f, 0x6e, 0x65, 0x79, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2f, 0x71, 0x75, 0x65, 0x72,
- 0x79, 0x12, 0x6d, 0x0a, 0x11, 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x4d, 0x6f, 0x6e, 0x65, 0x79,
- 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x1e, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x49,
- 0x6e, 0x73, 0x65, 0x72, 0x74, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
- 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x1e, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x49,
- 0x6e, 0x73, 0x65, 0x72, 0x74, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
- 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x18, 0xd2, 0xc1, 0x18, 0x14, 0x2f, 0x6d, 0x6f, 0x6e,
- 0x65, 0x79, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2f, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74,
- 0x12, 0x6d, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52,
- 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x1e, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x55, 0x70,
- 0x64, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x50,
- 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x1e, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x55, 0x70,
- 0x64, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52,
+ 0x53, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x1e, 0xd2, 0xc1, 0x18, 0x1a, 0x2f, 0x6d,
+ 0x6f, 0x6e, 0x65, 0x79, 0x2f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x2f, 0x75, 0x70,
+ 0x64, 0x61, 0x74, 0x65, 0x53, 0x6f, 0x72, 0x74, 0x12, 0x70, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61,
+ 0x74, 0x65, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12,
+ 0x1d, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x6f,
+ 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x1e,
+ 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x6e,
+ 0x65, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x22, 0x1a,
+ 0xd2, 0xc1, 0x18, 0x16, 0x2f, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2f, 0x63, 0x61, 0x74, 0x65, 0x67,
+ 0x6f, 0x72, 0x79, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x70, 0x0a, 0x13, 0x55, 0x70,
+ 0x64, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72,
+ 0x79, 0x12, 0x1d, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
+ 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71,
+ 0x1a, 0x1e, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d,
+ 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70,
+ 0x22, 0x1a, 0xd2, 0xc1, 0x18, 0x16, 0x2f, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2f, 0x63, 0x61, 0x74,
+ 0x65, 0x67, 0x6f, 0x72, 0x79, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x32, 0xce, 0x03, 0x0a,
+ 0x12, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x53, 0x65, 0x72, 0x76,
+ 0x69, 0x63, 0x65, 0x12, 0x6b, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x6e, 0x65,
+ 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x1e, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e,
+ 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
+ 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x1e, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e,
+ 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
+ 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x17, 0xd2, 0xc1, 0x18, 0x13, 0x2f, 0x6d, 0x6f,
+ 0x6e, 0x65, 0x79, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79,
+ 0x12, 0x6d, 0x0a, 0x11, 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52,
+ 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x1e, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x49, 0x6e,
+ 0x73, 0x65, 0x72, 0x74, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x50,
+ 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x1e, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x49, 0x6e,
+ 0x73, 0x65, 0x72, 0x74, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52,
0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x18, 0xd2, 0xc1, 0x18, 0x14, 0x2f, 0x6d, 0x6f, 0x6e, 0x65,
- 0x79, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12,
- 0x6d, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65,
- 0x63, 0x6f, 0x72, 0x64, 0x12, 0x1e, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x44, 0x65, 0x6c,
- 0x65, 0x74, 0x65, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x50, 0x61,
- 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x1e, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x44, 0x65, 0x6c,
- 0x65, 0x74, 0x65, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65,
+ 0x79, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2f, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x12,
+ 0x6d, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65,
+ 0x63, 0x6f, 0x72, 0x64, 0x12, 0x1e, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x55, 0x70, 0x64,
+ 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x50, 0x61,
+ 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x1e, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x55, 0x70, 0x64,
+ 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65,
0x73, 0x75, 0x6c, 0x74, 0x22, 0x18, 0xd2, 0xc1, 0x18, 0x14, 0x2f, 0x6d, 0x6f, 0x6e, 0x65, 0x79,
- 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x18,
- 0x5a, 0x16, 0x61, 0x6c, 0x6c, 0x61, 0x70, 0x70, 0x2f, 0x62, 0x69, 0x7a, 0x2f, 0x6d, 0x6f, 0x64,
- 0x65, 0x6c, 0x2f, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x6d,
+ 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63,
+ 0x6f, 0x72, 0x64, 0x12, 0x1e, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x44, 0x65, 0x6c, 0x65,
+ 0x74, 0x65, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x50, 0x61, 0x72,
+ 0x61, 0x6d, 0x73, 0x1a, 0x1e, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x44, 0x65, 0x6c, 0x65,
+ 0x74, 0x65, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73,
+ 0x75, 0x6c, 0x74, 0x22, 0x18, 0xd2, 0xc1, 0x18, 0x14, 0x2f, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2f,
+ 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x18, 0x5a,
+ 0x16, 0x61, 0x6c, 0x6c, 0x61, 0x70, 0x70, 0x2f, 0x62, 0x69, 0x7a, 0x2f, 0x6d, 0x6f, 0x64, 0x65,
+ 0x6c, 0x2f, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var file_money_proto_goTypes = []interface{}{
@@ -97,38 +107,42 @@ var file_money_proto_goTypes = []interface{}{
(*DeleteMoneyCategoryReq)(nil), // 1: money.DeleteMoneyCategoryReq
(*UpdateMoneyCategorySortReq)(nil), // 2: money.UpdateMoneyCategorySortReq
(*CreateMoneyCategoryReq)(nil), // 3: money.CreateMoneyCategoryReq
- (*QueryMoneyRecordsParams)(nil), // 4: money.QueryMoneyRecordsParams
- (*InsertMoneyRecordParams)(nil), // 5: money.InsertMoneyRecordParams
- (*UpdateMoneyRecordParams)(nil), // 6: money.UpdateMoneyRecordParams
- (*DeleteMoneyRecordParams)(nil), // 7: money.DeleteMoneyRecordParams
- (*ListMoneyCategoryResp)(nil), // 8: money.ListMoneyCategoryResp
- (*DeleteMoneyCategoryResp)(nil), // 9: money.DeleteMoneyCategoryResp
- (*UpdateMoneyCategorySortResp)(nil), // 10: money.UpdateMoneyCategorySortResp
- (*CreateMoneyCategoryResp)(nil), // 11: money.CreateMoneyCategoryResp
- (*QueryMoneyRecordsResult)(nil), // 12: money.QueryMoneyRecordsResult
- (*InsertMoneyRecordResult)(nil), // 13: money.InsertMoneyRecordResult
- (*UpdateMoneyRecordResult)(nil), // 14: money.UpdateMoneyRecordResult
- (*DeleteMoneyRecordResult)(nil), // 15: money.DeleteMoneyRecordResult
+ (*UpdateMoneyCategoryReq)(nil), // 4: money.UpdateMoneyCategoryReq
+ (*QueryMoneyRecordsParams)(nil), // 5: money.QueryMoneyRecordsParams
+ (*InsertMoneyRecordParams)(nil), // 6: money.InsertMoneyRecordParams
+ (*UpdateMoneyRecordParams)(nil), // 7: money.UpdateMoneyRecordParams
+ (*DeleteMoneyRecordParams)(nil), // 8: money.DeleteMoneyRecordParams
+ (*ListMoneyCategoryResp)(nil), // 9: money.ListMoneyCategoryResp
+ (*DeleteMoneyCategoryResp)(nil), // 10: money.DeleteMoneyCategoryResp
+ (*UpdateMoneyCategorySortResp)(nil), // 11: money.UpdateMoneyCategorySortResp
+ (*CreateMoneyCategoryResp)(nil), // 12: money.CreateMoneyCategoryResp
+ (*UpdateMoneyCategoryResp)(nil), // 13: money.UpdateMoneyCategoryResp
+ (*QueryMoneyRecordsResult)(nil), // 14: money.QueryMoneyRecordsResult
+ (*InsertMoneyRecordResult)(nil), // 15: money.InsertMoneyRecordResult
+ (*UpdateMoneyRecordResult)(nil), // 16: money.UpdateMoneyRecordResult
+ (*DeleteMoneyRecordResult)(nil), // 17: money.DeleteMoneyRecordResult
}
var file_money_proto_depIdxs = []int32{
0, // 0: money.MoneyCategoryService.List:input_type -> money.ListMoneyCategoryReq
1, // 1: money.MoneyCategoryService.DeleteUserMoneyCategory:input_type -> money.DeleteMoneyCategoryReq
2, // 2: money.MoneyCategoryService.UpdateMoneyCategorySort:input_type -> money.UpdateMoneyCategorySortReq
3, // 3: money.MoneyCategoryService.CreateMoneyCategory:input_type -> money.CreateMoneyCategoryReq
- 4, // 4: money.MoneyRecordService.QueryMoneyRecord:input_type -> money.QueryMoneyRecordsParams
- 5, // 5: money.MoneyRecordService.InsertMoneyRecord:input_type -> money.InsertMoneyRecordParams
- 6, // 6: money.MoneyRecordService.UpdateMoneyRecord:input_type -> money.UpdateMoneyRecordParams
- 7, // 7: money.MoneyRecordService.DeleteMoneyRecord:input_type -> money.DeleteMoneyRecordParams
- 8, // 8: money.MoneyCategoryService.List:output_type -> money.ListMoneyCategoryResp
- 9, // 9: money.MoneyCategoryService.DeleteUserMoneyCategory:output_type -> money.DeleteMoneyCategoryResp
- 10, // 10: money.MoneyCategoryService.UpdateMoneyCategorySort:output_type -> money.UpdateMoneyCategorySortResp
- 11, // 11: money.MoneyCategoryService.CreateMoneyCategory:output_type -> money.CreateMoneyCategoryResp
- 12, // 12: money.MoneyRecordService.QueryMoneyRecord:output_type -> money.QueryMoneyRecordsResult
- 13, // 13: money.MoneyRecordService.InsertMoneyRecord:output_type -> money.InsertMoneyRecordResult
- 14, // 14: money.MoneyRecordService.UpdateMoneyRecord:output_type -> money.UpdateMoneyRecordResult
- 15, // 15: money.MoneyRecordService.DeleteMoneyRecord:output_type -> money.DeleteMoneyRecordResult
- 8, // [8:16] is the sub-list for method output_type
- 0, // [0:8] is the sub-list for method input_type
+ 4, // 4: money.MoneyCategoryService.UpdateMoneyCategory:input_type -> money.UpdateMoneyCategoryReq
+ 5, // 5: money.MoneyRecordService.QueryMoneyRecord:input_type -> money.QueryMoneyRecordsParams
+ 6, // 6: money.MoneyRecordService.InsertMoneyRecord:input_type -> money.InsertMoneyRecordParams
+ 7, // 7: money.MoneyRecordService.UpdateMoneyRecord:input_type -> money.UpdateMoneyRecordParams
+ 8, // 8: money.MoneyRecordService.DeleteMoneyRecord:input_type -> money.DeleteMoneyRecordParams
+ 9, // 9: money.MoneyCategoryService.List:output_type -> money.ListMoneyCategoryResp
+ 10, // 10: money.MoneyCategoryService.DeleteUserMoneyCategory:output_type -> money.DeleteMoneyCategoryResp
+ 11, // 11: money.MoneyCategoryService.UpdateMoneyCategorySort:output_type -> money.UpdateMoneyCategorySortResp
+ 12, // 12: money.MoneyCategoryService.CreateMoneyCategory:output_type -> money.CreateMoneyCategoryResp
+ 13, // 13: money.MoneyCategoryService.UpdateMoneyCategory:output_type -> money.UpdateMoneyCategoryResp
+ 14, // 14: money.MoneyRecordService.QueryMoneyRecord:output_type -> money.QueryMoneyRecordsResult
+ 15, // 15: money.MoneyRecordService.InsertMoneyRecord:output_type -> money.InsertMoneyRecordResult
+ 16, // 16: money.MoneyRecordService.UpdateMoneyRecord:output_type -> money.UpdateMoneyRecordResult
+ 17, // 17: money.MoneyRecordService.DeleteMoneyRecord:output_type -> money.DeleteMoneyRecordResult
+ 9, // [9:18] is the sub-list for method output_type
+ 0, // [0:9] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
diff --git a/code/allapp/allapp-go/biz/model/money/money_category_types.pb.go b/code/allapp/allapp-go/biz/model/money/money_category_types.pb.go
index d7a7f90b..b101f19b 100644
--- a/code/allapp/allapp-go/biz/model/money/money_category_types.pb.go
+++ b/code/allapp/allapp-go/biz/model/money/money_category_types.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
-// protoc v4.25.3
+// protoc v6.33.1
// source: money/money_category_types.proto
package money
@@ -536,6 +536,107 @@ func (x *CreateMoneyCategoryResp) GetId() int64 {
return 0
}
+type UpdateMoneyCategoryReq struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id int64 `protobuf:"varint,1,opt,name=Id,proto3" form:"id" json:"id"`
+ Name string `protobuf:"bytes,2,opt,name=Name,proto3" form:"name" json:"name" vd:"$ != ''"`
+ Icon string `protobuf:"bytes,3,opt,name=Icon,proto3" form:"icon" json:"icon" vd:"$ != ''"`
+}
+
+func (x *UpdateMoneyCategoryReq) Reset() {
+ *x = UpdateMoneyCategoryReq{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_money_money_category_types_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateMoneyCategoryReq) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateMoneyCategoryReq) ProtoMessage() {}
+
+func (x *UpdateMoneyCategoryReq) ProtoReflect() protoreflect.Message {
+ mi := &file_money_money_category_types_proto_msgTypes[10]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UpdateMoneyCategoryReq.ProtoReflect.Descriptor instead.
+func (*UpdateMoneyCategoryReq) Descriptor() ([]byte, []int) {
+ return file_money_money_category_types_proto_rawDescGZIP(), []int{10}
+}
+
+func (x *UpdateMoneyCategoryReq) GetId() int64 {
+ if x != nil {
+ return x.Id
+ }
+ return 0
+}
+
+func (x *UpdateMoneyCategoryReq) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *UpdateMoneyCategoryReq) GetIcon() string {
+ if x != nil {
+ return x.Icon
+ }
+ return ""
+}
+
+type UpdateMoneyCategoryResp struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *UpdateMoneyCategoryResp) Reset() {
+ *x = UpdateMoneyCategoryResp{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_money_money_category_types_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateMoneyCategoryResp) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateMoneyCategoryResp) ProtoMessage() {}
+
+func (x *UpdateMoneyCategoryResp) ProtoReflect() protoreflect.Message {
+ mi := &file_money_money_category_types_proto_msgTypes[11]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UpdateMoneyCategoryResp.ProtoReflect.Descriptor instead.
+func (*UpdateMoneyCategoryResp) Descriptor() ([]byte, []int) {
+ return file_money_money_category_types_proto_rawDescGZIP(), []int{11}
+}
+
var File_money_money_category_types_proto protoreflect.FileDescriptor
var file_money_money_category_types_proto_rawDesc = []byte{
@@ -595,7 +696,17 @@ var file_money_money_category_types_proto_rawDesc = []byte{
0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74,
0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x02, 0x49, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x06, 0xca, 0xbb, 0x18, 0x02, 0x69, 0x64, 0x52, 0x02, 0x49,
- 0x64, 0x42, 0x18, 0x5a, 0x16, 0x61, 0x6c, 0x6c, 0x61, 0x70, 0x70, 0x2f, 0x62, 0x69, 0x7a, 0x2f,
+ 0x64, 0x22, 0x82, 0x01, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x6e, 0x65,
+ 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x02,
+ 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x06, 0xca, 0xbb, 0x18, 0x02, 0x69, 0x64,
+ 0x52, 0x02, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x09, 0x42, 0x13, 0xca, 0xbb, 0x18, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0xda, 0xbb, 0x18, 0x07,
+ 0x24, 0x20, 0x21, 0x3d, 0x20, 0x27, 0x27, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a,
+ 0x04, 0x49, 0x63, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x13, 0xca, 0xbb, 0x18,
+ 0x04, 0x69, 0x63, 0x6f, 0x6e, 0xda, 0xbb, 0x18, 0x07, 0x24, 0x20, 0x21, 0x3d, 0x20, 0x27, 0x27,
+ 0x52, 0x04, 0x49, 0x63, 0x6f, 0x6e, 0x22, 0x19, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
+ 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73,
+ 0x70, 0x42, 0x18, 0x5a, 0x16, 0x61, 0x6c, 0x6c, 0x61, 0x70, 0x70, 0x2f, 0x62, 0x69, 0x7a, 0x2f,
0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
@@ -612,7 +723,7 @@ func file_money_money_category_types_proto_rawDescGZIP() []byte {
return file_money_money_category_types_proto_rawDescData
}
-var file_money_money_category_types_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
+var file_money_money_category_types_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
var file_money_money_category_types_proto_goTypes = []interface{}{
(*MoneyCategory)(nil), // 0: money.MoneyCategory
(*ListMoneyCategoryReq)(nil), // 1: money.ListMoneyCategoryReq
@@ -624,6 +735,8 @@ var file_money_money_category_types_proto_goTypes = []interface{}{
(*UpdateMoneyCategorySortResp)(nil), // 7: money.UpdateMoneyCategorySortResp
(*CreateMoneyCategoryReq)(nil), // 8: money.CreateMoneyCategoryReq
(*CreateMoneyCategoryResp)(nil), // 9: money.CreateMoneyCategoryResp
+ (*UpdateMoneyCategoryReq)(nil), // 10: money.UpdateMoneyCategoryReq
+ (*UpdateMoneyCategoryResp)(nil), // 11: money.UpdateMoneyCategoryResp
}
var file_money_money_category_types_proto_depIdxs = []int32{
0, // 0: money.ListMoneyCategoryResp.Categories:type_name -> money.MoneyCategory
@@ -761,6 +874,30 @@ func file_money_money_category_types_proto_init() {
return nil
}
}
+ file_money_money_category_types_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateMoneyCategoryReq); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_money_money_category_types_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateMoneyCategoryResp); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
}
type x struct{}
out := protoimpl.TypeBuilder{
@@ -768,7 +905,7 @@ func file_money_money_category_types_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_money_money_category_types_proto_rawDesc,
NumEnums: 0,
- NumMessages: 10,
+ NumMessages: 12,
NumExtensions: 0,
NumServices: 0,
},
diff --git a/code/allapp/allapp-go/biz/model/money/money_record_types.pb.go b/code/allapp/allapp-go/biz/model/money/money_record_types.pb.go
index e136a038..5336a0c5 100644
--- a/code/allapp/allapp-go/biz/model/money/money_record_types.pb.go
+++ b/code/allapp/allapp-go/biz/model/money/money_record_types.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
-// protoc v4.25.3
+// protoc v6.33.1
// source: money/money_record_types.proto
package money
@@ -22,27 +22,24 @@ const (
)
// 单条记账记录
-type MoneyRecordItem struct {
+type MoneyRecord struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Id int64 `protobuf:"varint,1,opt,name=Id,proto3" form:"id" json:"id"`
- CategoryId int64 `protobuf:"varint,2,opt,name=CategoryId,proto3" form:"category_id" json:"category_id"`
- UserId int64 `protobuf:"varint,3,opt,name=UserId,proto3" form:"user_id" json:"user_id"`
- Amount string `protobuf:"bytes,4,opt,name=Amount,proto3" form:"amount" json:"amount"`
- Remark string `protobuf:"bytes,5,opt,name=Remark,proto3" form:"remark" json:"remark"`
- RecordTime string `protobuf:"bytes,6,opt,name=RecordTime,proto3" form:"record_time" json:"record_time"`
- CreateTime string `protobuf:"bytes,7,opt,name=CreateTime,proto3" form:"create_time" json:"create_time"`
- UpdateTime string `protobuf:"bytes,8,opt,name=UpdateTime,proto3" form:"update_time" json:"update_time"`
- Username string `protobuf:"bytes,9,opt,name=Username,proto3" form:"username" json:"username"`
- CategoryType int32 `protobuf:"varint,10,opt,name=CategoryType,proto3" form:"category_type" json:"category_type"`
- CategoryIcon string `protobuf:"bytes,11,opt,name=CategoryIcon,proto3" form:"category_icon" json:"category_icon"`
- CategoryName string `protobuf:"bytes,12,opt,name=CategoryName,proto3" form:"category_name" json:"category_name"`
+ Id int64 `protobuf:"varint,1,opt,name=Id,proto3" form:"id" json:"id"`
+ CategoryId int64 `protobuf:"varint,2,opt,name=CategoryId,proto3" form:"category_id" json:"category_id"`
+ UserId int64 `protobuf:"varint,3,opt,name=UserId,proto3" form:"user_id" json:"user_id"`
+ Amount string `protobuf:"bytes,4,opt,name=Amount,proto3" form:"amount" json:"amount"`
+ Remark string `protobuf:"bytes,5,opt,name=Remark,proto3" form:"remark" json:"remark"`
+ RecordTime string `protobuf:"bytes,6,opt,name=RecordTime,proto3" form:"record_time" json:"record_time"`
+ CreateTime int64 `protobuf:"varint,7,opt,name=CreateTime,proto3" form:"create_time" json:"create_time"`
+ UpdateTime int64 `protobuf:"varint,8,opt,name=UpdateTime,proto3" form:"update_time" json:"update_time"`
+ Username string `protobuf:"bytes,9,opt,name=Username,proto3" form:"username" json:"username"`
}
-func (x *MoneyRecordItem) Reset() {
- *x = MoneyRecordItem{}
+func (x *MoneyRecord) Reset() {
+ *x = MoneyRecord{}
if protoimpl.UnsafeEnabled {
mi := &file_money_money_record_types_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -50,13 +47,13 @@ func (x *MoneyRecordItem) Reset() {
}
}
-func (x *MoneyRecordItem) String() string {
+func (x *MoneyRecord) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*MoneyRecordItem) ProtoMessage() {}
+func (*MoneyRecord) ProtoMessage() {}
-func (x *MoneyRecordItem) ProtoReflect() protoreflect.Message {
+func (x *MoneyRecord) ProtoReflect() protoreflect.Message {
mi := &file_money_money_record_types_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -68,167 +65,74 @@ func (x *MoneyRecordItem) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use MoneyRecordItem.ProtoReflect.Descriptor instead.
-func (*MoneyRecordItem) Descriptor() ([]byte, []int) {
+// Deprecated: Use MoneyRecord.ProtoReflect.Descriptor instead.
+func (*MoneyRecord) Descriptor() ([]byte, []int) {
return file_money_money_record_types_proto_rawDescGZIP(), []int{0}
}
-func (x *MoneyRecordItem) GetId() int64 {
+func (x *MoneyRecord) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
-func (x *MoneyRecordItem) GetCategoryId() int64 {
+func (x *MoneyRecord) GetCategoryId() int64 {
if x != nil {
return x.CategoryId
}
return 0
}
-func (x *MoneyRecordItem) GetUserId() int64 {
+func (x *MoneyRecord) GetUserId() int64 {
if x != nil {
return x.UserId
}
return 0
}
-func (x *MoneyRecordItem) GetAmount() string {
+func (x *MoneyRecord) GetAmount() string {
if x != nil {
return x.Amount
}
return ""
}
-func (x *MoneyRecordItem) GetRemark() string {
+func (x *MoneyRecord) GetRemark() string {
if x != nil {
return x.Remark
}
return ""
}
-func (x *MoneyRecordItem) GetRecordTime() string {
+func (x *MoneyRecord) GetRecordTime() string {
if x != nil {
return x.RecordTime
}
return ""
}
-func (x *MoneyRecordItem) GetCreateTime() string {
+func (x *MoneyRecord) GetCreateTime() int64 {
if x != nil {
return x.CreateTime
}
- return ""
-}
-
-func (x *MoneyRecordItem) GetUpdateTime() string {
- if x != nil {
- return x.UpdateTime
- }
- return ""
-}
-
-func (x *MoneyRecordItem) GetUsername() string {
- if x != nil {
- return x.Username
- }
- return ""
-}
-
-func (x *MoneyRecordItem) GetCategoryType() int32 {
- if x != nil {
- return x.CategoryType
- }
return 0
}
-func (x *MoneyRecordItem) GetCategoryIcon() string {
+func (x *MoneyRecord) GetUpdateTime() int64 {
if x != nil {
- return x.CategoryIcon
+ return x.UpdateTime
+ }
+ return 0
+}
+
+func (x *MoneyRecord) GetUsername() string {
+ if x != nil {
+ return x.Username
}
return ""
}
-func (x *MoneyRecordItem) GetCategoryName() string {
- if x != nil {
- return x.CategoryName
- }
- return ""
-}
-
-// 同一天的记账记录分组
-type MoneyRecordGroup struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- RecordTime string `protobuf:"bytes,1,opt,name=RecordTime,proto3" form:"record_time" json:"record_time"`
- Expense string `protobuf:"bytes,2,opt,name=Expense,proto3" form:"expense" json:"expense"`
- Income string `protobuf:"bytes,3,opt,name=Income,proto3" form:"income" json:"income"`
- Records []*MoneyRecordItem `protobuf:"bytes,4,rep,name=Records,proto3" form:"records" json:"records"`
-}
-
-func (x *MoneyRecordGroup) Reset() {
- *x = MoneyRecordGroup{}
- if protoimpl.UnsafeEnabled {
- mi := &file_money_money_record_types_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *MoneyRecordGroup) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*MoneyRecordGroup) ProtoMessage() {}
-
-func (x *MoneyRecordGroup) ProtoReflect() protoreflect.Message {
- mi := &file_money_money_record_types_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use MoneyRecordGroup.ProtoReflect.Descriptor instead.
-func (*MoneyRecordGroup) Descriptor() ([]byte, []int) {
- return file_money_money_record_types_proto_rawDescGZIP(), []int{1}
-}
-
-func (x *MoneyRecordGroup) GetRecordTime() string {
- if x != nil {
- return x.RecordTime
- }
- return ""
-}
-
-func (x *MoneyRecordGroup) GetExpense() string {
- if x != nil {
- return x.Expense
- }
- return ""
-}
-
-func (x *MoneyRecordGroup) GetIncome() string {
- if x != nil {
- return x.Income
- }
- return ""
-}
-
-func (x *MoneyRecordGroup) GetRecords() []*MoneyRecordItem {
- if x != nil {
- return x.Records
- }
- return nil
-}
-
// 查询记账记录请求参数
type QueryMoneyRecordsParams struct {
state protoimpl.MessageState
@@ -241,7 +145,7 @@ type QueryMoneyRecordsParams struct {
func (x *QueryMoneyRecordsParams) Reset() {
*x = QueryMoneyRecordsParams{}
if protoimpl.UnsafeEnabled {
- mi := &file_money_money_record_types_proto_msgTypes[2]
+ mi := &file_money_money_record_types_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -254,7 +158,7 @@ func (x *QueryMoneyRecordsParams) String() string {
func (*QueryMoneyRecordsParams) ProtoMessage() {}
func (x *QueryMoneyRecordsParams) ProtoReflect() protoreflect.Message {
- mi := &file_money_money_record_types_proto_msgTypes[2]
+ mi := &file_money_money_record_types_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -267,7 +171,7 @@ func (x *QueryMoneyRecordsParams) ProtoReflect() protoreflect.Message {
// Deprecated: Use QueryMoneyRecordsParams.ProtoReflect.Descriptor instead.
func (*QueryMoneyRecordsParams) Descriptor() ([]byte, []int) {
- return file_money_money_record_types_proto_rawDescGZIP(), []int{2}
+ return file_money_money_record_types_proto_rawDescGZIP(), []int{1}
}
func (x *QueryMoneyRecordsParams) GetRecordTime() string {
@@ -283,16 +187,13 @@ type QueryMoneyRecordsResult struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Records []*MoneyRecordGroup `protobuf:"bytes,1,rep,name=Records,proto3" form:"records" json:"records"`
- TotalIncome string `protobuf:"bytes,2,opt,name=TotalIncome,proto3" form:"total_income" json:"total_income"`
- TotalExpense string `protobuf:"bytes,3,opt,name=TotalExpense,proto3" form:"total_expense" json:"total_expense"`
- TotalBalance string `protobuf:"bytes,4,opt,name=TotalBalance,proto3" form:"total_balance" json:"total_balance"`
+ Records []*MoneyRecord `protobuf:"bytes,1,rep,name=Records,proto3" form:"records" json:"records"`
}
func (x *QueryMoneyRecordsResult) Reset() {
*x = QueryMoneyRecordsResult{}
if protoimpl.UnsafeEnabled {
- mi := &file_money_money_record_types_proto_msgTypes[3]
+ mi := &file_money_money_record_types_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -305,7 +206,7 @@ func (x *QueryMoneyRecordsResult) String() string {
func (*QueryMoneyRecordsResult) ProtoMessage() {}
func (x *QueryMoneyRecordsResult) ProtoReflect() protoreflect.Message {
- mi := &file_money_money_record_types_proto_msgTypes[3]
+ mi := &file_money_money_record_types_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -318,37 +219,16 @@ func (x *QueryMoneyRecordsResult) ProtoReflect() protoreflect.Message {
// Deprecated: Use QueryMoneyRecordsResult.ProtoReflect.Descriptor instead.
func (*QueryMoneyRecordsResult) Descriptor() ([]byte, []int) {
- return file_money_money_record_types_proto_rawDescGZIP(), []int{3}
+ return file_money_money_record_types_proto_rawDescGZIP(), []int{2}
}
-func (x *QueryMoneyRecordsResult) GetRecords() []*MoneyRecordGroup {
+func (x *QueryMoneyRecordsResult) GetRecords() []*MoneyRecord {
if x != nil {
return x.Records
}
return nil
}
-func (x *QueryMoneyRecordsResult) GetTotalIncome() string {
- if x != nil {
- return x.TotalIncome
- }
- return ""
-}
-
-func (x *QueryMoneyRecordsResult) GetTotalExpense() string {
- if x != nil {
- return x.TotalExpense
- }
- return ""
-}
-
-func (x *QueryMoneyRecordsResult) GetTotalBalance() string {
- if x != nil {
- return x.TotalBalance
- }
- return ""
-}
-
// 新增记账记录参数
type InsertMoneyRecordParams struct {
state protoimpl.MessageState
@@ -364,7 +244,7 @@ type InsertMoneyRecordParams struct {
func (x *InsertMoneyRecordParams) Reset() {
*x = InsertMoneyRecordParams{}
if protoimpl.UnsafeEnabled {
- mi := &file_money_money_record_types_proto_msgTypes[4]
+ mi := &file_money_money_record_types_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -377,7 +257,7 @@ func (x *InsertMoneyRecordParams) String() string {
func (*InsertMoneyRecordParams) ProtoMessage() {}
func (x *InsertMoneyRecordParams) ProtoReflect() protoreflect.Message {
- mi := &file_money_money_record_types_proto_msgTypes[4]
+ mi := &file_money_money_record_types_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -390,7 +270,7 @@ func (x *InsertMoneyRecordParams) ProtoReflect() protoreflect.Message {
// Deprecated: Use InsertMoneyRecordParams.ProtoReflect.Descriptor instead.
func (*InsertMoneyRecordParams) Descriptor() ([]byte, []int) {
- return file_money_money_record_types_proto_rawDescGZIP(), []int{4}
+ return file_money_money_record_types_proto_rawDescGZIP(), []int{3}
}
func (x *InsertMoneyRecordParams) GetCategoryId() int64 {
@@ -440,7 +320,7 @@ type InsertMoneyRecordResult struct {
func (x *InsertMoneyRecordResult) Reset() {
*x = InsertMoneyRecordResult{}
if protoimpl.UnsafeEnabled {
- mi := &file_money_money_record_types_proto_msgTypes[5]
+ mi := &file_money_money_record_types_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -453,7 +333,7 @@ func (x *InsertMoneyRecordResult) String() string {
func (*InsertMoneyRecordResult) ProtoMessage() {}
func (x *InsertMoneyRecordResult) ProtoReflect() protoreflect.Message {
- mi := &file_money_money_record_types_proto_msgTypes[5]
+ mi := &file_money_money_record_types_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -466,7 +346,7 @@ func (x *InsertMoneyRecordResult) ProtoReflect() protoreflect.Message {
// Deprecated: Use InsertMoneyRecordResult.ProtoReflect.Descriptor instead.
func (*InsertMoneyRecordResult) Descriptor() ([]byte, []int) {
- return file_money_money_record_types_proto_rawDescGZIP(), []int{5}
+ return file_money_money_record_types_proto_rawDescGZIP(), []int{4}
}
func (x *InsertMoneyRecordResult) GetId() int64 {
@@ -541,7 +421,7 @@ type UpdateMoneyRecordParams struct {
func (x *UpdateMoneyRecordParams) Reset() {
*x = UpdateMoneyRecordParams{}
if protoimpl.UnsafeEnabled {
- mi := &file_money_money_record_types_proto_msgTypes[6]
+ mi := &file_money_money_record_types_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -554,7 +434,7 @@ func (x *UpdateMoneyRecordParams) String() string {
func (*UpdateMoneyRecordParams) ProtoMessage() {}
func (x *UpdateMoneyRecordParams) ProtoReflect() protoreflect.Message {
- mi := &file_money_money_record_types_proto_msgTypes[6]
+ mi := &file_money_money_record_types_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -567,7 +447,7 @@ func (x *UpdateMoneyRecordParams) ProtoReflect() protoreflect.Message {
// Deprecated: Use UpdateMoneyRecordParams.ProtoReflect.Descriptor instead.
func (*UpdateMoneyRecordParams) Descriptor() ([]byte, []int) {
- return file_money_money_record_types_proto_rawDescGZIP(), []int{6}
+ return file_money_money_record_types_proto_rawDescGZIP(), []int{5}
}
func (x *UpdateMoneyRecordParams) GetId() int64 {
@@ -614,7 +494,7 @@ type UpdateMoneyRecordResult struct {
func (x *UpdateMoneyRecordResult) Reset() {
*x = UpdateMoneyRecordResult{}
if protoimpl.UnsafeEnabled {
- mi := &file_money_money_record_types_proto_msgTypes[7]
+ mi := &file_money_money_record_types_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -627,7 +507,7 @@ func (x *UpdateMoneyRecordResult) String() string {
func (*UpdateMoneyRecordResult) ProtoMessage() {}
func (x *UpdateMoneyRecordResult) ProtoReflect() protoreflect.Message {
- mi := &file_money_money_record_types_proto_msgTypes[7]
+ mi := &file_money_money_record_types_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -640,7 +520,7 @@ func (x *UpdateMoneyRecordResult) ProtoReflect() protoreflect.Message {
// Deprecated: Use UpdateMoneyRecordResult.ProtoReflect.Descriptor instead.
func (*UpdateMoneyRecordResult) Descriptor() ([]byte, []int) {
- return file_money_money_record_types_proto_rawDescGZIP(), []int{7}
+ return file_money_money_record_types_proto_rawDescGZIP(), []int{6}
}
// 删除记账记录
@@ -655,7 +535,7 @@ type DeleteMoneyRecordParams struct {
func (x *DeleteMoneyRecordParams) Reset() {
*x = DeleteMoneyRecordParams{}
if protoimpl.UnsafeEnabled {
- mi := &file_money_money_record_types_proto_msgTypes[8]
+ mi := &file_money_money_record_types_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -668,7 +548,7 @@ func (x *DeleteMoneyRecordParams) String() string {
func (*DeleteMoneyRecordParams) ProtoMessage() {}
func (x *DeleteMoneyRecordParams) ProtoReflect() protoreflect.Message {
- mi := &file_money_money_record_types_proto_msgTypes[8]
+ mi := &file_money_money_record_types_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -681,7 +561,7 @@ func (x *DeleteMoneyRecordParams) ProtoReflect() protoreflect.Message {
// Deprecated: Use DeleteMoneyRecordParams.ProtoReflect.Descriptor instead.
func (*DeleteMoneyRecordParams) Descriptor() ([]byte, []int) {
- return file_money_money_record_types_proto_rawDescGZIP(), []int{8}
+ return file_money_money_record_types_proto_rawDescGZIP(), []int{7}
}
func (x *DeleteMoneyRecordParams) GetId() int64 {
@@ -700,7 +580,7 @@ type DeleteMoneyRecordResult struct {
func (x *DeleteMoneyRecordResult) Reset() {
*x = DeleteMoneyRecordResult{}
if protoimpl.UnsafeEnabled {
- mi := &file_money_money_record_types_proto_msgTypes[9]
+ mi := &file_money_money_record_types_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -713,7 +593,7 @@ func (x *DeleteMoneyRecordResult) String() string {
func (*DeleteMoneyRecordResult) ProtoMessage() {}
func (x *DeleteMoneyRecordResult) ProtoReflect() protoreflect.Message {
- mi := &file_money_money_record_types_proto_msgTypes[9]
+ mi := &file_money_money_record_types_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -726,7 +606,7 @@ func (x *DeleteMoneyRecordResult) ProtoReflect() protoreflect.Message {
// Deprecated: Use DeleteMoneyRecordResult.ProtoReflect.Descriptor instead.
func (*DeleteMoneyRecordResult) Descriptor() ([]byte, []int) {
- return file_money_money_record_types_proto_rawDescGZIP(), []int{9}
+ return file_money_money_record_types_proto_rawDescGZIP(), []int{8}
}
var File_money_money_record_types_proto protoreflect.FileDescriptor
@@ -735,139 +615,105 @@ var file_money_money_record_types_proto_rawDesc = []byte{
0x0a, 0x1e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2f, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x5f, 0x72, 0x65,
0x63, 0x6f, 0x72, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x12, 0x05, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x1a, 0x09, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x22, 0xa9, 0x04, 0x0a, 0x0f, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f,
- 0x72, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x16, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x03, 0x42, 0x06, 0xca, 0xbb, 0x18, 0x02, 0x69, 0x64, 0x52, 0x02, 0x49, 0x64, 0x12, 0x2f,
- 0x0a, 0x0a, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x03, 0x42, 0x0f, 0xca, 0xbb, 0x18, 0x0b, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79,
- 0x5f, 0x69, 0x64, 0x52, 0x0a, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12,
- 0x23, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42,
- 0x0b, 0xca, 0xbb, 0x18, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x52, 0x06, 0x55, 0x73,
- 0x65, 0x72, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04,
- 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xca, 0xbb, 0x18, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74,
- 0x52, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x06, 0x52, 0x65, 0x6d, 0x61,
- 0x72, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xca, 0xbb, 0x18, 0x06, 0x72, 0x65,
- 0x6d, 0x61, 0x72, 0x6b, 0x52, 0x06, 0x52, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x2f, 0x0a, 0x0a,
- 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
- 0x42, 0x0f, 0xca, 0xbb, 0x18, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x74, 0x69, 0x6d,
- 0x65, 0x52, 0x0a, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2f, 0x0a,
- 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28,
- 0x09, 0x42, 0x0f, 0xca, 0xbb, 0x18, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69,
- 0x6d, 0x65, 0x52, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2f,
- 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01,
- 0x28, 0x09, 0x42, 0x0f, 0xca, 0xbb, 0x18, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74,
- 0x69, 0x6d, 0x65, 0x52, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12,
- 0x28, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28,
- 0x09, 0x42, 0x0c, 0xca, 0xbb, 0x18, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52,
- 0x08, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x0c, 0x43, 0x61, 0x74,
- 0x65, 0x67, 0x6f, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x42,
- 0x11, 0xca, 0xbb, 0x18, 0x0d, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x5f, 0x74, 0x79,
- 0x70, 0x65, 0x52, 0x0c, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65,
- 0x12, 0x35, 0x0a, 0x0c, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49, 0x63, 0x6f, 0x6e,
- 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x11, 0xca, 0xbb, 0x18, 0x0d, 0x63, 0x61, 0x74, 0x65,
- 0x67, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x63, 0x6f, 0x6e, 0x52, 0x0c, 0x43, 0x61, 0x74, 0x65, 0x67,
- 0x6f, 0x72, 0x79, 0x49, 0x63, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x0c, 0x43, 0x61, 0x74, 0x65, 0x67,
- 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x42, 0x11, 0xca,
- 0xbb, 0x18, 0x0d, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
- 0x52, 0x0c, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xcd,
- 0x01, 0x0a, 0x10, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x47, 0x72,
- 0x6f, 0x75, 0x70, 0x12, 0x2f, 0x0a, 0x0a, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x54, 0x69, 0x6d,
- 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0f, 0xca, 0xbb, 0x18, 0x0b, 0x72, 0x65, 0x63,
- 0x6f, 0x72, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x0a, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
- 0x54, 0x69, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x07, 0x45, 0x78, 0x70, 0x65, 0x6e, 0x73, 0x65, 0x18,
- 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xca, 0xbb, 0x18, 0x07, 0x65, 0x78, 0x70, 0x65, 0x6e,
- 0x73, 0x65, 0x52, 0x07, 0x45, 0x78, 0x70, 0x65, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x06, 0x49,
- 0x6e, 0x63, 0x6f, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xca, 0xbb, 0x18,
- 0x06, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x65, 0x52, 0x06, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x65, 0x12,
- 0x3d, 0x0a, 0x07, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b,
- 0x32, 0x16, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65,
- 0x63, 0x6f, 0x72, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x42, 0x0b, 0xca, 0xbb, 0x18, 0x07, 0x72, 0x65,
- 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x07, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x22, 0x4a,
- 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f,
- 0x72, 0x64, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2f, 0x0a, 0x0a, 0x52, 0x65, 0x63,
- 0x6f, 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0f, 0xca,
- 0xbb, 0x18, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x0a,
- 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xfb, 0x01, 0x0a, 0x17, 0x51,
- 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73,
- 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x3e, 0x0a, 0x07, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
- 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e,
- 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70,
- 0x42, 0x0b, 0xca, 0xbb, 0x18, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x07, 0x52,
- 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x32, 0x0a, 0x0b, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x49,
- 0x6e, 0x63, 0x6f, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x10, 0xca, 0xbb, 0x18,
- 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x65, 0x52, 0x0b, 0x54,
- 0x6f, 0x74, 0x61, 0x6c, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x0c, 0x54, 0x6f,
- 0x74, 0x61, 0x6c, 0x45, 0x78, 0x70, 0x65, 0x6e, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
- 0x42, 0x11, 0xca, 0xbb, 0x18, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x65,
- 0x6e, 0x73, 0x65, 0x52, 0x0c, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x45, 0x78, 0x70, 0x65, 0x6e, 0x73,
- 0x65, 0x12, 0x35, 0x0a, 0x0c, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63,
- 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x11, 0xca, 0xbb, 0x18, 0x0d, 0x74, 0x6f, 0x74,
- 0x61, 0x6c, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x0c, 0x54, 0x6f, 0x74, 0x61,
- 0x6c, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x22, 0xa4, 0x02, 0x0a, 0x17, 0x49, 0x6e, 0x73,
- 0x65, 0x72, 0x74, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x50, 0x61,
- 0x72, 0x61, 0x6d, 0x73, 0x12, 0x38, 0x0a, 0x0a, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79,
- 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x18, 0xca, 0xbb, 0x18, 0x0b, 0x63, 0x61,
- 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0xda, 0xbb, 0x18, 0x05, 0x24, 0x21, 0x3d,
- 0x27, 0x27, 0x52, 0x0a, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x4d,
- 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x35,
- 0xca, 0xbb, 0x18, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0xda, 0xbb, 0x18, 0x27, 0x24, 0x21,
- 0x3d, 0x27, 0x27, 0x20, 0x26, 0x26, 0x20, 0x72, 0x65, 0x67, 0x65, 0x78, 0x70, 0x28, 0x27, 0x5e,
- 0x5c, 0x64, 0x2b, 0x28, 0x5c, 0x2e, 0x5c, 0x64, 0x7b, 0x31, 0x2c, 0x32, 0x7d, 0x29, 0x3f, 0x24,
- 0x27, 0x2c, 0x20, 0x24, 0x29, 0x52, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x22, 0x0a,
- 0x06, 0x52, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xca,
- 0xbb, 0x18, 0x06, 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x52, 0x06, 0x52, 0x65, 0x6d, 0x61, 0x72,
- 0x6b, 0x12, 0x5c, 0x0a, 0x0a, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18,
- 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xca, 0xbb, 0x18, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x72,
- 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0xda, 0xbb, 0x18, 0x29, 0x24, 0x21, 0x3d, 0x27, 0x27, 0x20,
- 0x26, 0x26, 0x20, 0x72, 0x65, 0x67, 0x65, 0x78, 0x70, 0x28, 0x27, 0x5e, 0x5c, 0x64, 0x7b, 0x34,
- 0x7d, 0x2d, 0x5c, 0x64, 0x7b, 0x32, 0x7d, 0x2d, 0x5c, 0x64, 0x7b, 0x32, 0x7d, 0x24, 0x27, 0x2c,
- 0x20, 0x24, 0x29, 0x52, 0x0a, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22,
- 0xe2, 0x02, 0x0a, 0x17, 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52,
- 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x49,
- 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x06, 0xca, 0xbb, 0x18, 0x02, 0x69, 0x64, 0x52,
- 0x02, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x0a, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49,
- 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x0f, 0xca, 0xbb, 0x18, 0x0b, 0x63, 0x61, 0x74,
- 0x65, 0x67, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x52, 0x0a, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f,
- 0x72, 0x79, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03,
- 0x20, 0x01, 0x28, 0x03, 0x42, 0x0b, 0xca, 0xbb, 0x18, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69,
- 0x64, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x06, 0x41, 0x6d, 0x6f,
- 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xca, 0xbb, 0x18, 0x06, 0x61,
- 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x22, 0x0a,
- 0x06, 0x52, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xca,
- 0xbb, 0x18, 0x06, 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x52, 0x06, 0x52, 0x65, 0x6d, 0x61, 0x72,
- 0x6b, 0x12, 0x2f, 0x0a, 0x0a, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18,
- 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0f, 0xca, 0xbb, 0x18, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x72,
- 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x0a, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x54, 0x69,
- 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65,
- 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0f, 0xca, 0xbb, 0x18, 0x0b, 0x63, 0x72, 0x65, 0x61,
- 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54,
- 0x69, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d,
- 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0f, 0xca, 0xbb, 0x18, 0x0b, 0x75, 0x70, 0x64,
- 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
- 0x54, 0x69, 0x6d, 0x65, 0x22, 0xe3, 0x01, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d,
- 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73,
- 0x12, 0x1e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x0e, 0xca, 0xbb,
- 0x18, 0x02, 0x69, 0x64, 0xda, 0xbb, 0x18, 0x04, 0x24, 0x21, 0x3d, 0x30, 0x52, 0x02, 0x49, 0x64,
- 0x12, 0x2f, 0x0a, 0x0a, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x18, 0x02,
- 0x20, 0x01, 0x28, 0x03, 0x42, 0x0f, 0xca, 0xbb, 0x18, 0x0b, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f,
- 0x72, 0x79, 0x5f, 0x69, 0x64, 0x52, 0x0a, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49,
- 0x64, 0x12, 0x22, 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28,
- 0x09, 0x42, 0x0a, 0xca, 0xbb, 0x18, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x06, 0x41,
- 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x06, 0x52, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x18,
- 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xca, 0xbb, 0x18, 0x06, 0x72, 0x65, 0x6d, 0x61, 0x72,
- 0x6b, 0x52, 0x06, 0x52, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x2f, 0x0a, 0x0a, 0x52, 0x65, 0x63,
- 0x6f, 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0f, 0xca,
- 0xbb, 0x18, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x0a,
- 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x55, 0x70,
- 0x64, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52,
- 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x39, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d,
- 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73,
- 0x12, 0x1e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x0e, 0xca, 0xbb,
- 0x18, 0x02, 0x69, 0x64, 0xda, 0xbb, 0x18, 0x04, 0x24, 0x21, 0x3d, 0x30, 0x52, 0x02, 0x49, 0x64,
- 0x22, 0x19, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52,
- 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x18, 0x5a, 0x16, 0x61,
- 0x6c, 0x6c, 0x61, 0x70, 0x70, 0x2f, 0x62, 0x69, 0x7a, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f,
- 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x74, 0x6f, 0x22, 0x80, 0x03, 0x0a, 0x0b, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f,
+ 0x72, 0x64, 0x12, 0x16, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x06,
+ 0xca, 0xbb, 0x18, 0x02, 0x69, 0x64, 0x52, 0x02, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x0a, 0x43, 0x61,
+ 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x0f,
+ 0xca, 0xbb, 0x18, 0x0b, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x52,
+ 0x0a, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x06, 0x55,
+ 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x0b, 0xca, 0xbb, 0x18,
+ 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64,
+ 0x12, 0x22, 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
+ 0x42, 0x0a, 0xca, 0xbb, 0x18, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x06, 0x41, 0x6d,
+ 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x06, 0x52, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x05,
+ 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xca, 0xbb, 0x18, 0x06, 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b,
+ 0x52, 0x06, 0x52, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x2f, 0x0a, 0x0a, 0x52, 0x65, 0x63, 0x6f,
+ 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0f, 0xca, 0xbb,
+ 0x18, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x0a, 0x52,
+ 0x65, 0x63, 0x6f, 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x0a, 0x43, 0x72, 0x65,
+ 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x42, 0x0f, 0xca,
+ 0xbb, 0x18, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x0a,
+ 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x0a, 0x55, 0x70,
+ 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x42, 0x0f,
+ 0xca, 0xbb, 0x18, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x52,
+ 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x08, 0x55,
+ 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0xca,
+ 0xbb, 0x18, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x08, 0x55, 0x73, 0x65,
+ 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x4a, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f,
+ 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73,
+ 0x12, 0x2f, 0x0a, 0x0a, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x42, 0x0f, 0xca, 0xbb, 0x18, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64,
+ 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x0a, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x54, 0x69, 0x6d,
+ 0x65, 0x22, 0x54, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52,
+ 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x39, 0x0a, 0x07,
+ 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e,
+ 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72,
+ 0x64, 0x42, 0x0b, 0xca, 0xbb, 0x18, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x07,
+ 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x22, 0xa4, 0x02, 0x0a, 0x17, 0x49, 0x6e, 0x73, 0x65,
+ 0x72, 0x74, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x50, 0x61, 0x72,
+ 0x61, 0x6d, 0x73, 0x12, 0x38, 0x0a, 0x0a, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49,
+ 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x18, 0xca, 0xbb, 0x18, 0x0b, 0x63, 0x61, 0x74,
+ 0x65, 0x67, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0xda, 0xbb, 0x18, 0x05, 0x24, 0x21, 0x3d, 0x27,
+ 0x27, 0x52, 0x0a, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x4d, 0x0a,
+ 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x35, 0xca,
+ 0xbb, 0x18, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0xda, 0xbb, 0x18, 0x27, 0x24, 0x21, 0x3d,
+ 0x27, 0x27, 0x20, 0x26, 0x26, 0x20, 0x72, 0x65, 0x67, 0x65, 0x78, 0x70, 0x28, 0x27, 0x5e, 0x5c,
+ 0x64, 0x2b, 0x28, 0x5c, 0x2e, 0x5c, 0x64, 0x7b, 0x31, 0x2c, 0x32, 0x7d, 0x29, 0x3f, 0x24, 0x27,
+ 0x2c, 0x20, 0x24, 0x29, 0x52, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x06,
+ 0x52, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xca, 0xbb,
+ 0x18, 0x06, 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x52, 0x06, 0x52, 0x65, 0x6d, 0x61, 0x72, 0x6b,
+ 0x12, 0x5c, 0x0a, 0x0a, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x04,
+ 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xca, 0xbb, 0x18, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64,
+ 0x5f, 0x74, 0x69, 0x6d, 0x65, 0xda, 0xbb, 0x18, 0x29, 0x24, 0x21, 0x3d, 0x27, 0x27, 0x20, 0x26,
+ 0x26, 0x20, 0x72, 0x65, 0x67, 0x65, 0x78, 0x70, 0x28, 0x27, 0x5e, 0x5c, 0x64, 0x7b, 0x34, 0x7d,
+ 0x2d, 0x5c, 0x64, 0x7b, 0x32, 0x7d, 0x2d, 0x5c, 0x64, 0x7b, 0x32, 0x7d, 0x24, 0x27, 0x2c, 0x20,
+ 0x24, 0x29, 0x52, 0x0a, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xe2,
+ 0x02, 0x0a, 0x17, 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65,
+ 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x49, 0x64,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x06, 0xca, 0xbb, 0x18, 0x02, 0x69, 0x64, 0x52, 0x02,
+ 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x0a, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49, 0x64,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x0f, 0xca, 0xbb, 0x18, 0x0b, 0x63, 0x61, 0x74, 0x65,
+ 0x67, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x52, 0x0a, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72,
+ 0x79, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x03, 0x42, 0x0b, 0xca, 0xbb, 0x18, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64,
+ 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75,
+ 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xca, 0xbb, 0x18, 0x06, 0x61, 0x6d,
+ 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x06,
+ 0x52, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xca, 0xbb,
+ 0x18, 0x06, 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x52, 0x06, 0x52, 0x65, 0x6d, 0x61, 0x72, 0x6b,
+ 0x12, 0x2f, 0x0a, 0x0a, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x06,
+ 0x20, 0x01, 0x28, 0x09, 0x42, 0x0f, 0xca, 0xbb, 0x18, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64,
+ 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x0a, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x54, 0x69, 0x6d,
+ 0x65, 0x12, 0x2f, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18,
+ 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0f, 0xca, 0xbb, 0x18, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74,
+ 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69,
+ 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65,
+ 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0f, 0xca, 0xbb, 0x18, 0x0b, 0x75, 0x70, 0x64, 0x61,
+ 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54,
+ 0x69, 0x6d, 0x65, 0x22, 0xe3, 0x01, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x6f,
+ 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12,
+ 0x1e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x0e, 0xca, 0xbb, 0x18,
+ 0x02, 0x69, 0x64, 0xda, 0xbb, 0x18, 0x04, 0x24, 0x21, 0x3d, 0x30, 0x52, 0x02, 0x49, 0x64, 0x12,
+ 0x2f, 0x0a, 0x0a, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x03, 0x42, 0x0f, 0xca, 0xbb, 0x18, 0x0b, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72,
+ 0x79, 0x5f, 0x69, 0x64, 0x52, 0x0a, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49, 0x64,
+ 0x12, 0x22, 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
+ 0x42, 0x0a, 0xca, 0xbb, 0x18, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x06, 0x41, 0x6d,
+ 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x06, 0x52, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x04,
+ 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xca, 0xbb, 0x18, 0x06, 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b,
+ 0x52, 0x06, 0x52, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x2f, 0x0a, 0x0a, 0x52, 0x65, 0x63, 0x6f,
+ 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0f, 0xca, 0xbb,
+ 0x18, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x0a, 0x52,
+ 0x65, 0x63, 0x6f, 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x55, 0x70, 0x64,
+ 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65,
+ 0x73, 0x75, 0x6c, 0x74, 0x22, 0x39, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x6f,
+ 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12,
+ 0x1e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x0e, 0xca, 0xbb, 0x18,
+ 0x02, 0x69, 0x64, 0xda, 0xbb, 0x18, 0x04, 0x24, 0x21, 0x3d, 0x30, 0x52, 0x02, 0x49, 0x64, 0x22,
+ 0x19, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65,
+ 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x18, 0x5a, 0x16, 0x61, 0x6c,
+ 0x6c, 0x61, 0x70, 0x70, 0x2f, 0x62, 0x69, 0x7a, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x6d,
+ 0x6f, 0x6e, 0x65, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -882,27 +728,25 @@ func file_money_money_record_types_proto_rawDescGZIP() []byte {
return file_money_money_record_types_proto_rawDescData
}
-var file_money_money_record_types_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
+var file_money_money_record_types_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
var file_money_money_record_types_proto_goTypes = []interface{}{
- (*MoneyRecordItem)(nil), // 0: money.MoneyRecordItem
- (*MoneyRecordGroup)(nil), // 1: money.MoneyRecordGroup
- (*QueryMoneyRecordsParams)(nil), // 2: money.QueryMoneyRecordsParams
- (*QueryMoneyRecordsResult)(nil), // 3: money.QueryMoneyRecordsResult
- (*InsertMoneyRecordParams)(nil), // 4: money.InsertMoneyRecordParams
- (*InsertMoneyRecordResult)(nil), // 5: money.InsertMoneyRecordResult
- (*UpdateMoneyRecordParams)(nil), // 6: money.UpdateMoneyRecordParams
- (*UpdateMoneyRecordResult)(nil), // 7: money.UpdateMoneyRecordResult
- (*DeleteMoneyRecordParams)(nil), // 8: money.DeleteMoneyRecordParams
- (*DeleteMoneyRecordResult)(nil), // 9: money.DeleteMoneyRecordResult
+ (*MoneyRecord)(nil), // 0: money.MoneyRecord
+ (*QueryMoneyRecordsParams)(nil), // 1: money.QueryMoneyRecordsParams
+ (*QueryMoneyRecordsResult)(nil), // 2: money.QueryMoneyRecordsResult
+ (*InsertMoneyRecordParams)(nil), // 3: money.InsertMoneyRecordParams
+ (*InsertMoneyRecordResult)(nil), // 4: money.InsertMoneyRecordResult
+ (*UpdateMoneyRecordParams)(nil), // 5: money.UpdateMoneyRecordParams
+ (*UpdateMoneyRecordResult)(nil), // 6: money.UpdateMoneyRecordResult
+ (*DeleteMoneyRecordParams)(nil), // 7: money.DeleteMoneyRecordParams
+ (*DeleteMoneyRecordResult)(nil), // 8: money.DeleteMoneyRecordResult
}
var file_money_money_record_types_proto_depIdxs = []int32{
- 0, // 0: money.MoneyRecordGroup.Records:type_name -> money.MoneyRecordItem
- 1, // 1: money.QueryMoneyRecordsResult.Records:type_name -> money.MoneyRecordGroup
- 2, // [2:2] is the sub-list for method output_type
- 2, // [2:2] is the sub-list for method input_type
- 2, // [2:2] is the sub-list for extension type_name
- 2, // [2:2] is the sub-list for extension extendee
- 0, // [0:2] is the sub-list for field type_name
+ 0, // 0: money.QueryMoneyRecordsResult.Records:type_name -> money.MoneyRecord
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
}
func init() { file_money_money_record_types_proto_init() }
@@ -912,7 +756,7 @@ func file_money_money_record_types_proto_init() {
}
if !protoimpl.UnsafeEnabled {
file_money_money_record_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*MoneyRecordItem); i {
+ switch v := v.(*MoneyRecord); i {
case 0:
return &v.state
case 1:
@@ -924,18 +768,6 @@ func file_money_money_record_types_proto_init() {
}
}
file_money_money_record_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*MoneyRecordGroup); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_money_money_record_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*QueryMoneyRecordsParams); i {
case 0:
return &v.state
@@ -947,7 +779,7 @@ func file_money_money_record_types_proto_init() {
return nil
}
}
- file_money_money_record_types_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ file_money_money_record_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*QueryMoneyRecordsResult); i {
case 0:
return &v.state
@@ -959,7 +791,7 @@ func file_money_money_record_types_proto_init() {
return nil
}
}
- file_money_money_record_types_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ file_money_money_record_types_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*InsertMoneyRecordParams); i {
case 0:
return &v.state
@@ -971,7 +803,7 @@ func file_money_money_record_types_proto_init() {
return nil
}
}
- file_money_money_record_types_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ file_money_money_record_types_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*InsertMoneyRecordResult); i {
case 0:
return &v.state
@@ -983,7 +815,7 @@ func file_money_money_record_types_proto_init() {
return nil
}
}
- file_money_money_record_types_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ file_money_money_record_types_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdateMoneyRecordParams); i {
case 0:
return &v.state
@@ -995,7 +827,7 @@ func file_money_money_record_types_proto_init() {
return nil
}
}
- file_money_money_record_types_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+ file_money_money_record_types_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdateMoneyRecordResult); i {
case 0:
return &v.state
@@ -1007,7 +839,7 @@ func file_money_money_record_types_proto_init() {
return nil
}
}
- file_money_money_record_types_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+ file_money_money_record_types_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteMoneyRecordParams); i {
case 0:
return &v.state
@@ -1019,7 +851,7 @@ func file_money_money_record_types_proto_init() {
return nil
}
}
- file_money_money_record_types_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+ file_money_money_record_types_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteMoneyRecordResult); i {
case 0:
return &v.state
@@ -1038,7 +870,7 @@ func file_money_money_record_types_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_money_money_record_types_proto_rawDesc,
NumEnums: 0,
- NumMessages: 10,
+ NumMessages: 9,
NumExtensions: 0,
NumServices: 0,
},
diff --git a/code/allapp/allapp-go/biz/router/money/middleware.go b/code/allapp/allapp-go/biz/router/money/middleware.go
index 53b264c2..bc0d5d84 100644
--- a/code/allapp/allapp-go/biz/router/money/middleware.go
+++ b/code/allapp/allapp-go/biz/router/money/middleware.go
@@ -70,3 +70,8 @@ func _listMw() []app.HandlerFunc {
// your code...
return nil
}
+
+func _updatemoneycategoryMw() []app.HandlerFunc {
+ // your code...
+ return nil
+}
diff --git a/code/allapp/allapp-go/biz/router/money/money.go b/code/allapp/allapp-go/biz/router/money/money.go
index c7c07817..096c3ae5 100644
--- a/code/allapp/allapp-go/biz/router/money/money.go
+++ b/code/allapp/allapp-go/biz/router/money/money.go
@@ -23,6 +23,7 @@ func Register(r *server.Hertz) {
_category := _money.Group("/category", _categoryMw()...)
_category.POST("/create", append(_createmoneycategoryMw(), money.CreateMoneyCategory)...)
_category.POST("/delete", append(_deleteusermoneycategoryMw(), money.DeleteUserMoneyCategory)...)
+ _category.POST("/update", append(_updatemoneycategoryMw(), money.UpdateMoneyCategory)...)
_category.POST("/updateSort", append(_updatemoneycategorysortMw(), money.UpdateMoneyCategorySort)...)
{
_record := _money.Group("/record", _recordMw()...)
diff --git a/code/allapp/allapp-go/db/queries/money_record.sql b/code/allapp/allapp-go/db/queries/money_record.sql
index 8e0bf310..67632155 100644
--- a/code/allapp/allapp-go/db/queries/money_record.sql
+++ b/code/allapp/allapp-go/db/queries/money_record.sql
@@ -1,11 +1,6 @@
-- name: FindUserMoneyRecords :many
-SELECT
- mr.*,
- muc.name AS category_name,
- muc.icon AS category_icon,
- muc.type AS category_type
+SELECT mr.*
FROM money_record mr
- LEFT JOIN money_user_category muc ON mr.category_id = muc.id
WHERE mr.user_id = $1
AND mr.record_time BETWEEN $2 AND $3
ORDER BY mr.record_time DESC, mr.create_time DESC;
@@ -13,17 +8,17 @@ ORDER BY mr.record_time DESC, mr.create_time DESC;
-- name: FindMoneyRecordsBySpace :many
SELECT
mr.*,
- u.username AS username,
- muc.name AS category_name,
- muc.icon AS category_icon,
- muc.type AS category_type
+ u.username AS username
FROM money_record mr
- LEFT JOIN money_user_category muc ON mr.category_id = muc.id
- INNER JOIN space_user su ON mr.user_id = su.user_id AND su.space_id = $1
- LEFT JOIN user_info u ON mr.user_id = u.id
+ INNER JOIN space_user su
+ ON mr.user_id = su.user_id
+ AND su.space_id = $1
+ LEFT JOIN user_info u
+ ON mr.user_id = u.id
WHERE mr.record_time BETWEEN $2 AND $3
ORDER BY mr.record_time DESC, mr.create_time DESC;
+
-- name: InsertMoneyRecord :one
INSERT INTO money_record (
id,
diff --git a/code/allapp/allapp-go/db/queries/money_user_category.sql b/code/allapp/allapp-go/db/queries/money_user_category.sql
index 68b8e762..873b364b 100644
--- a/code/allapp/allapp-go/db/queries/money_user_category.sql
+++ b/code/allapp/allapp-go/db/queries/money_user_category.sql
@@ -21,10 +21,10 @@ DELETE FROM money_user_category
WHERE user_id = $1;
-- name: InsertMoneyUserCategory :exec
-INSERT INTO money_user_category (id, user_id, name, icon, type, sort_number)
-VALUES ($1, $2, $3, $4, $5, $6);
+INSERT INTO money_user_category (id, user_id, name, icon, type, sort_number,create_time,update_time)
+VALUES ($1, $2, $3, $4, $5, $6,NOW(),NOW());
-- name: UpdateMoneyCategory :exec
UPDATE money_user_category
-SET icon = $2,name = $3
+SET icon = $2,name = $3,update_time = NOW()
WHERE id = $1;
\ No newline at end of file
diff --git a/code/allapp/allapp-go/db/repo/models.go b/code/allapp/allapp-go/db/repo/models.go
index 41e8b28a..27104c83 100644
--- a/code/allapp/allapp-go/db/repo/models.go
+++ b/code/allapp/allapp-go/db/repo/models.go
@@ -14,7 +14,7 @@ type MoneyRecord struct {
UserID int64
Amount pgtype.Numeric
Remark pgtype.Text
- RecordTime pgtype.Timestamp
+ RecordTime pgtype.Date
CreateTime pgtype.Timestamp
UpdateTime pgtype.Timestamp
}
diff --git a/code/allapp/allapp-go/db/repo/money_record.sql.go b/code/allapp/allapp-go/db/repo/money_record.sql.go
index c52f4821..fbb8b2ce 100644
--- a/code/allapp/allapp-go/db/repo/money_record.sql.go
+++ b/code/allapp/allapp-go/db/repo/money_record.sql.go
@@ -23,37 +23,33 @@ func (q *Queries) DeleteMoneyRecord(ctx context.Context, id int64) error {
const findMoneyRecordsBySpace = `-- name: FindMoneyRecordsBySpace :many
SELECT
mr.id, mr.category_id, mr.user_id, mr.amount, mr.remark, mr.record_time, mr.create_time, mr.update_time,
- u.username AS username,
- muc.name AS category_name,
- muc.icon AS category_icon,
- muc.type AS category_type
+ u.username AS username
FROM money_record mr
- LEFT JOIN money_user_category muc ON mr.category_id = muc.id
- INNER JOIN space_user su ON mr.user_id = su.user_id AND su.space_id = $1
- LEFT JOIN user_info u ON mr.user_id = u.id
+ INNER JOIN space_user su
+ ON mr.user_id = su.user_id
+ AND su.space_id = $1
+ LEFT JOIN user_info u
+ ON mr.user_id = u.id
WHERE mr.record_time BETWEEN $2 AND $3
ORDER BY mr.record_time DESC, mr.create_time DESC
`
type FindMoneyRecordsBySpaceParams struct {
SpaceID int64
- RecordTime pgtype.Timestamp
- RecordTime_2 pgtype.Timestamp
+ RecordTime pgtype.Date
+ RecordTime_2 pgtype.Date
}
type FindMoneyRecordsBySpaceRow struct {
- ID int64
- CategoryID int64
- UserID int64
- Amount pgtype.Numeric
- Remark pgtype.Text
- RecordTime pgtype.Timestamp
- CreateTime pgtype.Timestamp
- UpdateTime pgtype.Timestamp
- Username pgtype.Text
- CategoryName pgtype.Text
- CategoryIcon pgtype.Text
- CategoryType pgtype.Int4
+ ID int64
+ CategoryID int64
+ UserID int64
+ Amount pgtype.Numeric
+ Remark pgtype.Text
+ RecordTime pgtype.Date
+ CreateTime pgtype.Timestamp
+ UpdateTime pgtype.Timestamp
+ Username pgtype.Text
}
func (q *Queries) FindMoneyRecordsBySpace(ctx context.Context, arg FindMoneyRecordsBySpaceParams) ([]FindMoneyRecordsBySpaceRow, error) {
@@ -75,9 +71,6 @@ func (q *Queries) FindMoneyRecordsBySpace(ctx context.Context, arg FindMoneyReco
&i.CreateTime,
&i.UpdateTime,
&i.Username,
- &i.CategoryName,
- &i.CategoryIcon,
- &i.CategoryType,
); err != nil {
return nil, err
}
@@ -90,13 +83,8 @@ func (q *Queries) FindMoneyRecordsBySpace(ctx context.Context, arg FindMoneyReco
}
const findUserMoneyRecords = `-- name: FindUserMoneyRecords :many
-SELECT
- mr.id, mr.category_id, mr.user_id, mr.amount, mr.remark, mr.record_time, mr.create_time, mr.update_time,
- muc.name AS category_name,
- muc.icon AS category_icon,
- muc.type AS category_type
+SELECT mr.id, mr.category_id, mr.user_id, mr.amount, mr.remark, mr.record_time, mr.create_time, mr.update_time
FROM money_record mr
- LEFT JOIN money_user_category muc ON mr.category_id = muc.id
WHERE mr.user_id = $1
AND mr.record_time BETWEEN $2 AND $3
ORDER BY mr.record_time DESC, mr.create_time DESC
@@ -104,33 +92,19 @@ ORDER BY mr.record_time DESC, mr.create_time DESC
type FindUserMoneyRecordsParams struct {
UserID int64
- RecordTime pgtype.Timestamp
- RecordTime_2 pgtype.Timestamp
+ RecordTime pgtype.Date
+ RecordTime_2 pgtype.Date
}
-type FindUserMoneyRecordsRow struct {
- ID int64
- CategoryID int64
- UserID int64
- Amount pgtype.Numeric
- Remark pgtype.Text
- RecordTime pgtype.Timestamp
- CreateTime pgtype.Timestamp
- UpdateTime pgtype.Timestamp
- CategoryName pgtype.Text
- CategoryIcon pgtype.Text
- CategoryType pgtype.Int4
-}
-
-func (q *Queries) FindUserMoneyRecords(ctx context.Context, arg FindUserMoneyRecordsParams) ([]FindUserMoneyRecordsRow, error) {
+func (q *Queries) FindUserMoneyRecords(ctx context.Context, arg FindUserMoneyRecordsParams) ([]MoneyRecord, error) {
rows, err := q.db.Query(ctx, findUserMoneyRecords, arg.UserID, arg.RecordTime, arg.RecordTime_2)
if err != nil {
return nil, err
}
defer rows.Close()
- var items []FindUserMoneyRecordsRow
+ var items []MoneyRecord
for rows.Next() {
- var i FindUserMoneyRecordsRow
+ var i MoneyRecord
if err := rows.Scan(
&i.ID,
&i.CategoryID,
@@ -140,9 +114,6 @@ func (q *Queries) FindUserMoneyRecords(ctx context.Context, arg FindUserMoneyRec
&i.RecordTime,
&i.CreateTime,
&i.UpdateTime,
- &i.CategoryName,
- &i.CategoryIcon,
- &i.CategoryType,
); err != nil {
return nil, err
}
@@ -196,7 +167,7 @@ type InsertMoneyRecordParams struct {
UserID int64
Amount pgtype.Numeric
Remark pgtype.Text
- RecordTime pgtype.Timestamp
+ RecordTime pgtype.Date
}
func (q *Queries) InsertMoneyRecord(ctx context.Context, arg InsertMoneyRecordParams) (MoneyRecord, error) {
@@ -239,7 +210,7 @@ type UpdateMoneyRecordParams struct {
CategoryID int64
Amount pgtype.Numeric
Remark pgtype.Text
- RecordTime pgtype.Timestamp
+ RecordTime pgtype.Date
}
func (q *Queries) UpdateMoneyRecord(ctx context.Context, arg UpdateMoneyRecordParams) error {
diff --git a/code/allapp/allapp-go/db/repo/money_user_category.sql.go b/code/allapp/allapp-go/db/repo/money_user_category.sql.go
index 57b52a4b..e5107c77 100644
--- a/code/allapp/allapp-go/db/repo/money_user_category.sql.go
+++ b/code/allapp/allapp-go/db/repo/money_user_category.sql.go
@@ -73,8 +73,8 @@ func (q *Queries) FindUserMoneyCategoriesByUserID(ctx context.Context, userID in
}
const insertMoneyUserCategory = `-- name: InsertMoneyUserCategory :exec
-INSERT INTO money_user_category (id, user_id, name, icon, type, sort_number)
-VALUES ($1, $2, $3, $4, $5, $6)
+INSERT INTO money_user_category (id, user_id, name, icon, type, sort_number,create_time,update_time)
+VALUES ($1, $2, $3, $4, $5, $6,NOW(),NOW())
`
type InsertMoneyUserCategoryParams struct {
@@ -97,3 +97,20 @@ func (q *Queries) InsertMoneyUserCategory(ctx context.Context, arg InsertMoneyUs
)
return err
}
+
+const updateMoneyCategory = `-- name: UpdateMoneyCategory :exec
+UPDATE money_user_category
+SET icon = $2,name = $3,update_time = NOW()
+WHERE id = $1
+`
+
+type UpdateMoneyCategoryParams struct {
+ ID int64
+ Icon string
+ Name string
+}
+
+func (q *Queries) UpdateMoneyCategory(ctx context.Context, arg UpdateMoneyCategoryParams) error {
+ _, err := q.db.Exec(ctx, updateMoneyCategory, arg.ID, arg.Icon, arg.Name)
+ return err
+}
diff --git a/code/allapp/allapp-go/db/schema.sql b/code/allapp/allapp-go/db/schema.sql
index 89de2d6b..176a8481 100644
--- a/code/allapp/allapp-go/db/schema.sql
+++ b/code/allapp/allapp-go/db/schema.sql
@@ -18,9 +18,9 @@ CREATE TABLE money_record(
user_id BIGINT NOT NULL,
amount NUMERIC(12,2) NOT NULL,
remark VARCHAR(255) DEFAULT '',
- record_time timestamp NOT NULL,
- create_time timestamp DEFAULT CURRENT_TIMESTAMP,
- update_time timestamp DEFAULT CURRENT_TIMESTAMP
+ record_time DATE NOT NULL,
+ create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+ update_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE money_sys_category(
diff --git a/code/allapp/allapp-go/idl/money/money.proto b/code/allapp/allapp-go/idl/money/money.proto
index fb4d466c..36401bcc 100644
--- a/code/allapp/allapp-go/idl/money/money.proto
+++ b/code/allapp/allapp-go/idl/money/money.proto
@@ -7,6 +7,7 @@ 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){
@@ -21,6 +22,9 @@ service MoneyCategoryService {
rpc CreateMoneyCategory(CreateMoneyCategoryReq) returns (CreateMoneyCategoryResp){
option (api.post) = '/money/category/create';
};
+ rpc UpdateMoneyCategory(UpdateMoneyCategoryReq) returns (UpdateMoneyCategoryResp){
+ option (api.post) = '/money/category/update';
+ };
}
service MoneyRecordService {
diff --git a/code/allapp/allapp-go/idl/money/money_category_types.proto b/code/allapp/allapp-go/idl/money/money_category_types.proto
index c01ada2b..47e27809 100644
--- a/code/allapp/allapp-go/idl/money/money_category_types.proto
+++ b/code/allapp/allapp-go/idl/money/money_category_types.proto
@@ -60,3 +60,19 @@ message CreateMoneyCategoryReq {
message CreateMoneyCategoryResp {
int64 Id = 1 [(api.body)="id"];
}
+
+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 {}
diff --git a/code/allapp/allapp-go/idl/money/money_record_types.proto b/code/allapp/allapp-go/idl/money/money_record_types.proto
index da8f9028..dc80f3aa 100644
--- a/code/allapp/allapp-go/idl/money/money_record_types.proto
+++ b/code/allapp/allapp-go/idl/money/money_record_types.proto
@@ -7,30 +7,18 @@ import "api.proto";
// 单条记账记录
-message MoneyRecordItem {
+message MoneyRecord {
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"];
+ int64 CreateTime = 7 [(api.body)="create_time"];
+ int64 UpdateTime = 8 [(api.body)="update_time"];
string Username = 9 [(api.body)="username"];
- int32 CategoryType = 10 [(api.body)="category_type"];
- string CategoryIcon = 11 [(api.body)="category_icon"];
- string CategoryName = 12 [(api.body)="category_name"];
}
-// 同一天的记账记录分组
-message MoneyRecordGroup {
- string RecordTime = 1 [(api.body)="record_time"];
-
- string Expense = 2 [(api.body)="expense"];
- string Income = 3 [(api.body)="income"];
-
- repeated MoneyRecordItem Records = 4 [(api.body)="records"];
-}
// 查询记账记录请求参数
message QueryMoneyRecordsParams {
@@ -39,11 +27,7 @@ message QueryMoneyRecordsParams {
// 查询记账记录结果
message QueryMoneyRecordsResult {
- repeated MoneyRecordGroup Records = 1 [(api.body)="records"];
-
- string TotalIncome = 2 [(api.body)="total_income"];
- string TotalExpense = 3 [(api.body)="total_expense"];
- string TotalBalance = 4 [(api.body)="total_balance"];
+ repeated MoneyRecord Records = 1 [(api.body)="records"];
}
// 新增记账记录参数
diff --git a/code/allapp/allapp-go/utils/pgtypex/pgtypex.go b/code/allapp/allapp-go/utils/pgtypex/pgtypex.go
index 28ef7203..92c1aa1c 100644
--- a/code/allapp/allapp-go/utils/pgtypex/pgtypex.go
+++ b/code/allapp/allapp-go/utils/pgtypex/pgtypex.go
@@ -1,10 +1,11 @@
package pgtypex
import (
- "github.com/jackc/pgx/v5/pgtype"
- "github.com/shopspring/decimal"
"strings"
"time"
+
+ "github.com/jackc/pgx/v5/pgtype"
+ "github.com/shopspring/decimal"
)
func NumericToString(n pgtype.Numeric) string {
@@ -123,3 +124,11 @@ func StringToDate(s string) pgtype.Date {
Valid: true,
}
}
+
+func TimestampToMillis(ts pgtype.Timestamp) int64 {
+ return ts.Time.UnixMilli()
+}
+
+func DateToString(s pgtype.Date) string {
+ return s.Time.String()
+}
diff --git a/code/allapp/allapp-rn/src/app/(tabs)/money/index.tsx b/code/allapp/allapp-rn/src/app/(tabs)/money/index.tsx
index 00ebcf83..44e9c131 100644
--- a/code/allapp/allapp-rn/src/app/(tabs)/money/index.tsx
+++ b/code/allapp/allapp-rn/src/app/(tabs)/money/index.tsx
@@ -1,5 +1,5 @@
-import { useRouter } from 'expo-router'
-import React, { useEffect, useState } from 'react'
+import { useFocusEffect, useRouter } from 'expo-router'
+import React, { useCallback, useEffect, useState } from 'react'
import { Image, Text, TouchableOpacity, View } from 'react-native'
import { Drawer } from 'react-native-drawer-layout'
import { SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-context'
@@ -52,6 +52,17 @@ export default function Money() {
getMoneyRecords()
}, [appStore.ready, searchParams])
+ useFocusEffect(
+ useCallback(() => {
+ // 页面显示 / 返回时
+ console.log('===shohw===')
+
+ return () => {
+ // 页面离开(可选)
+ }
+ }, []),
+ )
+
return (
void
type: MoneyCategoryEnum
-
+ category: MoneyCategoryItem | null
onConfirm?: (form: EditCategoryForm) => Promise
}
@@ -32,6 +33,7 @@ export default function CreateCategory({
onClose,
type,
onConfirm,
+ category,
}: EditCategoryProps) {
const moneyCategoryStore = useMoneyCategoryStore()
@@ -58,6 +60,12 @@ export default function CreateCategory({
}
}, [form.name, form.icon])
+ useEffect(() => {
+ if (category !== null) {
+ setForm(category)
+ }
+ }, [category])
+
function handleClose() {
setIsOpen(false)
onClose && onClose()
@@ -116,6 +124,7 @@ export default function CreateCategory({
{
setForm((val) => {
diff --git a/code/allapp/allapp-rn/src/app/money/category/setting/index.tsx b/code/allapp/allapp-rn/src/app/money/category/setting/index.tsx
index cdbc1b24..e36a21e6 100644
--- a/code/allapp/allapp-rn/src/app/money/category/setting/index.tsx
+++ b/code/allapp/allapp-rn/src/app/money/category/setting/index.tsx
@@ -25,7 +25,9 @@ export default function MoneyCategorySetting() {
const [draggingDeleteZone, setDraggingDeleteZone] = useState(false)
const [deleteTimer, setDeleteTimer] = useState(null)
- const [openCreateCategory, setOpenCreateCategory] = useState(false)
+ const [showEditCategory, setshowEditCategory] = useState(false)
+
+ const [selectedCategory, setSelectedCategory] = useState(null)
useEffect(() => {
setCategories(selectedTab === MoneyCategoryEnum.Expense ? moneyCategoryStore.getExpenseCategories() : moneyCategoryStore.getIncomeCategories())
@@ -35,7 +37,8 @@ export default function MoneyCategorySetting() {
({ item }) => (
{
- console.log('点击进入编辑')
+ setSelectedCategory(item)
+ setshowEditCategory(true)
}}
className="flex flex-col items-center justify-center"
>
@@ -64,33 +67,49 @@ export default function MoneyCategorySetting() {
)
async function handleConfirmEdit(form: EditCategoryForm) {
- const isDuplicate = moneyCategoryStore.isDuplicateCategory(form.name, selectedTab)
+ const isDuplicate = moneyCategoryStore.isDuplicateCategory(
+ form.name,
+ selectedTab,
+ form.id ?? null,
+ )
if (isDuplicate) {
toast.show({
type: 'warning',
title: '类别不能重复',
})
-
return
}
try {
- await moneyCategoryStore.createCategory({
- id: 0,
- name: form.name,
- icon: form.icon,
- sort_number: 0,
- type: selectedTab,
- })
+ if (form.id != null) {
+ await moneyCategoryStore.updateCategory({
+ id: form.id,
+ name: form.name,
+ icon: form.icon,
+ type: selectedTab,
+ sort_number: 0,
+ })
+ }
+ else {
+ await moneyCategoryStore.createCategory({
+ id: 0,
+ name: form.name,
+ icon: form.icon,
+ sort_number: 0,
+ type: selectedTab,
+ })
+ }
- setOpenCreateCategory(false)
+ setshowEditCategory(false)
}
catch (err) {
const message
= err instanceof Error
? err.message
- : '新增失败,请稍后再试'
+ : form.id != null
+ ? '更新失败,请稍后再试'
+ : '新增失败,请稍后再试'
toast.show({
type: 'error',
@@ -133,7 +152,7 @@ export default function MoneyCategorySetting() {
clickable: false,
}}
onPress={(() =>
- setOpenCreateCategory(true)
+ setshowEditCategory(true)
)}
>
新增
@@ -228,8 +247,12 @@ export default function MoneyCategorySetting() {
setOpenCreateCategory(false)}
+ open={showEditCategory}
+ onClose={() => {
+ setshowEditCategory(false)
+ setSelectedCategory(null)
+ }}
+ category={selectedCategory}
onConfirm={handleConfirmEdit}
/>
diff --git a/code/allapp/allapp-rn/src/request/api/money/category.ts b/code/allapp/allapp-rn/src/request/api/money/category.ts
index fc49f699..20224b1e 100644
--- a/code/allapp/allapp-rn/src/request/api/money/category.ts
+++ b/code/allapp/allapp-rn/src/request/api/money/category.ts
@@ -1,4 +1,4 @@
-import type { CreateMoneyCategoryParams, CreateMoneyCategoryResult, DeleteMoneyCategoryParams, QueryMoneyCategoryResult, UpdateMoneyCategorySortParams } from '@/types/money/category'
+import type { CreateMoneyCategoryParams, CreateMoneyCategoryResult, DeleteMoneyCategoryParams, QueryMoneyCategoryResult, UpdateMoneyCategoryParams, UpdateMoneyCategoryResult, UpdateMoneyCategorySortParams } from '@/types/money/category'
import alovaInstance from '../../index'
const API_PREFIX = '/money/category'
@@ -18,3 +18,7 @@ export function updateMoneyCategorySortApi(params: UpdateMoneyCategorySortParams
export function createMoneyCategoryApi(params: CreateMoneyCategoryParams) {
return alovaInstance.Post>(`${API_PREFIX}/create`, params)
}
+
+export function updateMoneyCategoryApi(params: UpdateMoneyCategoryParams) {
+ return alovaInstance.Post>(`${API_PREFIX}/update`, params)
+}
diff --git a/code/allapp/allapp-rn/src/store/moneyCategory.ts b/code/allapp/allapp-rn/src/store/moneyCategory.ts
index d0b48ef2..f6f479bc 100644
--- a/code/allapp/allapp-rn/src/store/moneyCategory.ts
+++ b/code/allapp/allapp-rn/src/store/moneyCategory.ts
@@ -1,6 +1,6 @@
-import type { MoneyCategoryItem, UpdateMoneyCategorySortItem } from '@/types/money/category'
+import type { MoneyCategoryItem } from '@/types/money/category'
import { create } from 'zustand'
-import { createMoneyCategoryApi, deleteMoneyCategoryApi, queryMoneyCategoryApi, updateMoneyCategorySortApi } from '@/request/api/money/category'
+import { createMoneyCategoryApi, deleteMoneyCategoryApi, queryMoneyCategoryApi, updateMoneyCategoryApi, updateMoneyCategorySortApi } from '@/request/api/money/category'
import { MoneyCategoryEnum } from '@/types/money/category'
interface MoneyCategoryStore {
@@ -16,10 +16,11 @@ interface MoneyCategoryStore {
getCategoryById: (id: number) => MoneyCategoryItem | null
createCategory: (category: MoneyCategoryItem) => Promise
+ updateCategory: (category: MoneyCategoryItem) => Promise
updateSortNumbers: (data: MoneyCategoryItem[], type: number) => Promise
deleteCategoryById: (id: number) => Promise
- isDuplicateCategory: (name: string, type: number) => boolean
+ isDuplicateCategory: (name: string, type: number, excludeId: number | null) => boolean
clear: () => void
}
@@ -162,6 +163,36 @@ export const useMoneyCategoryStore = create()(
}
},
+ updateCategory: async (category) => {
+ try {
+ const res = await updateMoneyCategoryApi({
+ id: category.id,
+ name: category.name,
+ icon: category.icon,
+ })
+
+ if (!res.isSuccess) {
+ throw new Error(res.message)
+ }
+
+ // 更新本地 categories
+ set(state => ({
+ categories: state.categories.map(c =>
+ c.id !== category.id
+ ? c
+ : {
+ ...c,
+ ...category,
+ },
+ ),
+ }))
+ }
+ catch (err) {
+ console.error(err)
+ throw err
+ }
+ },
+
updateSortNumbers: async (data, type) => {
const payload = data.map((item, index) => ({
id: item.id,
@@ -207,9 +238,13 @@ export const useMoneyCategoryStore = create()(
}
},
- isDuplicateCategory: (name, type) => {
+ isDuplicateCategory: (name, type, excludeId) => {
const categories = get().categories || []
- return categories.some(c => c.name === name && c.type === type)
+ return categories.some(c =>
+ c.name === name
+ && c.type === type
+ && c.id !== excludeId,
+ )
},
}),
)
diff --git a/code/allapp/allapp-rn/src/types/money/category.ts b/code/allapp/allapp-rn/src/types/money/category.ts
index 3944158d..ee6f222a 100644
--- a/code/allapp/allapp-rn/src/types/money/category.ts
+++ b/code/allapp/allapp-rn/src/types/money/category.ts
@@ -44,3 +44,11 @@ export interface CreateMoneyCategoryParams {
export interface CreateMoneyCategoryResult {
id: number
}
+
+export interface UpdateMoneyCategoryParams {
+ id: number
+ name: string
+ icon: string
+}
+export interface UpdateMoneyCategoryResult {
+}