feat: add transformer for model

This commit is contained in:
rogeecn
2025-03-22 18:23:26 +08:00
parent e1eeb6bc0d
commit 501af58e66
6 changed files with 49 additions and 27 deletions

View File

@@ -4,8 +4,8 @@ import "github.com/samber/lo"
type Pager struct {
Pagination `json:",inline"`
Total int64 `json:"total"`
Items interface{} `json:"items"`
Total int64 `json:"total"`
Items any `json:"items"`
}
type Pagination struct {

View File

@@ -11,11 +11,11 @@ plugins:
- local: protoc-gen-go
out: pkg/proto
opt: paths=source_relative
- local: protoc-gen-grpc-gateway
out: pkg/proto
opt:
- paths=source_relative
- generate_unbound_methods=true
#- local: protoc-gen-grpc-gateway
# out: pkg/proto
# opt:
# - paths=source_relative
# - generate_unbound_methods=true
- local: protoc-gen-go-grpc
out: pkg/proto
opt: paths=source_relative

View File

@@ -1,11 +1,13 @@
ignores:
- migrations
- river_leader
- river_job
- river_client
- river_client_queue
- river_queue
# types:
jet:
- migrations
- river_leader
- river_job
- river_client
- river_client_queue
- river_queue
model:
types:
# users: # table name
# meta: UserMeta
# meta: Json[UserMeta]