This commit is contained in:
oneao committed 2025-11-30 22:40:56 +08:00
1 parent 5308dc8fda
commit d51eacb8ad
32 files changed
+1788 -513

No files matched your search

@@ -4,13 +4,14 @@ package auth
import (
"cn/oneao/base-go/db"
dbtype "cn/oneao/base-go/db/sqlc"
"cn/oneao/base-go/db/repo"
"cn/oneao/base-go/logx"
"cn/oneao/base-go/utils/jwtx"
"cn/oneao/base-go/utils/response"
"context"
"cn/oneao/base-go/biz/model/auth"
"github.com/cloudwego/hertz/pkg/app"
"github.com/cloudwego/hertz/pkg/protocol/consts"
)
@@ -30,7 +31,7 @@ func LoginDefault(ctx context.Context, c *app.RequestContext) {
account := req.Account
password := req.Password
params := dbtype.GetUserForLoginParams{
params := repo.GetUserForLoginParams{
Account: account,
Password: password,
}
@@ -5,11 +5,12 @@ package auth
import (
auth "cn/oneao/base-go/biz/model/auth"
"cn/oneao/base-go/db"
dbtype "cn/oneao/base-go/db/sqlc"
"cn/oneao/base-go/db/repo"
"cn/oneao/base-go/utils/errorx"
"cn/oneao/base-go/utils/idgen"
"cn/oneao/base-go/utils/response"
"context"
"github.com/cloudwego/hertz/pkg/app"
"github.com/cloudwego/hertz/pkg/protocol/consts"
"github.com/jackc/pgx/v5"
@@ -64,7 +65,7 @@ func RegisterDefault(ctx context.Context, c *app.RequestContext) {
}()
// 插入用户
params := dbtype.InsertUserParams{
params := repo.InsertUserParams{
ID: idgen.NextId(),
Account: account,
Password: password,
@@ -96,9 +97,9 @@ func initMoneyCategoryTx(ctx context.Context, tx pgx.Tx, userId int64) error {
return nil
}
userCategories := make([]dbtype.BatchInsertMoneyUserCategoriesParams, 0, len(sysCategories))
userCategories := make([]repo.BatchInsertMoneyUserCategoriesParams, 0, len(sysCategories))
for _, sysCat := range sysCategories {
userCategories = append(userCategories, dbtype.BatchInsertMoneyUserCategoriesParams{
userCategories = append(userCategories, repo.BatchInsertMoneyUserCategoriesParams{
ID: idgen.NextId(),
UserID: userId,
Name: sysCat.Name,
@@ -9,6 +9,7 @@ import (
"context"
auth "cn/oneao/base-go/biz/model/auth"
"github.com/cloudwego/hertz/pkg/app"
"github.com/cloudwego/hertz/pkg/protocol/consts"
)
@@ -1,14 +1,16 @@
// Code generated by hertz generator.
package money_category
package money
import (
money_category "cn/oneao/base-go/biz/model/money_category"
"cn/oneao/base-go/biz/model/money"
"cn/oneao/base-go/biz/router/middleware"
"cn/oneao/base-go/db"
"cn/oneao/base-go/db/repo"
"cn/oneao/base-go/utils/errorx"
"cn/oneao/base-go/utils/response"
"context"
"github.com/cloudwego/hertz/pkg/app"
"github.com/cloudwego/hertz/pkg/protocol/consts"
)
@@ -17,7 +19,7 @@ import (
// @router /money/category [GET]
func QueryUserMoneyCategory(ctx context.Context, c *app.RequestContext) {
var err error
var req money_category.QueryUserMoneyCategoryReq
var req money.QueryMoneyCategoryReq
err = c.BindAndValidate(&req)
if err != nil {
c.String(consts.StatusBadRequest, err.Error())
@@ -34,18 +36,18 @@ func QueryUserMoneyCategory(ctx context.Context, c *app.RequestContext) {
}
// 构造返回数据,切片类型是 []*UserMoneyCategory
resp := &money_category.QueryUserMoneyCategoryResp{
Categories: make([]*money_category.UserMoneyCategory, 0, len(moneyUserCategories)),
resp := &money.QueryMoneyCategoryResp{
Categories: make([]*money.MoneyCategory, 0, len(moneyUserCategories)),
}
for _, c := range moneyUserCategories {
category := &money_category.UserMoneyCategory{
category := &money.MoneyCategory{
Id: c.ID,
Name: c.Name,
Icon: c.Icon,
Type: c.Type.Int32,
SortNumber: c.SortNumber.Int32,
Type: c.Type,
SortNumber: c.SortNumber,
}
resp.Categories = append(resp.Categories, category)
}
@@ -54,10 +56,10 @@ func QueryUserMoneyCategory(ctx context.Context, c *app.RequestContext) {
}
// DeleteUserMoneyCategory .
// @router /money/category/delete [GET]
// @router /money/category/delete [POST]
func DeleteUserMoneyCategory(ctx context.Context, c *app.RequestContext) {
var err error
var req money_category.DeleteUserMoneyCategoryReq
var req money.DeleteMoneyCategoryReq
err = c.BindAndValidate(&req)
if err != nil {
c.String(consts.StatusBadRequest, err.Error())
@@ -71,7 +73,45 @@ func DeleteUserMoneyCategory(ctx context.Context, c *app.RequestContext) {
return
}
resp := new(money_category.DeleteUserMoneyCategoryResp)
resp := new(money.DeleteMoneyCategoryResp)
response.Success(c).Data(resp).Send()
}
// UpdateMoneyCategorySort .
// @router /money/category/updateSort [POST]
func UpdateMoneyCategorySort(ctx context.Context, c *app.RequestContext) {
var req money.UpdateMoneyCategorySortReq
if err := c.BindAndValidate(&req); err != nil {
c.String(consts.StatusBadRequest, err.Error())
return
}
// 组装批量更新参数
params := make([]repo.BatchUpdateMoneyCategorySortParams, 0, len(req.Data))
for _, datum := range req.Data {
params = append(params, repo.BatchUpdateMoneyCategorySortParams{
ID: datum.Id,
SortNumber: datum.SortNumber,
})
}
// 使用统一事务封装
err := db.WithTx(ctx, func(q *repo.Queries) error {
batch := q.BatchUpdateMoneyCategorySort(ctx, params)
if err := db.RunBatch(ctx, batch); err != nil {
return err
}
return nil
})
if err != nil {
errorx.AddError(c, err)
return
}
// 返回成功
response.Success(c).Send()
}
@@ -0,0 +1,131 @@
// Code generated by hertz generator.
package money
import (
"cn/oneao/base-go/biz/router/middleware"
"cn/oneao/base-go/db"
"cn/oneao/base-go/db/repo"
"cn/oneao/base-go/utils/errorx"
"cn/oneao/base-go/utils/response"
"context"
"fmt"
"sort"
"time"
money "cn/oneao/base-go/biz/model/money"
"github.com/cloudwego/hertz/pkg/app"
"github.com/cloudwego/hertz/pkg/protocol/consts"
"github.com/jackc/pgx/v5/pgtype"
"github.com/shopspring/decimal"
"google.golang.org/protobuf/types/known/timestamppb"
)
// QueryMoneyRecord .
// @router /money/record [POST]
func QueryMoneyRecord(ctx context.Context, c *app.RequestContext) {
var req money.QueryMoneyRecordsParams
if err := c.BindAndValidate(&req); err != nil {
c.String(consts.StatusBadRequest, err.Error())
return
}
// 解析年月
startTime, err := time.Parse("2006-01", req.RecordTime)
if err != nil {
errorx.AddError(c, fmt.Errorf("invalid record_time format: %v", err))
return
}
endTime := startTime.AddDate(0, 1, 0).Add(-time.Nanosecond)
// 获取 userID
userID := middleware.GetUserID(ctx)
// 查询记录
params := repo.FindUserMoneyRecordsParams{
UserID: userID,
RecordTime: pgtype.Timestamp{Time: startTime, Valid: true},
RecordTime_2: pgtype.Timestamp{Time: endTime, Valid: true},
}
records, err := db.Queries.FindUserMoneyRecords(ctx, params)
if err != nil {
errorx.AddError(c, err)
return
}
// 分组统计
groupMap := make(map[string]*money.MoneyRecordGroup)
totalIncome := decimal.NewFromInt(0)
totalExpense := decimal.NewFromInt(0)
for _, r := range records {
day := r.RecordTime.Time.Format("2006-01-02")
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
}
// 构造单条记录
item := &money.MoneyRecordItem{
Base: &money.MoneyRecordBase{
Id: r.ID,
CategoryId: r.CategoryID,
UserId: r.UserID,
Amount: r.Amount.Int.String(),
Remark: r.Remark.String,
RecordTime: timestamppb.New(r.RecordTime.Time),
CreateTime: timestamppb.New(r.CreateTime.Time),
UpdateTime: timestamppb.New(r.UpdateTime.Time),
},
CategoryName: r.CategoryName.String,
CategoryIcon: r.CategoryIcon.String,
CategoryType: r.CategoryType.Int32,
}
group.Records = append(group.Records, item)
// 收支累加
amount, _ := decimal.NewFromString(r.Amount.Int.String())
if r.CategoryType.Int32 == 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.Int32 == 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),
}
response.Success(c).Data(result).Send()
}
@@ -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
@@ -0,0 +1,639 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v6.33.1
// source: money_category.proto
package money
import (
_ "cn/oneao/base-go/biz/model/api"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type QueryMoneyCategoryReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *QueryMoneyCategoryReq) Reset() {
*x = QueryMoneyCategoryReq{}
if protoimpl.UnsafeEnabled {
mi := &file_money_category_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *QueryMoneyCategoryReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*QueryMoneyCategoryReq) ProtoMessage() {}
func (x *QueryMoneyCategoryReq) ProtoReflect() protoreflect.Message {
mi := &file_money_category_proto_msgTypes[0]
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 QueryMoneyCategoryReq.ProtoReflect.Descriptor instead.
func (*QueryMoneyCategoryReq) Descriptor() ([]byte, []int) {
return file_money_category_proto_rawDescGZIP(), []int{0}
}
type MoneyCategory struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int64 `protobuf:"varint,1,opt,name=id,proto3" form:"id" json:"id" query:"id"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" form:"name" json:"name" query:"name"`
Icon string `protobuf:"bytes,3,opt,name=icon,proto3" form:"icon" json:"icon" query:"icon"`
Type int32 `protobuf:"varint,4,opt,name=type,proto3" form:"type" json:"type" query:"type"`
SortNumber int32 `protobuf:"varint,5,opt,name=sort_number,json=sortNumber,proto3" form:"sort_number" json:"sort_number" query:"sort_number"`
}
func (x *MoneyCategory) Reset() {
*x = MoneyCategory{}
if protoimpl.UnsafeEnabled {
mi := &file_money_category_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MoneyCategory) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MoneyCategory) ProtoMessage() {}
func (x *MoneyCategory) ProtoReflect() protoreflect.Message {
mi := &file_money_category_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 MoneyCategory.ProtoReflect.Descriptor instead.
func (*MoneyCategory) Descriptor() ([]byte, []int) {
return file_money_category_proto_rawDescGZIP(), []int{1}
}
func (x *MoneyCategory) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *MoneyCategory) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *MoneyCategory) GetIcon() string {
if x != nil {
return x.Icon
}
return ""
}
func (x *MoneyCategory) GetType() int32 {
if x != nil {
return x.Type
}
return 0
}
func (x *MoneyCategory) GetSortNumber() int32 {
if x != nil {
return x.SortNumber
}
return 0
}
type QueryMoneyCategoryResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Categories []*MoneyCategory `protobuf:"bytes,1,rep,name=categories,proto3" form:"categories" json:"categories" query:"categories"`
}
func (x *QueryMoneyCategoryResp) Reset() {
*x = QueryMoneyCategoryResp{}
if protoimpl.UnsafeEnabled {
mi := &file_money_category_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *QueryMoneyCategoryResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*QueryMoneyCategoryResp) ProtoMessage() {}
func (x *QueryMoneyCategoryResp) ProtoReflect() protoreflect.Message {
mi := &file_money_category_proto_msgTypes[2]
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 QueryMoneyCategoryResp.ProtoReflect.Descriptor instead.
func (*QueryMoneyCategoryResp) Descriptor() ([]byte, []int) {
return file_money_category_proto_rawDescGZIP(), []int{2}
}
func (x *QueryMoneyCategoryResp) GetCategories() []*MoneyCategory {
if x != nil {
return x.Categories
}
return nil
}
type DeleteMoneyCategoryReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int64 `protobuf:"varint,1,opt,name=Id,proto3" form:"id" json:"id" vd:"$ != 0"`
}
func (x *DeleteMoneyCategoryReq) Reset() {
*x = DeleteMoneyCategoryReq{}
if protoimpl.UnsafeEnabled {
mi := &file_money_category_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeleteMoneyCategoryReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteMoneyCategoryReq) ProtoMessage() {}
func (x *DeleteMoneyCategoryReq) ProtoReflect() protoreflect.Message {
mi := &file_money_category_proto_msgTypes[3]
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 DeleteMoneyCategoryReq.ProtoReflect.Descriptor instead.
func (*DeleteMoneyCategoryReq) Descriptor() ([]byte, []int) {
return file_money_category_proto_rawDescGZIP(), []int{3}
}
func (x *DeleteMoneyCategoryReq) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
type DeleteMoneyCategoryResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *DeleteMoneyCategoryResp) Reset() {
*x = DeleteMoneyCategoryResp{}
if protoimpl.UnsafeEnabled {
mi := &file_money_category_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeleteMoneyCategoryResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteMoneyCategoryResp) ProtoMessage() {}
func (x *DeleteMoneyCategoryResp) ProtoReflect() protoreflect.Message {
mi := &file_money_category_proto_msgTypes[4]
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 DeleteMoneyCategoryResp.ProtoReflect.Descriptor instead.
func (*DeleteMoneyCategoryResp) Descriptor() ([]byte, []int) {
return file_money_category_proto_rawDescGZIP(), []int{4}
}
type MoneyCategorySortItem struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int64 `protobuf:"varint,1,opt,name=id,proto3" form:"id" json:"id" query:"id"`
SortNumber int32 `protobuf:"varint,2,opt,name=sort_number,json=sortNumber,proto3" form:"sort_number" json:"sort_number" query:"sort_number"`
}
func (x *MoneyCategorySortItem) Reset() {
*x = MoneyCategorySortItem{}
if protoimpl.UnsafeEnabled {
mi := &file_money_category_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MoneyCategorySortItem) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MoneyCategorySortItem) ProtoMessage() {}
func (x *MoneyCategorySortItem) ProtoReflect() protoreflect.Message {
mi := &file_money_category_proto_msgTypes[5]
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 MoneyCategorySortItem.ProtoReflect.Descriptor instead.
func (*MoneyCategorySortItem) Descriptor() ([]byte, []int) {
return file_money_category_proto_rawDescGZIP(), []int{5}
}
func (x *MoneyCategorySortItem) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *MoneyCategorySortItem) GetSortNumber() int32 {
if x != nil {
return x.SortNumber
}
return 0
}
type UpdateMoneyCategorySortReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Data []*MoneyCategorySortItem `protobuf:"bytes,1,rep,name=data,proto3" form:"data" json:"data" query:"data"`
}
func (x *UpdateMoneyCategorySortReq) Reset() {
*x = UpdateMoneyCategorySortReq{}
if protoimpl.UnsafeEnabled {
mi := &file_money_category_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UpdateMoneyCategorySortReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdateMoneyCategorySortReq) ProtoMessage() {}
func (x *UpdateMoneyCategorySortReq) ProtoReflect() protoreflect.Message {
mi := &file_money_category_proto_msgTypes[6]
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 UpdateMoneyCategorySortReq.ProtoReflect.Descriptor instead.
func (*UpdateMoneyCategorySortReq) Descriptor() ([]byte, []int) {
return file_money_category_proto_rawDescGZIP(), []int{6}
}
func (x *UpdateMoneyCategorySortReq) GetData() []*MoneyCategorySortItem {
if x != nil {
return x.Data
}
return nil
}
type UpdateMoneyCategorySortResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *UpdateMoneyCategorySortResp) Reset() {
*x = UpdateMoneyCategorySortResp{}
if protoimpl.UnsafeEnabled {
mi := &file_money_category_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UpdateMoneyCategorySortResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdateMoneyCategorySortResp) ProtoMessage() {}
func (x *UpdateMoneyCategorySortResp) ProtoReflect() protoreflect.Message {
mi := &file_money_category_proto_msgTypes[7]
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 UpdateMoneyCategorySortResp.ProtoReflect.Descriptor instead.
func (*UpdateMoneyCategorySortResp) Descriptor() ([]byte, []int) {
return file_money_category_proto_rawDescGZIP(), []int{7}
}
var File_money_category_proto protoreflect.FileDescriptor
var file_money_category_proto_rawDesc = []byte{
0x0a, 0x14, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79,
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, 0x17, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72,
0x79, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65,
0x71, 0x22, 0x7c, 0x0a, 0x0d, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f,
0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02,
0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x03,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79,
0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1f,
0x0a, 0x0b, 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20,
0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x6f, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22,
0x4e, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74,
0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x34, 0x0a, 0x0a, 0x63, 0x61, 0x74,
0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e,
0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67,
0x6f, 0x72, 0x79, 0x52, 0x0a, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x22,
0x3a, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61,
0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x02, 0x49, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x10, 0xca, 0xbb, 0x18, 0x02, 0x69, 0x64, 0xda, 0xbb, 0x18,
0x06, 0x24, 0x20, 0x21, 0x3d, 0x20, 0x30, 0x52, 0x02, 0x49, 0x64, 0x22, 0x19, 0x0a, 0x17, 0x44,
0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f,
0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x22, 0x48, 0x0a, 0x15, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43,
0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x53, 0x6f, 0x72, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x12,
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12,
0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02,
0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x6f, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72,
0x22, 0x4e, 0x0a, 0x1a, 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, 0x12, 0x30,
0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d,
0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f,
0x72, 0x79, 0x53, 0x6f, 0x72, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61,
0x22, 0x1d, 0x0a, 0x1b, 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, 0x32,
0xfb, 0x02, 0x0a, 0x14, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72,
0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6a, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72,
0x79, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f,
0x72, 0x79, 0x12, 0x1c, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79,
0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71,
0x1a, 0x1d, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 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, 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, 0x42, 0x22, 0x5a,
0x20, 0x63, 0x6e, 0x2f, 0x6f, 0x6e, 0x65, 0x61, 0x6f, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2d, 0x67,
0x6f, 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_category_proto_rawDescOnce sync.Once
file_money_category_proto_rawDescData = file_money_category_proto_rawDesc
)
func file_money_category_proto_rawDescGZIP() []byte {
file_money_category_proto_rawDescOnce.Do(func() {
file_money_category_proto_rawDescData = protoimpl.X.CompressGZIP(file_money_category_proto_rawDescData)
})
return file_money_category_proto_rawDescData
}
var file_money_category_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_money_category_proto_goTypes = []interface{}{
(*QueryMoneyCategoryReq)(nil), // 0: money.QueryMoneyCategoryReq
(*MoneyCategory)(nil), // 1: money.MoneyCategory
(*QueryMoneyCategoryResp)(nil), // 2: money.QueryMoneyCategoryResp
(*DeleteMoneyCategoryReq)(nil), // 3: money.DeleteMoneyCategoryReq
(*DeleteMoneyCategoryResp)(nil), // 4: money.DeleteMoneyCategoryResp
(*MoneyCategorySortItem)(nil), // 5: money.MoneyCategorySortItem
(*UpdateMoneyCategorySortReq)(nil), // 6: money.UpdateMoneyCategorySortReq
(*UpdateMoneyCategorySortResp)(nil), // 7: money.UpdateMoneyCategorySortResp
}
var file_money_category_proto_depIdxs = []int32{
1, // 0: money.QueryMoneyCategoryResp.categories:type_name -> money.MoneyCategory
5, // 1: money.UpdateMoneyCategorySortReq.data:type_name -> money.MoneyCategorySortItem
0, // 2: money.MoneyCategoryService.QueryUserMoneyCategory:input_type -> money.QueryMoneyCategoryReq
3, // 3: money.MoneyCategoryService.DeleteUserMoneyCategory:input_type -> money.DeleteMoneyCategoryReq
6, // 4: money.MoneyCategoryService.UpdateMoneyCategorySort:input_type -> money.UpdateMoneyCategorySortReq
2, // 5: money.MoneyCategoryService.QueryUserMoneyCategory:output_type -> money.QueryMoneyCategoryResp
4, // 6: money.MoneyCategoryService.DeleteUserMoneyCategory:output_type -> money.DeleteMoneyCategoryResp
7, // 7: money.MoneyCategoryService.UpdateMoneyCategorySort:output_type -> money.UpdateMoneyCategorySortResp
5, // [5:8] is the sub-list for method output_type
2, // [2:5] 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
}
func init() { file_money_category_proto_init() }
func file_money_category_proto_init() {
if File_money_category_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_money_category_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*QueryMoneyCategoryReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_money_category_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MoneyCategory); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_money_category_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*QueryMoneyCategoryResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_money_category_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteMoneyCategoryReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_money_category_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteMoneyCategoryResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_money_category_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MoneyCategorySortItem); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_money_category_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdateMoneyCategorySortReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_money_category_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdateMoneyCategorySortResp); 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{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_money_category_proto_rawDesc,
NumEnums: 0,
NumMessages: 8,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_money_category_proto_goTypes,
DependencyIndexes: file_money_category_proto_depIdxs,
MessageInfos: file_money_category_proto_msgTypes,
}.Build()
File_money_category_proto = out.File
file_money_category_proto_rawDesc = nil
file_money_category_proto_goTypes = nil
file_money_category_proto_depIdxs = nil
}
@@ -0,0 +1,577 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v6.33.1
// source: money_record.proto
package money
import (
_ "cn/oneao/base-go/biz/model/api"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type MoneyRecordBase struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int64 `protobuf:"varint,1,opt,name=id,proto3" form:"id" json:"id" query:"id"`
CategoryId int64 `protobuf:"varint,2,opt,name=category_id,json=categoryId,proto3" form:"category_id" json:"category_id" query:"category_id"`
UserId int64 `protobuf:"varint,3,opt,name=user_id,json=userId,proto3" form:"user_id" json:"user_id" query:"user_id"`
Amount string `protobuf:"bytes,4,opt,name=amount,proto3" form:"amount" json:"amount" query:"amount"`
Remark string `protobuf:"bytes,5,opt,name=remark,proto3" form:"remark" json:"remark" query:"remark"`
RecordTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=record_time,json=recordTime,proto3" form:"record_time" json:"record_time" query:"record_time"`
CreateTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=create_time,json=createTime,proto3" form:"create_time" json:"create_time" query:"create_time"`
UpdateTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=update_time,json=updateTime,proto3" form:"update_time" json:"update_time" query:"update_time"`
}
func (x *MoneyRecordBase) Reset() {
*x = MoneyRecordBase{}
if protoimpl.UnsafeEnabled {
mi := &file_money_record_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MoneyRecordBase) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MoneyRecordBase) ProtoMessage() {}
func (x *MoneyRecordBase) ProtoReflect() protoreflect.Message {
mi := &file_money_record_proto_msgTypes[0]
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 MoneyRecordBase.ProtoReflect.Descriptor instead.
func (*MoneyRecordBase) Descriptor() ([]byte, []int) {
return file_money_record_proto_rawDescGZIP(), []int{0}
}
func (x *MoneyRecordBase) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *MoneyRecordBase) GetCategoryId() int64 {
if x != nil {
return x.CategoryId
}
return 0
}
func (x *MoneyRecordBase) GetUserId() int64 {
if x != nil {
return x.UserId
}
return 0
}
func (x *MoneyRecordBase) GetAmount() string {
if x != nil {
return x.Amount
}
return ""
}
func (x *MoneyRecordBase) GetRemark() string {
if x != nil {
return x.Remark
}
return ""
}
func (x *MoneyRecordBase) GetRecordTime() *timestamppb.Timestamp {
if x != nil {
return x.RecordTime
}
return nil
}
func (x *MoneyRecordBase) GetCreateTime() *timestamppb.Timestamp {
if x != nil {
return x.CreateTime
}
return nil
}
func (x *MoneyRecordBase) GetUpdateTime() *timestamppb.Timestamp {
if x != nil {
return x.UpdateTime
}
return nil
}
type MoneyRecordItem struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Base *MoneyRecordBase `protobuf:"bytes,1,opt,name=base,proto3" form:"base" json:"base" query:"base"`
CategoryName string `protobuf:"bytes,2,opt,name=category_name,json=categoryName,proto3" form:"category_name" json:"category_name" query:"category_name"`
CategoryIcon string `protobuf:"bytes,3,opt,name=category_icon,json=categoryIcon,proto3" form:"category_icon" json:"category_icon" query:"category_icon"`
CategoryType int32 `protobuf:"varint,4,opt,name=category_type,json=categoryType,proto3" form:"category_type" json:"category_type" query:"category_type"`
}
func (x *MoneyRecordItem) Reset() {
*x = MoneyRecordItem{}
if protoimpl.UnsafeEnabled {
mi := &file_money_record_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MoneyRecordItem) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MoneyRecordItem) ProtoMessage() {}
func (x *MoneyRecordItem) ProtoReflect() protoreflect.Message {
mi := &file_money_record_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 MoneyRecordItem.ProtoReflect.Descriptor instead.
func (*MoneyRecordItem) Descriptor() ([]byte, []int) {
return file_money_record_proto_rawDescGZIP(), []int{1}
}
func (x *MoneyRecordItem) GetBase() *MoneyRecordBase {
if x != nil {
return x.Base
}
return nil
}
func (x *MoneyRecordItem) GetCategoryName() string {
if x != nil {
return x.CategoryName
}
return ""
}
func (x *MoneyRecordItem) GetCategoryIcon() string {
if x != nil {
return x.CategoryIcon
}
return ""
}
func (x *MoneyRecordItem) GetCategoryType() int32 {
if x != nil {
return x.CategoryType
}
return 0
}
type MoneyRecordGroup struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RecordTime string `protobuf:"bytes,1,opt,name=record_time,json=recordTime,proto3" form:"record_time" json:"record_time" query:"record_time"`
Expense string `protobuf:"bytes,2,opt,name=expense,proto3" form:"expense" json:"expense" query:"expense"`
Income string `protobuf:"bytes,3,opt,name=income,proto3" form:"income" json:"income" query:"income"`
Records []*MoneyRecordItem `protobuf:"bytes,4,rep,name=records,proto3" form:"records" json:"records" query:"records"`
}
func (x *MoneyRecordGroup) Reset() {
*x = MoneyRecordGroup{}
if protoimpl.UnsafeEnabled {
mi := &file_money_record_proto_msgTypes[2]
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_record_proto_msgTypes[2]
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_record_proto_rawDescGZIP(), []int{2}
}
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
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RecordTime string `protobuf:"bytes,1,opt,name=record_time,json=recordTime,proto3" form:"record_time" json:"record_time" query:"record_time"`
}
func (x *QueryMoneyRecordsParams) Reset() {
*x = QueryMoneyRecordsParams{}
if protoimpl.UnsafeEnabled {
mi := &file_money_record_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *QueryMoneyRecordsParams) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*QueryMoneyRecordsParams) ProtoMessage() {}
func (x *QueryMoneyRecordsParams) ProtoReflect() protoreflect.Message {
mi := &file_money_record_proto_msgTypes[3]
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 QueryMoneyRecordsParams.ProtoReflect.Descriptor instead.
func (*QueryMoneyRecordsParams) Descriptor() ([]byte, []int) {
return file_money_record_proto_rawDescGZIP(), []int{3}
}
func (x *QueryMoneyRecordsParams) GetRecordTime() string {
if x != nil {
return x.RecordTime
}
return ""
}
type QueryMoneyRecordsResult struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Records []*MoneyRecordGroup `protobuf:"bytes,1,rep,name=records,proto3" form:"records" json:"records" query:"records"`
TotalIncome string `protobuf:"bytes,2,opt,name=total_income,json=totalIncome,proto3" form:"total_income" json:"total_income" query:"total_income"`
TotalExpense string `protobuf:"bytes,3,opt,name=total_expense,json=totalExpense,proto3" form:"total_expense" json:"total_expense" query:"total_expense"`
}
func (x *QueryMoneyRecordsResult) Reset() {
*x = QueryMoneyRecordsResult{}
if protoimpl.UnsafeEnabled {
mi := &file_money_record_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *QueryMoneyRecordsResult) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*QueryMoneyRecordsResult) ProtoMessage() {}
func (x *QueryMoneyRecordsResult) ProtoReflect() protoreflect.Message {
mi := &file_money_record_proto_msgTypes[4]
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 QueryMoneyRecordsResult.ProtoReflect.Descriptor instead.
func (*QueryMoneyRecordsResult) Descriptor() ([]byte, []int) {
return file_money_record_proto_rawDescGZIP(), []int{4}
}
func (x *QueryMoneyRecordsResult) GetRecords() []*MoneyRecordGroup {
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 ""
}
var File_money_record_proto protoreflect.FileDescriptor
var file_money_record_proto_rawDesc = []byte{
0x0a, 0x12, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x1a, 0x09, 0x61, 0x70, 0x69,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc2, 0x02, 0x0a, 0x0f, 0x4d, 0x6f, 0x6e, 0x65,
0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, 0x61, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x63,
0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
0x52, 0x0a, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07,
0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75,
0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18,
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a,
0x06, 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72,
0x65, 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x3b, 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f,
0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d,
0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x54, 0x69,
0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d,
0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74,
0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12,
0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xac, 0x01, 0x0a,
0x0f, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x49, 0x74, 0x65, 0x6d,
0x12, 0x2a, 0x0a, 0x04, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16,
0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f,
0x72, 0x64, 0x42, 0x61, 0x73, 0x65, 0x52, 0x04, 0x62, 0x61, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d,
0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d,
0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x63,
0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f,
0x72, 0x79, 0x49, 0x63, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f,
0x72, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x63,
0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x22, 0x97, 0x01, 0x0a, 0x10,
0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70,
0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x54, 0x69, 0x6d,
0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x65, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x07, 0x65, 0x78, 0x70, 0x65, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69,
0x6e, 0x63, 0x6f, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x6e, 0x63,
0x6f, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x72, 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, 0x52, 0x07, 0x72, 0x65,
0x63, 0x6f, 0x72, 0x64, 0x73, 0x22, 0x3a, 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, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x54, 0x69, 0x6d,
0x65, 0x22, 0x94, 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, 0x31, 0x0a,
0x07, 0x72, 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, 0x52, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73,
0x12, 0x21, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x49, 0x6e, 0x63,
0x6f, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x65, 0x78, 0x70,
0x65, 0x6e, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61,
0x6c, 0x45, 0x78, 0x70, 0x65, 0x6e, 0x73, 0x65, 0x32, 0x7b, 0x0a, 0x12, 0x4d, 0x6f, 0x6e, 0x65,
0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x65,
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, 0x11, 0xd2, 0xc1, 0x18, 0x0d, 0x2f, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x2f, 0x72,
0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, 0x22, 0x5a, 0x20, 0x63, 0x6e, 0x2f, 0x6f, 0x6e, 0x65, 0x61,
0x6f, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2d, 0x67, 0x6f, 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_record_proto_rawDescOnce sync.Once
file_money_record_proto_rawDescData = file_money_record_proto_rawDesc
)
func file_money_record_proto_rawDescGZIP() []byte {
file_money_record_proto_rawDescOnce.Do(func() {
file_money_record_proto_rawDescData = protoimpl.X.CompressGZIP(file_money_record_proto_rawDescData)
})
return file_money_record_proto_rawDescData
}
var file_money_record_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_money_record_proto_goTypes = []interface{}{
(*MoneyRecordBase)(nil), // 0: money.MoneyRecordBase
(*MoneyRecordItem)(nil), // 1: money.MoneyRecordItem
(*MoneyRecordGroup)(nil), // 2: money.MoneyRecordGroup
(*QueryMoneyRecordsParams)(nil), // 3: money.QueryMoneyRecordsParams
(*QueryMoneyRecordsResult)(nil), // 4: money.QueryMoneyRecordsResult
(*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp
}
var file_money_record_proto_depIdxs = []int32{
5, // 0: money.MoneyRecordBase.record_time:type_name -> google.protobuf.Timestamp
5, // 1: money.MoneyRecordBase.create_time:type_name -> google.protobuf.Timestamp
5, // 2: money.MoneyRecordBase.update_time:type_name -> google.protobuf.Timestamp
0, // 3: money.MoneyRecordItem.base:type_name -> money.MoneyRecordBase
1, // 4: money.MoneyRecordGroup.records:type_name -> money.MoneyRecordItem
2, // 5: money.QueryMoneyRecordsResult.records:type_name -> money.MoneyRecordGroup
3, // 6: money.MoneyRecordService.QueryMoneyRecord:input_type -> money.QueryMoneyRecordsParams
4, // 7: money.MoneyRecordService.QueryMoneyRecord:output_type -> money.QueryMoneyRecordsResult
7, // [7:8] is the sub-list for method output_type
6, // [6:7] is the sub-list for method input_type
6, // [6:6] is the sub-list for extension type_name
6, // [6:6] is the sub-list for extension extendee
0, // [0:6] is the sub-list for field type_name
}
func init() { file_money_record_proto_init() }
func file_money_record_proto_init() {
if File_money_record_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_money_record_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MoneyRecordBase); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_money_record_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MoneyRecordItem); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_money_record_proto_msgTypes[2].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_record_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*QueryMoneyRecordsParams); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_money_record_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*QueryMoneyRecordsResult); 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{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_money_record_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_money_record_proto_goTypes,
DependencyIndexes: file_money_record_proto_depIdxs,
MessageInfos: file_money_record_proto_msgTypes,
}.Build()
File_money_record_proto = out.File
file_money_record_proto_rawDesc = nil
file_money_record_proto_goTypes = nil
file_money_record_proto_depIdxs = nil
}
@@ -1,444 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v4.25.3
// source: money_category.proto
package money_category
import (
_ "cn/oneao/base-go/biz/model/api"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type QueryUserMoneyCategoryReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *QueryUserMoneyCategoryReq) Reset() {
*x = QueryUserMoneyCategoryReq{}
if protoimpl.UnsafeEnabled {
mi := &file_money_category_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *QueryUserMoneyCategoryReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*QueryUserMoneyCategoryReq) ProtoMessage() {}
func (x *QueryUserMoneyCategoryReq) ProtoReflect() protoreflect.Message {
mi := &file_money_category_proto_msgTypes[0]
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 QueryUserMoneyCategoryReq.ProtoReflect.Descriptor instead.
func (*QueryUserMoneyCategoryReq) Descriptor() ([]byte, []int) {
return file_money_category_proto_rawDescGZIP(), []int{0}
}
type UserMoneyCategory struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int64 `protobuf:"varint,1,opt,name=id,proto3" form:"id" json:"id" query:"id"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" form:"name" json:"name" query:"name"`
Icon string `protobuf:"bytes,3,opt,name=icon,proto3" form:"icon" json:"icon" query:"icon"`
Type int32 `protobuf:"varint,4,opt,name=type,proto3" form:"type" json:"type" query:"type"`
SortNumber int32 `protobuf:"varint,5,opt,name=sort_number,json=sortNumber,proto3" form:"sort_number" json:"sort_number" query:"sort_number"`
}
func (x *UserMoneyCategory) Reset() {
*x = UserMoneyCategory{}
if protoimpl.UnsafeEnabled {
mi := &file_money_category_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UserMoneyCategory) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UserMoneyCategory) ProtoMessage() {}
func (x *UserMoneyCategory) ProtoReflect() protoreflect.Message {
mi := &file_money_category_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 UserMoneyCategory.ProtoReflect.Descriptor instead.
func (*UserMoneyCategory) Descriptor() ([]byte, []int) {
return file_money_category_proto_rawDescGZIP(), []int{1}
}
func (x *UserMoneyCategory) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *UserMoneyCategory) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *UserMoneyCategory) GetIcon() string {
if x != nil {
return x.Icon
}
return ""
}
func (x *UserMoneyCategory) GetType() int32 {
if x != nil {
return x.Type
}
return 0
}
func (x *UserMoneyCategory) GetSortNumber() int32 {
if x != nil {
return x.SortNumber
}
return 0
}
type QueryUserMoneyCategoryResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Categories []*UserMoneyCategory `protobuf:"bytes,1,rep,name=categories,proto3" form:"categories" json:"categories" query:"categories"`
}
func (x *QueryUserMoneyCategoryResp) Reset() {
*x = QueryUserMoneyCategoryResp{}
if protoimpl.UnsafeEnabled {
mi := &file_money_category_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *QueryUserMoneyCategoryResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*QueryUserMoneyCategoryResp) ProtoMessage() {}
func (x *QueryUserMoneyCategoryResp) ProtoReflect() protoreflect.Message {
mi := &file_money_category_proto_msgTypes[2]
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 QueryUserMoneyCategoryResp.ProtoReflect.Descriptor instead.
func (*QueryUserMoneyCategoryResp) Descriptor() ([]byte, []int) {
return file_money_category_proto_rawDescGZIP(), []int{2}
}
func (x *QueryUserMoneyCategoryResp) GetCategories() []*UserMoneyCategory {
if x != nil {
return x.Categories
}
return nil
}
type DeleteUserMoneyCategoryReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int64 `protobuf:"varint,1,opt,name=Id,proto3" form:"id" json:"id" vd:"$!=''"`
}
func (x *DeleteUserMoneyCategoryReq) Reset() {
*x = DeleteUserMoneyCategoryReq{}
if protoimpl.UnsafeEnabled {
mi := &file_money_category_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeleteUserMoneyCategoryReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteUserMoneyCategoryReq) ProtoMessage() {}
func (x *DeleteUserMoneyCategoryReq) ProtoReflect() protoreflect.Message {
mi := &file_money_category_proto_msgTypes[3]
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 DeleteUserMoneyCategoryReq.ProtoReflect.Descriptor instead.
func (*DeleteUserMoneyCategoryReq) Descriptor() ([]byte, []int) {
return file_money_category_proto_rawDescGZIP(), []int{3}
}
func (x *DeleteUserMoneyCategoryReq) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
type DeleteUserMoneyCategoryResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *DeleteUserMoneyCategoryResp) Reset() {
*x = DeleteUserMoneyCategoryResp{}
if protoimpl.UnsafeEnabled {
mi := &file_money_category_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeleteUserMoneyCategoryResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteUserMoneyCategoryResp) ProtoMessage() {}
func (x *DeleteUserMoneyCategoryResp) ProtoReflect() protoreflect.Message {
mi := &file_money_category_proto_msgTypes[4]
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 DeleteUserMoneyCategoryResp.ProtoReflect.Descriptor instead.
func (*DeleteUserMoneyCategoryResp) Descriptor() ([]byte, []int) {
return file_money_category_proto_rawDescGZIP(), []int{4}
}
var File_money_category_proto protoreflect.FileDescriptor
var file_money_category_proto_rawDesc = []byte{
0x0a, 0x14, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x5f, 0x63, 0x61,
0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x1a, 0x09, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x22, 0x1b, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f,
0x6e, 0x65, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x22, 0x80,
0x01, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74, 0x65,
0x67, 0x6f, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x63, 0x6f, 0x6e,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04,
0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,
0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18,
0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x6f, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65,
0x72, 0x22, 0x5f, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f,
0x6e, 0x65, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12,
0x41, 0x0a, 0x0a, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x5f, 0x63, 0x61, 0x74, 0x65,
0x67, 0x6f, 0x72, 0x79, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61,
0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x0a, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69,
0x65, 0x73, 0x22, 0x3d, 0x0a, 0x1a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72,
0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71,
0x12, 0x1f, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x0f, 0xca, 0xbb,
0x18, 0x02, 0x69, 0x64, 0xda, 0xbb, 0x18, 0x05, 0x24, 0x21, 0x3d, 0x27, 0x27, 0x52, 0x02, 0x49,
0x64, 0x22, 0x1d, 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4d,
0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70,
0x32, 0xae, 0x02, 0x0a, 0x14, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f,
0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x84, 0x01, 0x0a, 0x16, 0x51, 0x75,
0x65, 0x72, 0x79, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74, 0x65,
0x67, 0x6f, 0x72, 0x79, 0x12, 0x29, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x5f, 0x63, 0x61, 0x74,
0x65, 0x67, 0x6f, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x73, 0x65, 0x72, 0x4d,
0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x1a,
0x2a, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79,
0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x73, 0x65, 0x72, 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, 0x8e, 0x01, 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, 0x2a, 0x2e, 0x6d,
0x6f, 0x6e, 0x65, 0x79, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x2e, 0x44, 0x65,
0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74,
0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x2b, 0x2e, 0x6d, 0x6f, 0x6e, 0x65, 0x79,
0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72,
0x79, 0x52, 0x65, 0x73, 0x70, 0x22, 0x1a, 0xca, 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, 0x42, 0x2b, 0x5a, 0x29, 0x63, 0x6e, 0x2f, 0x6f, 0x6e, 0x65, 0x61, 0x6f, 0x2f, 0x62, 0x61,
0x73, 0x65, 0x2d, 0x67, 0x6f, 0x2f, 0x62, 0x69, 0x7a, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f,
0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_money_category_proto_rawDescOnce sync.Once
file_money_category_proto_rawDescData = file_money_category_proto_rawDesc
)
func file_money_category_proto_rawDescGZIP() []byte {
file_money_category_proto_rawDescOnce.Do(func() {
file_money_category_proto_rawDescData = protoimpl.X.CompressGZIP(file_money_category_proto_rawDescData)
})
return file_money_category_proto_rawDescData
}
var file_money_category_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_money_category_proto_goTypes = []interface{}{
(*QueryUserMoneyCategoryReq)(nil), // 0: money_category.QueryUserMoneyCategoryReq
(*UserMoneyCategory)(nil), // 1: money_category.UserMoneyCategory
(*QueryUserMoneyCategoryResp)(nil), // 2: money_category.QueryUserMoneyCategoryResp
(*DeleteUserMoneyCategoryReq)(nil), // 3: money_category.DeleteUserMoneyCategoryReq
(*DeleteUserMoneyCategoryResp)(nil), // 4: money_category.DeleteUserMoneyCategoryResp
}
var file_money_category_proto_depIdxs = []int32{
1, // 0: money_category.QueryUserMoneyCategoryResp.categories:type_name -> money_category.UserMoneyCategory
0, // 1: money_category.MoneyCategoryService.QueryUserMoneyCategory:input_type -> money_category.QueryUserMoneyCategoryReq
3, // 2: money_category.MoneyCategoryService.DeleteUserMoneyCategory:input_type -> money_category.DeleteUserMoneyCategoryReq
2, // 3: money_category.MoneyCategoryService.QueryUserMoneyCategory:output_type -> money_category.QueryUserMoneyCategoryResp
4, // 4: money_category.MoneyCategoryService.DeleteUserMoneyCategory:output_type -> money_category.DeleteUserMoneyCategoryResp
3, // [3:5] is the sub-list for method output_type
1, // [1:3] 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_category_proto_init() }
func file_money_category_proto_init() {
if File_money_category_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_money_category_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*QueryUserMoneyCategoryReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_money_category_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UserMoneyCategory); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_money_category_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*QueryUserMoneyCategoryResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_money_category_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteUserMoneyCategoryReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_money_category_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteUserMoneyCategoryResp); 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{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_money_category_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_money_category_proto_goTypes,
DependencyIndexes: file_money_category_proto_depIdxs,
MessageInfos: file_money_category_proto_msgTypes,
}.Build()
File_money_category_proto = out.File
file_money_category_proto_rawDesc = nil
file_money_category_proto_goTypes = nil
file_money_category_proto_depIdxs = nil
}
@@ -5,6 +5,7 @@ import (
"cn/oneao/base-go/utils/pathx"
"cn/oneao/base-go/utils/response"
"context"
"github.com/cloudwego/hertz/pkg/app"
)
@@ -31,6 +32,7 @@ func Auth() app.HandlerFunc {
// 获取 token
token := string(c.GetHeader("token"))
if token == "" {
response.Fail(c).Code(response.HttpCode.Unauthorized).Send()
c.Abort()
@@ -1,6 +1,6 @@
// Code generated by hertz generator.
package money_category
package money
import (
"github.com/cloudwego/hertz/pkg/app"
@@ -30,3 +30,13 @@ func _deleteusermoneycategoryMw() []app.HandlerFunc {
// your code...
return nil
}
func _updatemoneycategorysortMw() []app.HandlerFunc {
// your code...
return nil
}
func _querymoneyrecordMw() []app.HandlerFunc {
// your code...
return nil
}
@@ -1,9 +1,9 @@
// Code generated by hertz generator. DO NOT EDIT.
package money_category
package money
import (
money_category "cn/oneao/base-go/biz/handler/money_category"
money "cn/oneao/base-go/biz/handler/money"
"github.com/cloudwego/hertz/pkg/app/server"
)
@@ -19,8 +19,9 @@ func Register(r *server.Hertz) {
root := r.Group("/", rootMw()...)
{
_money := root.Group("/money", _moneyMw()...)
_money.GET("/category", append(_queryusermoneycategoryMw(), money_category.QueryUserMoneyCategory)...)
_money.GET("/category", append(_queryusermoneycategoryMw(), money.QueryUserMoneyCategory)...)
_category := _money.Group("/category", _categoryMw()...)
_category.GET("/delete", append(_deleteusermoneycategoryMw(), money_category.DeleteUserMoneyCategory)...)
_category.POST("/delete", append(_deleteusermoneycategoryMw(), money.DeleteUserMoneyCategory)...)
_category.POST("/updateSort", append(_updatemoneycategorysortMw(), money.UpdateMoneyCategorySort)...)
}
}
@@ -0,0 +1,24 @@
// Code generated by hertz generator. DO NOT EDIT.
package money
import (
money "cn/oneao/base-go/biz/handler/money"
"github.com/cloudwego/hertz/pkg/app/server"
)
/*
This file will register all the routes of the services in the master idl.
And it will update automatically when you use the "update" command for the idl.
So don't modify the contents of the file, or your code will be deleted when it is updated.
*/
// Register register routes based on the IDL 'api.${HTTP Method}' annotation.
func Register(r *server.Hertz) {
root := r.Group("/", rootMw()...)
{
_money := root.Group("/money", _moneyMw()...)
_money.POST("/record", append(_querymoneyrecordMw(), money.QueryMoneyRecord)...)
}
}
@@ -4,14 +4,17 @@ package router
import (
auth "cn/oneao/base-go/biz/router/auth"
money_category "cn/oneao/base-go/biz/router/money_category"
money "cn/oneao/base-go/biz/router/money"
record "cn/oneao/base-go/biz/router/record"
"github.com/cloudwego/hertz/pkg/app/server"
)
// GeneratedRegister registers routers generated by IDL.
func GeneratedRegister(r *server.Hertz) {
//INSERT_POINT: DO NOT DELETE THIS LINE!
money_category.Register(r)
record.Register(r)
money.Register(r)
auth.Register(r)
}