diff --git a/server/internal/library/hggen/internal/cmd/testdata/build/multiple/multiple.go b/server/internal/library/hggen/internal/cmd/testdata/build/multiple/multiple.go deleted file mode 100644 index 7905807..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/build/multiple/multiple.go +++ /dev/null @@ -1,5 +0,0 @@ -package main - -func main() { - -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/build/single/main.go b/server/internal/library/hggen/internal/cmd/testdata/build/single/main.go deleted file mode 100644 index 7905807..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/build/single/main.go +++ /dev/null @@ -1,5 +0,0 @@ -package main - -func main() { - -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/build/varmap/go.mod b/server/internal/library/hggen/internal/cmd/testdata/build/varmap/go.mod deleted file mode 100644 index 7457292..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/build/varmap/go.mod +++ /dev/null @@ -1,12 +0,0 @@ -module github.com/gogf/gf/cmd/gf/cmd/gf/testdata/vardump/v2 - -go 1.18 - -require github.com/gogf/gf/v2 v2.6.1 - -require ( - go.opentelemetry.io/otel v1.14.0 // indirect - go.opentelemetry.io/otel/trace v1.14.0 // indirect -) - -replace github.com/gogf/gf/v2 => ../../../../../../../ diff --git a/server/internal/library/hggen/internal/cmd/testdata/build/varmap/go.sum b/server/internal/library/hggen/internal/cmd/testdata/build/varmap/go.sum deleted file mode 100644 index 56cf07d..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/build/varmap/go.sum +++ /dev/null @@ -1,27 +0,0 @@ -github.com/BurntSushi/toml v1.2.0 h1:Rt8g24XnyGTyglgET/PRUNlrUeu9F5L+7FilkXfZgs0= -github.com/clbanning/mxj/v2 v2.7.0 h1:WA/La7UGCanFe5NpHF0Q3DNtnCsVoxbPKuyBNHWRyME= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/grokify/html-strip-tags-go v0.0.1 h1:0fThFwLbW7P/kOiTBs03FsJSV9RM2M/Q/MOnCQxKMo0= -github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= -github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= -github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= -github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= -go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= -go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= -go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY= -go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= -go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/server/internal/library/hggen/internal/cmd/testdata/build/varmap/main.go b/server/internal/library/hggen/internal/cmd/testdata/build/varmap/main.go deleted file mode 100644 index 788a885..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/build/varmap/main.go +++ /dev/null @@ -1,13 +0,0 @@ -package main - -import ( - "fmt" - - "github.com/gogf/gf/v2/os/gbuild" -) - -func main() { - for k, v := range gbuild.Data() { - fmt.Printf("%s: %v\n", k, v) - } -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/fix/fix25_content.go b/server/internal/library/hggen/internal/cmd/testdata/fix/fix25_content.go deleted file mode 100644 index 934ebd2..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/fix/fix25_content.go +++ /dev/null @@ -1,30 +0,0 @@ -package testdata - -import ( - "fmt" - "testing" - "time" - - "github.com/gogf/gf/v2/frame/g" - "github.com/gogf/gf/v2/net/ghttp" - "github.com/gogf/gf/v2/test/gtest" - "github.com/gogf/gf/v2/util/guid" -) - -func Test_Router_Hook_Multi(t *testing.T) { - s := g.Server(guid.S()) - s.BindHandler("/multi-hook", func(r *ghttp.Request) { - r.Response.Write("show") - }) - - s.BindHookHandlerByMap("/multi-hook", map[string]ghttp.HandlerFunc{ - ghttp.HookBeforeServe: func(r *ghttp.Request) { - r.Response.Write("1") - }, - }) - s.BindHookHandlerByMap("/multi-hook/{id}", map[string]ghttp.HandlerFunc{ - ghttp.HookBeforeServe: func(r *ghttp.Request) { - r.Response.Write("2") - }, - }) -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/genctrl/api/article/article_expect.go b/server/internal/library/hggen/internal/cmd/testdata/genctrl/api/article/article_expect.go deleted file mode 100644 index 880d81f..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/genctrl/api/article/article_expect.go +++ /dev/null @@ -1,24 +0,0 @@ -// ================================================================================= -// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. -// ================================================================================= - -package article - -import ( - "context" - - "hotgo/internal/library/hggen/internal/cmd/testdata/genctrl/api/article/v1" - "hotgo/internal/library/hggen/internal/cmd/testdata/genctrl/api/article/v2" -) - -type IArticleV1 interface { - Create(ctx context.Context, req *v1.CreateReq) (res *v1.CreateRes, err error) - Update(ctx context.Context, req *v1.UpdateReq) (res *v1.UpdateRes, err error) - GetList(ctx context.Context, req *v1.GetListReq) (res *v1.GetListRes, err error) - GetOne(ctx context.Context, req *v1.GetOneReq) (res *v1.GetOneRes, err error) -} - -type IArticleV2 interface { - Create(ctx context.Context, req *v2.CreateReq) (res *v2.CreateRes, err error) - Update(ctx context.Context, req *v2.UpdateReq) (res *v2.UpdateRes, err error) -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/genctrl/api/article/v1/edit.go b/server/internal/library/hggen/internal/cmd/testdata/genctrl/api/article/v1/edit.go deleted file mode 100644 index 9e893d8..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/genctrl/api/article/v1/edit.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright GoFrame Author(https://goframe.org). All Rights Reserved. -// -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, -// You can obtain one at https://github.com/gogf/gf. - -package v1 - -import "github.com/gogf/gf/v2/frame/g" - -type ( - CreateReq struct { - g.Meta `path:"/article/create" method:"post" tags:"ArticleService"` - Title string `v:"required"` - } - - CreateRes struct{} -) - -type ( - UpdateReq struct { - g.Meta `path:"/article/update" method:"post" tags:"ArticleService"` - Title string `v:"required"` - } - - UpdateRes struct{} -) diff --git a/server/internal/library/hggen/internal/cmd/testdata/genctrl/api/article/v1/get.go b/server/internal/library/hggen/internal/cmd/testdata/genctrl/api/article/v1/get.go deleted file mode 100644 index 36134f5..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/genctrl/api/article/v1/get.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright GoFrame Author(https://goframe.org). All Rights Reserved. -// -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, -// You can obtain one at https://github.com/gogf/gf. - -package v1 - -import "github.com/gogf/gf/v2/frame/g" - -type GetListReq struct { - g.Meta `path:"/article/list" method:"get" tags:"ArticleService"` -} - -type GetListRes struct { - list []struct{} -} - -type GetOneReq struct { - g.Meta `path:"/article/one" method:"get" tags:"ArticleService"` -} - -type GetOneRes struct { - one struct{} -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/genctrl/api/article/v2/edit.go b/server/internal/library/hggen/internal/cmd/testdata/genctrl/api/article/v2/edit.go deleted file mode 100644 index 8e8267a..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/genctrl/api/article/v2/edit.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright GoFrame Author(https://goframe.org). All Rights Reserved. -// -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, -// You can obtain one at https://github.com/gogf/gf. - -package v2 - -import "github.com/gogf/gf/v2/frame/g" - -type CreateReq struct { - g.Meta `path:"/article/create" method:"post" tags:"ArticleService"` - Title string `v:"required"` -} - -type CreateRes struct{} - -type UpdateReq struct { - g.Meta `path:"/article/update" method:"post" tags:"ArticleService"` - Title string `v:"required"` -} - -type UpdateRes struct{} diff --git a/server/internal/library/hggen/internal/cmd/testdata/genctrl/controller/article/article.go b/server/internal/library/hggen/internal/cmd/testdata/genctrl/controller/article/article.go deleted file mode 100644 index 4bd478c..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/genctrl/controller/article/article.go +++ /dev/null @@ -1,5 +0,0 @@ -// ================================================================================= -// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. -// ================================================================================= - -package article diff --git a/server/internal/library/hggen/internal/cmd/testdata/genctrl/controller/article/article_new.go b/server/internal/library/hggen/internal/cmd/testdata/genctrl/controller/article/article_new.go deleted file mode 100644 index c4ac00e..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/genctrl/controller/article/article_new.go +++ /dev/null @@ -1,21 +0,0 @@ -// ================================================================================= -// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. -// ================================================================================= - -package article - -import ( - "hotgo/internal/library/hggen/internal/cmd/testdata/genctrl/api/article" -) - -type ControllerV1 struct{} - -func NewV1() article.IArticleV1 { - return &ControllerV1{} -} - -type ControllerV2 struct{} - -func NewV2() article.IArticleV2 { - return &ControllerV2{} -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/genctrl/controller/article/article_v1_create.go b/server/internal/library/hggen/internal/cmd/testdata/genctrl/controller/article/article_v1_create.go deleted file mode 100644 index 1b37e99..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/genctrl/controller/article/article_v1_create.go +++ /dev/null @@ -1,14 +0,0 @@ -package article - -import ( - "context" - - "github.com/gogf/gf/v2/errors/gcode" - "github.com/gogf/gf/v2/errors/gerror" - - "hotgo/internal/library/hggen/internal/cmd/testdata/genctrl/api/article/v1" -) - -func (c *ControllerV1) Create(ctx context.Context, req *v1.CreateReq) (res *v1.CreateRes, err error) { - return nil, gerror.NewCode(gcode.CodeNotImplemented) -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/genctrl/controller/article/article_v1_get_list.go b/server/internal/library/hggen/internal/cmd/testdata/genctrl/controller/article/article_v1_get_list.go deleted file mode 100644 index a0f48e8..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/genctrl/controller/article/article_v1_get_list.go +++ /dev/null @@ -1,14 +0,0 @@ -package article - -import ( - "context" - - "github.com/gogf/gf/v2/errors/gcode" - "github.com/gogf/gf/v2/errors/gerror" - - "hotgo/internal/library/hggen/internal/cmd/testdata/genctrl/api/article/v1" -) - -func (c *ControllerV1) GetList(ctx context.Context, req *v1.GetListReq) (res *v1.GetListRes, err error) { - return nil, gerror.NewCode(gcode.CodeNotImplemented) -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/genctrl/controller/article/article_v1_get_one.go b/server/internal/library/hggen/internal/cmd/testdata/genctrl/controller/article/article_v1_get_one.go deleted file mode 100644 index e258f06..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/genctrl/controller/article/article_v1_get_one.go +++ /dev/null @@ -1,14 +0,0 @@ -package article - -import ( - "context" - - "github.com/gogf/gf/v2/errors/gcode" - "github.com/gogf/gf/v2/errors/gerror" - - "hotgo/internal/library/hggen/internal/cmd/testdata/genctrl/api/article/v1" -) - -func (c *ControllerV1) GetOne(ctx context.Context, req *v1.GetOneReq) (res *v1.GetOneRes, err error) { - return nil, gerror.NewCode(gcode.CodeNotImplemented) -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/genctrl/controller/article/article_v1_update.go b/server/internal/library/hggen/internal/cmd/testdata/genctrl/controller/article/article_v1_update.go deleted file mode 100644 index 7919aa2..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/genctrl/controller/article/article_v1_update.go +++ /dev/null @@ -1,14 +0,0 @@ -package article - -import ( - "context" - - "github.com/gogf/gf/v2/errors/gcode" - "github.com/gogf/gf/v2/errors/gerror" - - "hotgo/internal/library/hggen/internal/cmd/testdata/genctrl/api/article/v1" -) - -func (c *ControllerV1) Update(ctx context.Context, req *v1.UpdateReq) (res *v1.UpdateRes, err error) { - return nil, gerror.NewCode(gcode.CodeNotImplemented) -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/genctrl/controller/article/article_v2_create.go b/server/internal/library/hggen/internal/cmd/testdata/genctrl/controller/article/article_v2_create.go deleted file mode 100644 index 7b435f2..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/genctrl/controller/article/article_v2_create.go +++ /dev/null @@ -1,14 +0,0 @@ -package article - -import ( - "context" - - "github.com/gogf/gf/v2/errors/gcode" - "github.com/gogf/gf/v2/errors/gerror" - - "hotgo/internal/library/hggen/internal/cmd/testdata/genctrl/api/article/v2" -) - -func (c *ControllerV2) Create(ctx context.Context, req *v2.CreateReq) (res *v2.CreateRes, err error) { - return nil, gerror.NewCode(gcode.CodeNotImplemented) -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/genctrl/controller/article/article_v2_update.go b/server/internal/library/hggen/internal/cmd/testdata/genctrl/controller/article/article_v2_update.go deleted file mode 100644 index e91a6ac..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/genctrl/controller/article/article_v2_update.go +++ /dev/null @@ -1,14 +0,0 @@ -package article - -import ( - "context" - - "github.com/gogf/gf/v2/errors/gcode" - "github.com/gogf/gf/v2/errors/gerror" - - "hotgo/internal/library/hggen/internal/cmd/testdata/genctrl/api/article/v2" -) - -func (c *ControllerV2) Update(ctx context.Context, req *v2.UpdateReq) (res *v2.UpdateRes, err error) { - return nil, gerror.NewCode(gcode.CodeNotImplemented) -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/gendao/generated_user/dao/internal/table_user.go b/server/internal/library/hggen/internal/cmd/testdata/gendao/generated_user/dao/internal/table_user.go deleted file mode 100644 index f883408..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/gendao/generated_user/dao/internal/table_user.go +++ /dev/null @@ -1,85 +0,0 @@ -// ========================================================================== -// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. -// ========================================================================== - -package internal - -import ( - "context" - - "github.com/gogf/gf/v2/database/gdb" - "github.com/gogf/gf/v2/frame/g" -) - -// TableUserDao is the data access object for table table_user. -type TableUserDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns TableUserColumns // columns contains all the column names of Table for convenient usage. -} - -// TableUserColumns defines and stores column names for table table_user. -type TableUserColumns struct { - Id string // User ID - Passport string // User Passport - Password string // User Password - Nickname string // User Nickname - Score string // Total score amount. - CreateAt string // Created Time - UpdateAt string // Updated Time -} - -// tableUserColumns holds the columns for table table_user. -var tableUserColumns = TableUserColumns{ - Id: "id", - Passport: "passport", - Password: "password", - Nickname: "nickname", - Score: "score", - CreateAt: "create_at", - UpdateAt: "update_at", -} - -// NewTableUserDao creates and returns a new DAO object for table data access. -func NewTableUserDao() *TableUserDao { - return &TableUserDao{ - group: "test", - table: "table_user", - columns: tableUserColumns, - } -} - -// DB retrieves and returns the underlying raw database management object of current DAO. -func (dao *TableUserDao) DB() gdb.DB { - return g.DB(dao.group) -} - -// Table returns the table name of current dao. -func (dao *TableUserDao) Table() string { - return dao.table -} - -// Columns returns all column names of current dao. -func (dao *TableUserDao) Columns() TableUserColumns { - return dao.columns -} - -// Group returns the configuration group name of database of current dao. -func (dao *TableUserDao) Group() string { - return dao.group -} - -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. -func (dao *TableUserDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) -} - -// Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. -// It commits the transaction and returns nil if function f returns nil. -// -// Note that, you should not Commit or Rollback the transaction in function f -// as it is automatically handled by this function. -func (dao *TableUserDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { - return dao.Ctx(ctx).Transaction(ctx, f) -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/gendao/generated_user/dao/table_user.go b/server/internal/library/hggen/internal/cmd/testdata/gendao/generated_user/dao/table_user.go deleted file mode 100644 index 9bc9cff..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/gendao/generated_user/dao/table_user.go +++ /dev/null @@ -1,27 +0,0 @@ -// ================================================================================= -// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. -// ================================================================================= - -package dao - -import ( - "for-gendao-test/pkg/dao/internal" -) - -// internalTableUserDao is internal type for wrapping internal DAO implements. -type internalTableUserDao = *internal.TableUserDao - -// tableUserDao is the data access object for table table_user. -// You can define custom methods on it to extend its functionality as you wish. -type tableUserDao struct { - internalTableUserDao -} - -var ( - // TableUser is globally public accessible object for table table_user operations. - TableUser = tableUserDao{ - internal.NewTableUserDao(), - } -) - -// Fill with you ideas below. diff --git a/server/internal/library/hggen/internal/cmd/testdata/gendao/generated_user/model/do/table_user.go b/server/internal/library/hggen/internal/cmd/testdata/gendao/generated_user/model/do/table_user.go deleted file mode 100644 index 656fb9c..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/gendao/generated_user/model/do/table_user.go +++ /dev/null @@ -1,22 +0,0 @@ -// ================================================================================= -// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. -// ================================================================================= - -package do - -import ( - "github.com/gogf/gf/v2/frame/g" - "github.com/gogf/gf/v2/os/gtime" -) - -// TableUser is the golang structure of table table_user for DAO operations like Where/Data. -type TableUser struct { - g.Meta `orm:"table:table_user, do:true"` - Id interface{} // User ID - Passport interface{} // User Passport - Password interface{} // User Password - Nickname interface{} // User Nickname - Score interface{} // Total score amount. - CreateAt *gtime.Time // Created Time - UpdateAt *gtime.Time // Updated Time -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/gendao/generated_user/model/entity/table_user.go b/server/internal/library/hggen/internal/cmd/testdata/gendao/generated_user/model/entity/table_user.go deleted file mode 100644 index 22a8f0e..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/gendao/generated_user/model/entity/table_user.go +++ /dev/null @@ -1,20 +0,0 @@ -// ================================================================================= -// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. -// ================================================================================= - -package entity - -import ( - "github.com/gogf/gf/v2/os/gtime" -) - -// TableUser is the golang structure for table table_user. -type TableUser struct { - Id uint `json:"ID" ` // User ID - Passport string `json:"PASSPORT" ` // User Passport - Password string `json:"PASSWORD" ` // User Password - Nickname string `json:"NICKNAME" ` // User Nickname - Score float64 `json:"SCORE" ` // Total score amount. - CreateAt *gtime.Time `json:"CREATE_AT" ` // Created Time - UpdateAt *gtime.Time `json:"UPDATE_AT" ` // Updated Time -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/gendao/generated_user_type_mapping/dao/internal/table_user.go b/server/internal/library/hggen/internal/cmd/testdata/gendao/generated_user_type_mapping/dao/internal/table_user.go deleted file mode 100644 index f883408..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/gendao/generated_user_type_mapping/dao/internal/table_user.go +++ /dev/null @@ -1,85 +0,0 @@ -// ========================================================================== -// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. -// ========================================================================== - -package internal - -import ( - "context" - - "github.com/gogf/gf/v2/database/gdb" - "github.com/gogf/gf/v2/frame/g" -) - -// TableUserDao is the data access object for table table_user. -type TableUserDao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns TableUserColumns // columns contains all the column names of Table for convenient usage. -} - -// TableUserColumns defines and stores column names for table table_user. -type TableUserColumns struct { - Id string // User ID - Passport string // User Passport - Password string // User Password - Nickname string // User Nickname - Score string // Total score amount. - CreateAt string // Created Time - UpdateAt string // Updated Time -} - -// tableUserColumns holds the columns for table table_user. -var tableUserColumns = TableUserColumns{ - Id: "id", - Passport: "passport", - Password: "password", - Nickname: "nickname", - Score: "score", - CreateAt: "create_at", - UpdateAt: "update_at", -} - -// NewTableUserDao creates and returns a new DAO object for table data access. -func NewTableUserDao() *TableUserDao { - return &TableUserDao{ - group: "test", - table: "table_user", - columns: tableUserColumns, - } -} - -// DB retrieves and returns the underlying raw database management object of current DAO. -func (dao *TableUserDao) DB() gdb.DB { - return g.DB(dao.group) -} - -// Table returns the table name of current dao. -func (dao *TableUserDao) Table() string { - return dao.table -} - -// Columns returns all column names of current dao. -func (dao *TableUserDao) Columns() TableUserColumns { - return dao.columns -} - -// Group returns the configuration group name of database of current dao. -func (dao *TableUserDao) Group() string { - return dao.group -} - -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. -func (dao *TableUserDao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) -} - -// Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. -// It commits the transaction and returns nil if function f returns nil. -// -// Note that, you should not Commit or Rollback the transaction in function f -// as it is automatically handled by this function. -func (dao *TableUserDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { - return dao.Ctx(ctx).Transaction(ctx, f) -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/gendao/generated_user_type_mapping/dao/table_user.go b/server/internal/library/hggen/internal/cmd/testdata/gendao/generated_user_type_mapping/dao/table_user.go deleted file mode 100644 index 9bc9cff..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/gendao/generated_user_type_mapping/dao/table_user.go +++ /dev/null @@ -1,27 +0,0 @@ -// ================================================================================= -// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. -// ================================================================================= - -package dao - -import ( - "for-gendao-test/pkg/dao/internal" -) - -// internalTableUserDao is internal type for wrapping internal DAO implements. -type internalTableUserDao = *internal.TableUserDao - -// tableUserDao is the data access object for table table_user. -// You can define custom methods on it to extend its functionality as you wish. -type tableUserDao struct { - internalTableUserDao -} - -var ( - // TableUser is globally public accessible object for table table_user operations. - TableUser = tableUserDao{ - internal.NewTableUserDao(), - } -) - -// Fill with you ideas below. diff --git a/server/internal/library/hggen/internal/cmd/testdata/gendao/generated_user_type_mapping/model/do/table_user.go b/server/internal/library/hggen/internal/cmd/testdata/gendao/generated_user_type_mapping/model/do/table_user.go deleted file mode 100644 index 656fb9c..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/gendao/generated_user_type_mapping/model/do/table_user.go +++ /dev/null @@ -1,22 +0,0 @@ -// ================================================================================= -// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. -// ================================================================================= - -package do - -import ( - "github.com/gogf/gf/v2/frame/g" - "github.com/gogf/gf/v2/os/gtime" -) - -// TableUser is the golang structure of table table_user for DAO operations like Where/Data. -type TableUser struct { - g.Meta `orm:"table:table_user, do:true"` - Id interface{} // User ID - Passport interface{} // User Passport - Password interface{} // User Password - Nickname interface{} // User Nickname - Score interface{} // Total score amount. - CreateAt *gtime.Time // Created Time - UpdateAt *gtime.Time // Updated Time -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/gendao/generated_user_type_mapping/model/entity/table_user.go b/server/internal/library/hggen/internal/cmd/testdata/gendao/generated_user_type_mapping/model/entity/table_user.go deleted file mode 100644 index f0caddd..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/gendao/generated_user_type_mapping/model/entity/table_user.go +++ /dev/null @@ -1,21 +0,0 @@ -// ================================================================================= -// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. -// ================================================================================= - -package entity - -import ( - "github.com/gogf/gf/v2/os/gtime" - "github.com/shopspring/decimal" -) - -// TableUser is the golang structure for table table_user. -type TableUser struct { - Id int64 `json:"id" ` // User ID - Passport string `json:"passport" ` // User Passport - Password string `json:"password" ` // User Password - Nickname string `json:"nickname" ` // User Nickname - Score decimal.Decimal `json:"score" ` // Total score amount. - CreateAt *gtime.Time `json:"createAt" ` // Created Time - UpdateAt *gtime.Time `json:"updateAt" ` // Updated Time -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/gendao/go.mod.txt b/server/internal/library/hggen/internal/cmd/testdata/gendao/go.mod.txt deleted file mode 100644 index c121305..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/gendao/go.mod.txt +++ /dev/null @@ -1,32 +0,0 @@ -module for-gendao-test/pkg - -go 1.18 - -require ( - github.com/gogf/gf/v2 v2.5.3 - github.com/shopspring/decimal v1.3.1 -) - -require ( - github.com/BurntSushi/toml v1.2.0 // indirect - github.com/clbanning/mxj/v2 v2.7.0 // indirect - github.com/fatih/color v1.15.0 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/go-logr/logr v1.2.4 // indirect - github.com/go-logr/stdr v1.2.2 // indirect - github.com/gorilla/websocket v1.5.0 // indirect - github.com/grokify/html-strip-tags-go v0.0.1 // indirect - github.com/magiconair/properties v1.8.6 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect - github.com/mattn/go-runewidth v0.0.15 // indirect - github.com/olekukonko/tablewriter v0.0.5 // indirect - github.com/rivo/uniseg v0.4.4 // indirect - go.opentelemetry.io/otel v1.14.0 // indirect - go.opentelemetry.io/otel/sdk v1.14.0 // indirect - go.opentelemetry.io/otel/trace v1.14.0 // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) diff --git a/server/internal/library/hggen/internal/cmd/testdata/gendao/user.tpl.sql b/server/internal/library/hggen/internal/cmd/testdata/gendao/user.tpl.sql deleted file mode 100644 index f27fc11..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/gendao/user.tpl.sql +++ /dev/null @@ -1,10 +0,0 @@ -CREATE TABLE `%s` ( - `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'User ID', - `passport` varchar(45) NOT NULL COMMENT 'User Passport', - `password` varchar(45) NOT NULL COMMENT 'User Password', - `nickname` varchar(45) NOT NULL COMMENT 'User Nickname', - `score` decimal(10,2) unsigned DEFAULT NULL COMMENT 'Total score amount.', - `create_at` datetime DEFAULT NULL COMMENT 'Created Time', - `update_at` datetime DEFAULT NULL COMMENT 'Updated Time', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/server/internal/library/hggen/internal/cmd/testdata/genpbentity/generated_user/table_user.proto b/server/internal/library/hggen/internal/cmd/testdata/genpbentity/generated_user/table_user.proto deleted file mode 100644 index 365999e..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/genpbentity/generated_user/table_user.proto +++ /dev/null @@ -1,21 +0,0 @@ -// ========================================================================== -// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. -// ========================================================================== - -syntax = "proto3"; - -package unittest; - -option go_package = "unittest"; - -import "google/protobuf/timestamp.proto"; - -message TableUser { - uint32 ID = 1; // User ID - string PASSPORT = 2; // User Passport - string PASSWORD = 3; // User Password - string NICKNAME = 4; // User Nickname - string SCORE = 5; // Total score amount. - google.protobuf.Timestamp CREATE_AT = 6; // Created Time - google.protobuf.Timestamp UPDATE_AT = 7; // Updated Time -} \ No newline at end of file diff --git a/server/internal/library/hggen/internal/cmd/testdata/genpbentity/user.tpl.sql b/server/internal/library/hggen/internal/cmd/testdata/genpbentity/user.tpl.sql deleted file mode 100644 index f27fc11..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/genpbentity/user.tpl.sql +++ /dev/null @@ -1,10 +0,0 @@ -CREATE TABLE `%s` ( - `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'User ID', - `passport` varchar(45) NOT NULL COMMENT 'User Passport', - `password` varchar(45) NOT NULL COMMENT 'User Password', - `nickname` varchar(45) NOT NULL COMMENT 'User Nickname', - `score` decimal(10,2) unsigned DEFAULT NULL COMMENT 'Total score amount.', - `create_at` datetime DEFAULT NULL COMMENT 'Created Time', - `update_at` datetime DEFAULT NULL COMMENT 'Updated Time', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/server/internal/library/hggen/internal/cmd/testdata/genservice/logic/article/article.go b/server/internal/library/hggen/internal/cmd/testdata/genservice/logic/article/article.go deleted file mode 100644 index 90d21ef..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/genservice/logic/article/article.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright GoFrame Author(https://goframe.org). All Rights Reserved. -// -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, -// You can obtain one at https://github.com/gogf/gf. - -package article - -import ( - "context" - - "hotgo/internal/library/hggen/internal/cmd/testdata/genservice/service" -) - -type sArticle struct { -} - -func init() { - service.RegisterArticle(&sArticle{}) -} - -// Get article details -func (s *sArticle) Get(ctx context.Context, id uint) (info struct{}, err error) { - return struct{}{}, err -} - -// Create -/** - * create an article. - * @author oldme - */ -func (s *sArticle) Create(ctx context.Context, info struct{}) (id uint, err error) { - return id, err -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/genservice/logic/logic_expect.go b/server/internal/library/hggen/internal/cmd/testdata/genservice/logic/logic_expect.go deleted file mode 100644 index bf9475c..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/genservice/logic/logic_expect.go +++ /dev/null @@ -1,9 +0,0 @@ -// ========================================================================== -// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. -// ========================================================================== - -package logic - -import ( - _ "hotgo/internal/library/hggen/internal/cmd/testdata/genservice/logic/article" -) diff --git a/server/internal/library/hggen/internal/cmd/testdata/genservice/service/article.go b/server/internal/library/hggen/internal/cmd/testdata/genservice/service/article.go deleted file mode 100644 index 765a1c8..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/genservice/service/article.go +++ /dev/null @@ -1,38 +0,0 @@ -// ================================================================================ -// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. -// You can delete these comments if you wish manually maintain this interface file. -// ================================================================================ - -package service - -import ( - "context" -) - -type ( - IArticle interface { - // Get article details - Get(ctx context.Context, id uint) (info struct{}, err error) - // Create - /** - * create an article. - * @author oldme - */ - Create(ctx context.Context, info struct{}) (id uint, err error) - } -) - -var ( - localArticle IArticle -) - -func Article() IArticle { - if localArticle == nil { - panic("implement not found for interface IArticle, forgot register?") - } - return localArticle -} - -func RegisterArticle(i IArticle) { - localArticle = i -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/issue/2572/config.yaml b/server/internal/library/hggen/internal/cmd/testdata/issue/2572/config.yaml deleted file mode 100644 index 82e437f..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/issue/2572/config.yaml +++ /dev/null @@ -1,20 +0,0 @@ -gfcli: - gen: - dao: - - link: "mysql:root:12345678@tcp(127.0.0.1:3306)/test" - tables: "user1" - descriptionTag: true - noModelComment: true - group: "sys" - clear: true - overwriteDao: true - - link: "mysql:root:12345678@tcp(127.0.0.1:3306)/test" - tables: "user2" - descriptionTag: true - noModelComment: true - group: "book" - clear: true - overwriteDao: true - - - diff --git a/server/internal/library/hggen/internal/cmd/testdata/issue/2572/dao/internal/user_3.go b/server/internal/library/hggen/internal/cmd/testdata/issue/2572/dao/internal/user_3.go deleted file mode 100644 index db59440..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/issue/2572/dao/internal/user_3.go +++ /dev/null @@ -1,85 +0,0 @@ -// ========================================================================== -// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. -// ========================================================================== - -package internal - -import ( - "context" - - "github.com/gogf/gf/v2/database/gdb" - "github.com/gogf/gf/v2/frame/g" -) - -// User3Dao is the data access object for table user3. -type User3Dao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns User3Columns // columns contains all the column names of Table for convenient usage. -} - -// User3Columns defines and stores column names for table user3. -type User3Columns struct { - Id string // User ID - Passport string // User Passport - Password string // User Password - Nickname string // User Nickname - Score string // Total score amount. - CreateAt string // Created Time - UpdateAt string // Updated Time -} - -// user3Columns holds the columns for table user3. -var user3Columns = User3Columns{ - Id: "id", - Passport: "passport", - Password: "password", - Nickname: "nickname", - Score: "score", - CreateAt: "create_at", - UpdateAt: "update_at", -} - -// NewUser3Dao creates and returns a new DAO object for table data access. -func NewUser3Dao() *User3Dao { - return &User3Dao{ - group: "sys", - table: "user3", - columns: user3Columns, - } -} - -// DB retrieves and returns the underlying raw database management object of current DAO. -func (dao *User3Dao) DB() gdb.DB { - return g.DB(dao.group) -} - -// Table returns the table name of current dao. -func (dao *User3Dao) Table() string { - return dao.table -} - -// Columns returns all column names of current dao. -func (dao *User3Dao) Columns() User3Columns { - return dao.columns -} - -// Group returns the configuration group name of database of current dao. -func (dao *User3Dao) Group() string { - return dao.group -} - -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. -func (dao *User3Dao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) -} - -// Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. -// It commits the transaction and returns nil if function f returns nil. -// -// Note that, you should not Commit or Rollback the transaction in function f -// as it is automatically handled by this function. -func (dao *User3Dao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { - return dao.Ctx(ctx).Transaction(ctx, f) -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/issue/2572/dao/internal/user_4.go b/server/internal/library/hggen/internal/cmd/testdata/issue/2572/dao/internal/user_4.go deleted file mode 100644 index 0488034..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/issue/2572/dao/internal/user_4.go +++ /dev/null @@ -1,85 +0,0 @@ -// ========================================================================== -// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. -// ========================================================================== - -package internal - -import ( - "context" - - "github.com/gogf/gf/v2/database/gdb" - "github.com/gogf/gf/v2/frame/g" -) - -// User4Dao is the data access object for table user4. -type User4Dao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns User4Columns // columns contains all the column names of Table for convenient usage. -} - -// User4Columns defines and stores column names for table user4. -type User4Columns struct { - Id string // User ID - Passport string // User Passport - Password string // User Password - Nickname string // User Nickname - Score string // Total score amount. - CreateAt string // Created Time - UpdateAt string // Updated Time -} - -// user4Columns holds the columns for table user4. -var user4Columns = User4Columns{ - Id: "id", - Passport: "passport", - Password: "password", - Nickname: "nickname", - Score: "score", - CreateAt: "create_at", - UpdateAt: "update_at", -} - -// NewUser4Dao creates and returns a new DAO object for table data access. -func NewUser4Dao() *User4Dao { - return &User4Dao{ - group: "book", - table: "user4", - columns: user4Columns, - } -} - -// DB retrieves and returns the underlying raw database management object of current DAO. -func (dao *User4Dao) DB() gdb.DB { - return g.DB(dao.group) -} - -// Table returns the table name of current dao. -func (dao *User4Dao) Table() string { - return dao.table -} - -// Columns returns all column names of current dao. -func (dao *User4Dao) Columns() User4Columns { - return dao.columns -} - -// Group returns the configuration group name of database of current dao. -func (dao *User4Dao) Group() string { - return dao.group -} - -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. -func (dao *User4Dao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) -} - -// Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. -// It commits the transaction and returns nil if function f returns nil. -// -// Note that, you should not Commit or Rollback the transaction in function f -// as it is automatically handled by this function. -func (dao *User4Dao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { - return dao.Ctx(ctx).Transaction(ctx, f) -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/issue/2572/dao/user_3.go b/server/internal/library/hggen/internal/cmd/testdata/issue/2572/dao/user_3.go deleted file mode 100644 index 375276e..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/issue/2572/dao/user_3.go +++ /dev/null @@ -1,27 +0,0 @@ -// ================================================================================= -// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. -// ================================================================================= - -package dao - -import ( - "/internal" -) - -// internalUser3Dao is internal type for wrapping internal DAO implements. -type internalUser3Dao = *internal.User3Dao - -// user3Dao is the data access object for table user3. -// You can define custom methods on it to extend its functionality as you wish. -type user3Dao struct { - internalUser3Dao -} - -var ( - // User3 is globally public accessible object for table user3 operations. - User3 = user3Dao{ - internal.NewUser3Dao(), - } -) - -// Fill with you ideas below. diff --git a/server/internal/library/hggen/internal/cmd/testdata/issue/2572/dao/user_4.go b/server/internal/library/hggen/internal/cmd/testdata/issue/2572/dao/user_4.go deleted file mode 100644 index 7d02359..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/issue/2572/dao/user_4.go +++ /dev/null @@ -1,27 +0,0 @@ -// ================================================================================= -// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. -// ================================================================================= - -package dao - -import ( - "/internal" -) - -// internalUser4Dao is internal type for wrapping internal DAO implements. -type internalUser4Dao = *internal.User4Dao - -// user4Dao is the data access object for table user4. -// You can define custom methods on it to extend its functionality as you wish. -type user4Dao struct { - internalUser4Dao -} - -var ( - // User4 is globally public accessible object for table user4 operations. - User4 = user4Dao{ - internal.NewUser4Dao(), - } -) - -// Fill with you ideas below. diff --git a/server/internal/library/hggen/internal/cmd/testdata/issue/2572/model/do/user_3.go b/server/internal/library/hggen/internal/cmd/testdata/issue/2572/model/do/user_3.go deleted file mode 100644 index 14a1bf4..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/issue/2572/model/do/user_3.go +++ /dev/null @@ -1,22 +0,0 @@ -// ================================================================================= -// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. -// ================================================================================= - -package do - -import ( - "github.com/gogf/gf/v2/frame/g" - "github.com/gogf/gf/v2/os/gtime" -) - -// User1 is the golang structure of table user1 for DAO operations like Where/Data. -type User1 struct { - g.Meta `orm:"table:user1, do:true"` - Id interface{} // User ID - Passport interface{} // User Passport - Password interface{} // User Password - Nickname interface{} // User Nickname - Score interface{} // Total score amount. - CreateAt *gtime.Time // Created Time - UpdateAt *gtime.Time // Updated Time -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/issue/2572/model/do/user_4.go b/server/internal/library/hggen/internal/cmd/testdata/issue/2572/model/do/user_4.go deleted file mode 100644 index 8019772..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/issue/2572/model/do/user_4.go +++ /dev/null @@ -1,22 +0,0 @@ -// ================================================================================= -// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. -// ================================================================================= - -package do - -import ( - "github.com/gogf/gf/v2/frame/g" - "github.com/gogf/gf/v2/os/gtime" -) - -// User2 is the golang structure of table user2 for DAO operations like Where/Data. -type User2 struct { - g.Meta `orm:"table:user2, do:true"` - Id interface{} // User ID - Passport interface{} // User Passport - Password interface{} // User Password - Nickname interface{} // User Nickname - Score interface{} // Total score amount. - CreateAt *gtime.Time // Created Time - UpdateAt *gtime.Time // Updated Time -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/issue/2572/model/entity/user_3.go b/server/internal/library/hggen/internal/cmd/testdata/issue/2572/model/entity/user_3.go deleted file mode 100644 index de4cd54..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/issue/2572/model/entity/user_3.go +++ /dev/null @@ -1,20 +0,0 @@ -// ================================================================================= -// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. -// ================================================================================= - -package entity - -import ( - "github.com/gogf/gf/v2/os/gtime" -) - -// User1 is the golang structure for table user1. -type User1 struct { - Id uint `json:"ID" description:"User ID"` - Passport string `json:"PASSPORT" description:"User Passport"` - Password string `json:"PASSWORD" description:"User Password"` - Nickname string `json:"NICKNAME" description:"User Nickname"` - Score float64 `json:"SCORE" description:"Total score amount."` - CreateAt *gtime.Time `json:"CREATE_AT" description:"Created Time"` - UpdateAt *gtime.Time `json:"UPDATE_AT" description:"Updated Time"` -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/issue/2572/model/entity/user_4.go b/server/internal/library/hggen/internal/cmd/testdata/issue/2572/model/entity/user_4.go deleted file mode 100644 index 4727f62..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/issue/2572/model/entity/user_4.go +++ /dev/null @@ -1,20 +0,0 @@ -// ================================================================================= -// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. -// ================================================================================= - -package entity - -import ( - "github.com/gogf/gf/v2/os/gtime" -) - -// User2 is the golang structure for table user2. -type User2 struct { - Id uint `json:"ID" description:"User ID"` - Passport string `json:"PASSPORT" description:"User Passport"` - Password string `json:"PASSWORD" description:"User Password"` - Nickname string `json:"NICKNAME" description:"User Nickname"` - Score float64 `json:"SCORE" description:"Total score amount."` - CreateAt *gtime.Time `json:"CREATE_AT" description:"Created Time"` - UpdateAt *gtime.Time `json:"UPDATE_AT" description:"Updated Time"` -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/issue/2572/sql1.sql b/server/internal/library/hggen/internal/cmd/testdata/issue/2572/sql1.sql deleted file mode 100644 index 2877f1f..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/issue/2572/sql1.sql +++ /dev/null @@ -1,10 +0,0 @@ -CREATE TABLE `user1` ( - `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'User ID', - `passport` varchar(45) NOT NULL COMMENT 'User Passport', - `password` varchar(45) NOT NULL COMMENT 'User Password', - `nickname` varchar(45) NOT NULL COMMENT 'User Nickname', - `score` decimal(10,2) unsigned DEFAULT NULL COMMENT 'Total score amount.', - `create_at` datetime DEFAULT NULL COMMENT 'Created Time', - `update_at` datetime DEFAULT NULL COMMENT 'Updated Time', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/server/internal/library/hggen/internal/cmd/testdata/issue/2572/sql2.sql b/server/internal/library/hggen/internal/cmd/testdata/issue/2572/sql2.sql deleted file mode 100644 index ca450aa..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/issue/2572/sql2.sql +++ /dev/null @@ -1,10 +0,0 @@ -CREATE TABLE `user2` ( - `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'User ID', - `passport` varchar(45) NOT NULL COMMENT 'User Passport', - `password` varchar(45) NOT NULL COMMENT 'User Password', - `nickname` varchar(45) NOT NULL COMMENT 'User Nickname', - `score` decimal(10,2) unsigned DEFAULT NULL COMMENT 'Total score amount.', - `create_at` datetime DEFAULT NULL COMMENT 'Created Time', - `update_at` datetime DEFAULT NULL COMMENT 'Updated Time', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/server/internal/library/hggen/internal/cmd/testdata/issue/2616/config.yaml b/server/internal/library/hggen/internal/cmd/testdata/issue/2616/config.yaml deleted file mode 100644 index fc6299a..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/issue/2616/config.yaml +++ /dev/null @@ -1,20 +0,0 @@ -gfcli: - gen: - dao: - - link: "mysql:root:12345678@tcp(127.0.0.1:3306)/test" - tables: "user1" - descriptionTag: true - noModelComment: true - group: "sys" - clear: true - overwriteDao: false - - link: "mysql:root:12345678@tcp(127.0.0.1:3306)/test" - tables: "user2" - descriptionTag: true - noModelComment: true - group: "book" - clear: true - overwriteDao: true - - - diff --git a/server/internal/library/hggen/internal/cmd/testdata/issue/2616/dao/internal/user_1.go b/server/internal/library/hggen/internal/cmd/testdata/issue/2616/dao/internal/user_1.go deleted file mode 100644 index 9988251..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/issue/2616/dao/internal/user_1.go +++ /dev/null @@ -1,85 +0,0 @@ -// ========================================================================== -// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. -// ========================================================================== - -package internal - -import ( - "context" - - "github.com/gogf/gf/v2/database/gdb" - "github.com/gogf/gf/v2/frame/g" -) - -// User1Dao is the data access object for table user1. -type User1Dao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns User1Columns // columns contains all the column names of Table for convenient usage. -} - -// User1Columns defines and stores column names for table user1. -type User1Columns struct { - Id string // User ID - Passport string // User Passport - Password string // User Password - Nickname string // User Nickname - Score string // Total score amount. - CreateAt string // Created Time - UpdateAt string // Updated Time -} - -// user1Columns holds the columns for table user1. -var user1Columns = User1Columns{ - Id: "id", - Passport: "passport", - Password: "password", - Nickname: "nickname", - Score: "score", - CreateAt: "create_at", - UpdateAt: "update_at", -} - -// NewUser1Dao creates and returns a new DAO object for table data access. -func NewUser1Dao() *User1Dao { - return &User1Dao{ - group: "sys", - table: "user1", - columns: user1Columns, - } -} - -// DB retrieves and returns the underlying raw database management object of current DAO. -func (dao *User1Dao) DB() gdb.DB { - return g.DB(dao.group) -} - -// Table returns the table name of current dao. -func (dao *User1Dao) Table() string { - return dao.table -} - -// Columns returns all column names of current dao. -func (dao *User1Dao) Columns() User1Columns { - return dao.columns -} - -// Group returns the configuration group name of database of current dao. -func (dao *User1Dao) Group() string { - return dao.group -} - -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. -func (dao *User1Dao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) -} - -// Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. -// It commits the transaction and returns nil if function f returns nil. -// -// Note that, you should not Commit or Rollback the transaction in function f -// as it is automatically handled by this function. -func (dao *User1Dao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { - return dao.Ctx(ctx).Transaction(ctx, f) -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/issue/2616/dao/internal/user_2.go b/server/internal/library/hggen/internal/cmd/testdata/issue/2616/dao/internal/user_2.go deleted file mode 100644 index 7e9cf2f..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/issue/2616/dao/internal/user_2.go +++ /dev/null @@ -1,85 +0,0 @@ -// ========================================================================== -// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. -// ========================================================================== - -package internal - -import ( - "context" - - "github.com/gogf/gf/v2/database/gdb" - "github.com/gogf/gf/v2/frame/g" -) - -// User2Dao is the data access object for table user2. -type User2Dao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns User2Columns // columns contains all the column names of Table for convenient usage. -} - -// User2Columns defines and stores column names for table user2. -type User2Columns struct { - Id string // User ID - Passport string // User Passport - Password string // User Password - Nickname string // User Nickname - Score string // Total score amount. - CreateAt string // Created Time - UpdateAt string // Updated Time -} - -// user2Columns holds the columns for table user2. -var user2Columns = User2Columns{ - Id: "id", - Passport: "passport", - Password: "password", - Nickname: "nickname", - Score: "score", - CreateAt: "create_at", - UpdateAt: "update_at", -} - -// NewUser2Dao creates and returns a new DAO object for table data access. -func NewUser2Dao() *User2Dao { - return &User2Dao{ - group: "sys", - table: "user2", - columns: user2Columns, - } -} - -// DB retrieves and returns the underlying raw database management object of current DAO. -func (dao *User2Dao) DB() gdb.DB { - return g.DB(dao.group) -} - -// Table returns the table name of current dao. -func (dao *User2Dao) Table() string { - return dao.table -} - -// Columns returns all column names of current dao. -func (dao *User2Dao) Columns() User2Columns { - return dao.columns -} - -// Group returns the configuration group name of database of current dao. -func (dao *User2Dao) Group() string { - return dao.group -} - -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. -func (dao *User2Dao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) -} - -// Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. -// It commits the transaction and returns nil if function f returns nil. -// -// Note that, you should not Commit or Rollback the transaction in function f -// as it is automatically handled by this function. -func (dao *User2Dao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { - return dao.Ctx(ctx).Transaction(ctx, f) -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/issue/2616/dao/internal/user_3.go b/server/internal/library/hggen/internal/cmd/testdata/issue/2616/dao/internal/user_3.go deleted file mode 100644 index db59440..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/issue/2616/dao/internal/user_3.go +++ /dev/null @@ -1,85 +0,0 @@ -// ========================================================================== -// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. -// ========================================================================== - -package internal - -import ( - "context" - - "github.com/gogf/gf/v2/database/gdb" - "github.com/gogf/gf/v2/frame/g" -) - -// User3Dao is the data access object for table user3. -type User3Dao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns User3Columns // columns contains all the column names of Table for convenient usage. -} - -// User3Columns defines and stores column names for table user3. -type User3Columns struct { - Id string // User ID - Passport string // User Passport - Password string // User Password - Nickname string // User Nickname - Score string // Total score amount. - CreateAt string // Created Time - UpdateAt string // Updated Time -} - -// user3Columns holds the columns for table user3. -var user3Columns = User3Columns{ - Id: "id", - Passport: "passport", - Password: "password", - Nickname: "nickname", - Score: "score", - CreateAt: "create_at", - UpdateAt: "update_at", -} - -// NewUser3Dao creates and returns a new DAO object for table data access. -func NewUser3Dao() *User3Dao { - return &User3Dao{ - group: "sys", - table: "user3", - columns: user3Columns, - } -} - -// DB retrieves and returns the underlying raw database management object of current DAO. -func (dao *User3Dao) DB() gdb.DB { - return g.DB(dao.group) -} - -// Table returns the table name of current dao. -func (dao *User3Dao) Table() string { - return dao.table -} - -// Columns returns all column names of current dao. -func (dao *User3Dao) Columns() User3Columns { - return dao.columns -} - -// Group returns the configuration group name of database of current dao. -func (dao *User3Dao) Group() string { - return dao.group -} - -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. -func (dao *User3Dao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) -} - -// Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. -// It commits the transaction and returns nil if function f returns nil. -// -// Note that, you should not Commit or Rollback the transaction in function f -// as it is automatically handled by this function. -func (dao *User3Dao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { - return dao.Ctx(ctx).Transaction(ctx, f) -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/issue/2616/dao/internal/user_4.go b/server/internal/library/hggen/internal/cmd/testdata/issue/2616/dao/internal/user_4.go deleted file mode 100644 index 0488034..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/issue/2616/dao/internal/user_4.go +++ /dev/null @@ -1,85 +0,0 @@ -// ========================================================================== -// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. -// ========================================================================== - -package internal - -import ( - "context" - - "github.com/gogf/gf/v2/database/gdb" - "github.com/gogf/gf/v2/frame/g" -) - -// User4Dao is the data access object for table user4. -type User4Dao struct { - table string // table is the underlying table name of the DAO. - group string // group is the database configuration group name of current DAO. - columns User4Columns // columns contains all the column names of Table for convenient usage. -} - -// User4Columns defines and stores column names for table user4. -type User4Columns struct { - Id string // User ID - Passport string // User Passport - Password string // User Password - Nickname string // User Nickname - Score string // Total score amount. - CreateAt string // Created Time - UpdateAt string // Updated Time -} - -// user4Columns holds the columns for table user4. -var user4Columns = User4Columns{ - Id: "id", - Passport: "passport", - Password: "password", - Nickname: "nickname", - Score: "score", - CreateAt: "create_at", - UpdateAt: "update_at", -} - -// NewUser4Dao creates and returns a new DAO object for table data access. -func NewUser4Dao() *User4Dao { - return &User4Dao{ - group: "book", - table: "user4", - columns: user4Columns, - } -} - -// DB retrieves and returns the underlying raw database management object of current DAO. -func (dao *User4Dao) DB() gdb.DB { - return g.DB(dao.group) -} - -// Table returns the table name of current dao. -func (dao *User4Dao) Table() string { - return dao.table -} - -// Columns returns all column names of current dao. -func (dao *User4Dao) Columns() User4Columns { - return dao.columns -} - -// Group returns the configuration group name of database of current dao. -func (dao *User4Dao) Group() string { - return dao.group -} - -// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation. -func (dao *User4Dao) Ctx(ctx context.Context) *gdb.Model { - return dao.DB().Model(dao.table).Safe().Ctx(ctx) -} - -// Transaction wraps the transaction logic using function f. -// It rollbacks the transaction and returns the error from function f if it returns non-nil error. -// It commits the transaction and returns nil if function f returns nil. -// -// Note that, you should not Commit or Rollback the transaction in function f -// as it is automatically handled by this function. -func (dao *User4Dao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) { - return dao.Ctx(ctx).Transaction(ctx, f) -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/issue/2616/dao/user_1.go b/server/internal/library/hggen/internal/cmd/testdata/issue/2616/dao/user_1.go deleted file mode 100644 index 69af67a..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/issue/2616/dao/user_1.go +++ /dev/null @@ -1,29 +0,0 @@ -// ================================================================================= -// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. -// ================================================================================= - -// I am not overwritten. - -package dao - -import ( - "/internal" -) - -// internalUser1Dao is internal type for wrapping internal DAO implements. -type internalUser1Dao = *internal.User1Dao - -// user1Dao is the data access object for table user1. -// You can define custom methods on it to extend its functionality as you wish. -type user1Dao struct { - internalUser1Dao -} - -var ( - // User1 is globally public accessible object for table user1 operations. - User1 = user1Dao{ - internal.NewUser1Dao(), - } -) - -// Fill with you ideas below. diff --git a/server/internal/library/hggen/internal/cmd/testdata/issue/2616/dao/user_2.go b/server/internal/library/hggen/internal/cmd/testdata/issue/2616/dao/user_2.go deleted file mode 100644 index 895d406..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/issue/2616/dao/user_2.go +++ /dev/null @@ -1,29 +0,0 @@ -// ================================================================================= -// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. -// ================================================================================= - -// I am not overwritten. - -package dao - -import ( - "/internal" -) - -// internalUser2Dao is internal type for wrapping internal DAO implements. -type internalUser2Dao = *internal.User2Dao - -// user2Dao is the data access object for table user2. -// You can define custom methods on it to extend its functionality as you wish. -type user2Dao struct { - internalUser2Dao -} - -var ( - // User2 is globally public accessible object for table user2 operations. - User2 = user2Dao{ - internal.NewUser2Dao(), - } -) - -// Fill with you ideas below. diff --git a/server/internal/library/hggen/internal/cmd/testdata/issue/2616/dao/user_3.go b/server/internal/library/hggen/internal/cmd/testdata/issue/2616/dao/user_3.go deleted file mode 100644 index 375276e..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/issue/2616/dao/user_3.go +++ /dev/null @@ -1,27 +0,0 @@ -// ================================================================================= -// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. -// ================================================================================= - -package dao - -import ( - "/internal" -) - -// internalUser3Dao is internal type for wrapping internal DAO implements. -type internalUser3Dao = *internal.User3Dao - -// user3Dao is the data access object for table user3. -// You can define custom methods on it to extend its functionality as you wish. -type user3Dao struct { - internalUser3Dao -} - -var ( - // User3 is globally public accessible object for table user3 operations. - User3 = user3Dao{ - internal.NewUser3Dao(), - } -) - -// Fill with you ideas below. diff --git a/server/internal/library/hggen/internal/cmd/testdata/issue/2616/dao/user_4.go b/server/internal/library/hggen/internal/cmd/testdata/issue/2616/dao/user_4.go deleted file mode 100644 index 7d02359..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/issue/2616/dao/user_4.go +++ /dev/null @@ -1,27 +0,0 @@ -// ================================================================================= -// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. -// ================================================================================= - -package dao - -import ( - "/internal" -) - -// internalUser4Dao is internal type for wrapping internal DAO implements. -type internalUser4Dao = *internal.User4Dao - -// user4Dao is the data access object for table user4. -// You can define custom methods on it to extend its functionality as you wish. -type user4Dao struct { - internalUser4Dao -} - -var ( - // User4 is globally public accessible object for table user4 operations. - User4 = user4Dao{ - internal.NewUser4Dao(), - } -) - -// Fill with you ideas below. diff --git a/server/internal/library/hggen/internal/cmd/testdata/issue/2616/model/do/user_3.go b/server/internal/library/hggen/internal/cmd/testdata/issue/2616/model/do/user_3.go deleted file mode 100644 index 14a1bf4..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/issue/2616/model/do/user_3.go +++ /dev/null @@ -1,22 +0,0 @@ -// ================================================================================= -// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. -// ================================================================================= - -package do - -import ( - "github.com/gogf/gf/v2/frame/g" - "github.com/gogf/gf/v2/os/gtime" -) - -// User1 is the golang structure of table user1 for DAO operations like Where/Data. -type User1 struct { - g.Meta `orm:"table:user1, do:true"` - Id interface{} // User ID - Passport interface{} // User Passport - Password interface{} // User Password - Nickname interface{} // User Nickname - Score interface{} // Total score amount. - CreateAt *gtime.Time // Created Time - UpdateAt *gtime.Time // Updated Time -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/issue/2616/model/do/user_4.go b/server/internal/library/hggen/internal/cmd/testdata/issue/2616/model/do/user_4.go deleted file mode 100644 index 8019772..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/issue/2616/model/do/user_4.go +++ /dev/null @@ -1,22 +0,0 @@ -// ================================================================================= -// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. -// ================================================================================= - -package do - -import ( - "github.com/gogf/gf/v2/frame/g" - "github.com/gogf/gf/v2/os/gtime" -) - -// User2 is the golang structure of table user2 for DAO operations like Where/Data. -type User2 struct { - g.Meta `orm:"table:user2, do:true"` - Id interface{} // User ID - Passport interface{} // User Passport - Password interface{} // User Password - Nickname interface{} // User Nickname - Score interface{} // Total score amount. - CreateAt *gtime.Time // Created Time - UpdateAt *gtime.Time // Updated Time -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/issue/2616/model/entity/user_3.go b/server/internal/library/hggen/internal/cmd/testdata/issue/2616/model/entity/user_3.go deleted file mode 100644 index de4cd54..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/issue/2616/model/entity/user_3.go +++ /dev/null @@ -1,20 +0,0 @@ -// ================================================================================= -// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. -// ================================================================================= - -package entity - -import ( - "github.com/gogf/gf/v2/os/gtime" -) - -// User1 is the golang structure for table user1. -type User1 struct { - Id uint `json:"ID" description:"User ID"` - Passport string `json:"PASSPORT" description:"User Passport"` - Password string `json:"PASSWORD" description:"User Password"` - Nickname string `json:"NICKNAME" description:"User Nickname"` - Score float64 `json:"SCORE" description:"Total score amount."` - CreateAt *gtime.Time `json:"CREATE_AT" description:"Created Time"` - UpdateAt *gtime.Time `json:"UPDATE_AT" description:"Updated Time"` -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/issue/2616/model/entity/user_4.go b/server/internal/library/hggen/internal/cmd/testdata/issue/2616/model/entity/user_4.go deleted file mode 100644 index 4727f62..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/issue/2616/model/entity/user_4.go +++ /dev/null @@ -1,20 +0,0 @@ -// ================================================================================= -// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. -// ================================================================================= - -package entity - -import ( - "github.com/gogf/gf/v2/os/gtime" -) - -// User2 is the golang structure for table user2. -type User2 struct { - Id uint `json:"ID" description:"User ID"` - Passport string `json:"PASSPORT" description:"User Passport"` - Password string `json:"PASSWORD" description:"User Password"` - Nickname string `json:"NICKNAME" description:"User Nickname"` - Score float64 `json:"SCORE" description:"Total score amount."` - CreateAt *gtime.Time `json:"CREATE_AT" description:"Created Time"` - UpdateAt *gtime.Time `json:"UPDATE_AT" description:"Updated Time"` -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/issue/2616/sql1.sql b/server/internal/library/hggen/internal/cmd/testdata/issue/2616/sql1.sql deleted file mode 100644 index 2877f1f..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/issue/2616/sql1.sql +++ /dev/null @@ -1,10 +0,0 @@ -CREATE TABLE `user1` ( - `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'User ID', - `passport` varchar(45) NOT NULL COMMENT 'User Passport', - `password` varchar(45) NOT NULL COMMENT 'User Password', - `nickname` varchar(45) NOT NULL COMMENT 'User Nickname', - `score` decimal(10,2) unsigned DEFAULT NULL COMMENT 'Total score amount.', - `create_at` datetime DEFAULT NULL COMMENT 'Created Time', - `update_at` datetime DEFAULT NULL COMMENT 'Updated Time', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/server/internal/library/hggen/internal/cmd/testdata/issue/2616/sql2.sql b/server/internal/library/hggen/internal/cmd/testdata/issue/2616/sql2.sql deleted file mode 100644 index ca450aa..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/issue/2616/sql2.sql +++ /dev/null @@ -1,10 +0,0 @@ -CREATE TABLE `user2` ( - `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'User ID', - `passport` varchar(45) NOT NULL COMMENT 'User Passport', - `password` varchar(45) NOT NULL COMMENT 'User Password', - `nickname` varchar(45) NOT NULL COMMENT 'User Nickname', - `score` decimal(10,2) unsigned DEFAULT NULL COMMENT 'Total score amount.', - `create_at` datetime DEFAULT NULL COMMENT 'Created Time', - `update_at` datetime DEFAULT NULL COMMENT 'Updated Time', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/server/internal/library/hggen/internal/cmd/testdata/issue/2746/issue_2746.go b/server/internal/library/hggen/internal/cmd/testdata/issue/2746/issue_2746.go deleted file mode 100644 index 0567481..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/issue/2746/issue_2746.go +++ /dev/null @@ -1,18 +0,0 @@ -// ================================================================================= -// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. -// ================================================================================= - -package entity - -import ( - "github.com/gogf/gf/v2/encoding/gjson" -) - -// Issue2746 is the golang structure for table issue2746. -type Issue2746 struct { - Id uint `json:"ID" ` // User ID - Nickname string `json:"NICKNAME" ` // User Nickname - Tag *gjson.Json `json:"TAG" ` // - Info string `json:"INFO" ` // - Tag2 *gjson.Json `json:"TAG_2" ` // Tag2 -} diff --git a/server/internal/library/hggen/internal/cmd/testdata/issue/2746/sql.sql b/server/internal/library/hggen/internal/cmd/testdata/issue/2746/sql.sql deleted file mode 100644 index 99357a1..0000000 --- a/server/internal/library/hggen/internal/cmd/testdata/issue/2746/sql.sql +++ /dev/null @@ -1,9 +0,0 @@ -CREATE TABLE %s ( - `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'User ID', - `nickname` varchar(45) NOT NULL COMMENT 'User Nickname', - `tag` json NOT NULL, - `info` longtext DEFAULT NULL, - `tag2` json COMMENT 'Tag2', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -