移除无用测试文件

This commit is contained in:
孟帅 2024-03-08 10:34:37 +08:00
parent f0bf193077
commit 06131680dd
61 changed files with 0 additions and 1715 deletions

View File

@ -1,5 +0,0 @@
package main
func main() {
}

View File

@ -1,5 +0,0 @@
package main
func main() {
}

View File

@ -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 => ../../../../../../../

View File

@ -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=

View File

@ -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)
}
}

View File

@ -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")
},
})
}

View File

@ -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)
}

View File

@ -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{}
)

View File

@ -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{}
}

View File

@ -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{}

View File

@ -1,5 +0,0 @@
// =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
// =================================================================================
package article

View File

@ -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{}
}

View File

@ -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)
}

View File

@ -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)
}

View File

@ -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)
}

View File

@ -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)
}

View File

@ -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)
}

View File

@ -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)
}

View File

@ -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)
}

View File

@ -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.

View File

@ -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
}

View File

@ -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
}

View File

@ -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)
}

View File

@ -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.

View File

@ -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
}

View File

@ -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
}

View File

@ -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
)

View File

@ -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;

View File

@ -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
}

View File

@ -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;

View File

@ -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
}

View File

@ -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"
)

View File

@ -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
}

View File

@ -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

View File

@ -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)
}

View File

@ -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)
}

View File

@ -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.

View File

@ -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.

View File

@ -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
}

View File

@ -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
}

View File

@ -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"`
}

View File

@ -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"`
}

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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)
}

View File

@ -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)
}

View File

@ -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)
}

View File

@ -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)
}

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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
}

View File

@ -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
}

View File

@ -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"`
}

View File

@ -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"`
}

View File

@ -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;

View File

@ -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;

View File

@ -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
}

View File

@ -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;