This commit is contained in:
eson 2023-06-19 10:12:58 +08:00
parent c5ecca3da2
commit 038d2d36a4
225 changed files with 419 additions and 314 deletions

View File

@ -115,7 +115,7 @@ func GenFromPath(mdir string, cols []Column, tableName string, tableComment stri
// 匹配到主键定义 // 匹配到主键定义
fcontent := "package model\n" fcontent := "package gmodel\n"
structstr := "// %s %s\ntype %s struct {%s\n}\n" structstr := "// %s %s\ntype %s struct {%s\n}\n"
@ -210,7 +210,7 @@ func GenFromPath(mdir string, cols []Column, tableName string, tableComment stri
panic(err) panic(err)
} }
fcontent = "package model\n// TODO: 使用model的属性做你想做的" fcontent = "package gmodel\n// TODO: 使用model的属性做你想做的"
genGoLogicFileName := fmt.Sprintf("%s/%s_logic.go", mdir, tableName) genGoLogicFileName := fmt.Sprintf("%s/%s_logic.go", mdir, tableName)
// 使用 os.Stat 函数获取文件信息 // 使用 os.Stat 函数获取文件信息

View File

@ -1,4 +1,4 @@
package model package gmodel
import ( import (
"errors" "errors"

View File

@ -1,5 +1,5 @@
// Code generated by goctl. DO NOT EDIT. // Code generated by goctl. DO NOT EDIT.
package model package gmodel
import ( import (
"context" "context"

View File

@ -1,4 +1,4 @@
package model package gmodel
{{if .Cache}}import ( {{if .Cache}}import (
"github.com/zeromicro/go-zero/core/stores/cache" "github.com/zeromicro/go-zero/core/stores/cache"

View File

@ -1,4 +1,4 @@
package model package gmodel
import ( import (
"time" "time"

View File

@ -1,4 +1,4 @@
package model package gmodel
import ( import (
"context" "context"

View File

@ -1,6 +1,6 @@
// Code generated by goctl. DO NOT EDIT. // Code generated by goctl. DO NOT EDIT.
package model package gmodel
import ( import (
"context" "context"

View File

@ -1,8 +1,9 @@
package model package gmodel
import ( import (
"context" "context"
"fmt" "fmt"
"github.com/zeromicro/go-zero/core/stores/sqlx" "github.com/zeromicro/go-zero/core/stores/sqlx"
) )

View File

@ -1,6 +1,6 @@
// Code generated by goctl. DO NOT EDIT. // Code generated by goctl. DO NOT EDIT.
package model package gmodel
import ( import (
"context" "context"

View File

@ -1,4 +1,4 @@
package model package gmodel
import ( import (
"context" "context"

View File

@ -1,6 +1,6 @@
// Code generated by goctl. DO NOT EDIT. // Code generated by goctl. DO NOT EDIT.
package model package gmodel
import ( import (
"context" "context"

View File

@ -1,4 +1,4 @@
package model package gmodel
import "github.com/zeromicro/go-zero/core/stores/sqlx" import "github.com/zeromicro/go-zero/core/stores/sqlx"

View File

@ -1,6 +1,6 @@
// Code generated by goctl. DO NOT EDIT. // Code generated by goctl. DO NOT EDIT.
package model package gmodel
import ( import (
"context" "context"

View File

@ -1,4 +1,4 @@
package model package gmodel
import "github.com/zeromicro/go-zero/core/stores/sqlx" import "github.com/zeromicro/go-zero/core/stores/sqlx"

View File

@ -1,6 +1,6 @@
// Code generated by goctl. DO NOT EDIT. // Code generated by goctl. DO NOT EDIT.
package model package gmodel
import ( import (
"context" "context"

View File

@ -1,4 +1,4 @@
package model package gmodel
import ( import (
"context" "context"

View File

@ -1,6 +1,6 @@
// Code generated by goctl. DO NOT EDIT. // Code generated by goctl. DO NOT EDIT.
package model package gmodel
import ( import (
"context" "context"

View File

@ -1,4 +1,4 @@
package model package gmodel
import "github.com/zeromicro/go-zero/core/stores/sqlx" import "github.com/zeromicro/go-zero/core/stores/sqlx"

View File

@ -1,6 +1,6 @@
// Code generated by goctl. DO NOT EDIT. // Code generated by goctl. DO NOT EDIT.
package model package gmodel
import ( import (
"context" "context"

View File

@ -1,4 +1,4 @@
package model package gmodel
import "github.com/zeromicro/go-zero/core/stores/sqlx" import "github.com/zeromicro/go-zero/core/stores/sqlx"

View File

@ -1,6 +1,6 @@
// Code generated by goctl. DO NOT EDIT. // Code generated by goctl. DO NOT EDIT.
package model package gmodel
import ( import (
"context" "context"

View File

@ -1,4 +1,4 @@
package model package gmodel
import "github.com/zeromicro/go-zero/core/stores/sqlx" import "github.com/zeromicro/go-zero/core/stores/sqlx"

View File

@ -1,6 +1,6 @@
// Code generated by goctl. DO NOT EDIT. // Code generated by goctl. DO NOT EDIT.
package model package gmodel
import ( import (
"context" "context"

View File

@ -1,4 +1,4 @@
package model package gmodel
import "github.com/zeromicro/go-zero/core/stores/sqlx" import "github.com/zeromicro/go-zero/core/stores/sqlx"

View File

@ -1,6 +1,6 @@
// Code generated by goctl. DO NOT EDIT. // Code generated by goctl. DO NOT EDIT.
package model package gmodel
import ( import (
"context" "context"

View File

@ -1,4 +1,4 @@
package model package gmodel
import "github.com/zeromicro/go-zero/core/stores/sqlx" import "github.com/zeromicro/go-zero/core/stores/sqlx"

View File

@ -1,6 +1,6 @@
// Code generated by goctl. DO NOT EDIT. // Code generated by goctl. DO NOT EDIT.
package model package gmodel
import ( import (
"context" "context"

View File

@ -1,4 +1,4 @@
package model package gmodel
import "github.com/zeromicro/go-zero/core/stores/sqlx" import "github.com/zeromicro/go-zero/core/stores/sqlx"

View File

@ -1,6 +1,6 @@
// Code generated by goctl. DO NOT EDIT. // Code generated by goctl. DO NOT EDIT.
package model package gmodel
import ( import (
"context" "context"

View File

@ -1,10 +1,11 @@
package model package gmodel
import ( import (
"context" "context"
"fmt" "fmt"
"github.com/zeromicro/go-zero/core/stores/sqlx"
"strings" "strings"
"github.com/zeromicro/go-zero/core/stores/sqlx"
) )
var _ FsProductModel = (*customFsProductModel)(nil) var _ FsProductModel = (*customFsProductModel)(nil)

View File

@ -1,10 +1,11 @@
package model package gmodel
import ( import (
"context" "context"
"fmt" "fmt"
"github.com/zeromicro/go-zero/core/stores/sqlx"
"strings" "strings"
"github.com/zeromicro/go-zero/core/stores/sqlx"
) )
var _ FsProductModel3dLightModel = (*customFsProductModel3dLightModel)(nil) var _ FsProductModel3dLightModel = (*customFsProductModel3dLightModel)(nil)

View File

@ -1,6 +1,6 @@
// Code generated by goctl. DO NOT EDIT. // Code generated by goctl. DO NOT EDIT.
package model package gmodel
import ( import (
"context" "context"

View File

@ -1,10 +1,11 @@
package model package gmodel
import ( import (
"context" "context"
"fmt" "fmt"
"github.com/zeromicro/go-zero/core/stores/sqlx"
"strings" "strings"
"github.com/zeromicro/go-zero/core/stores/sqlx"
) )
var _ FsProductModel3dModel = (*customFsProductModel3dModel)(nil) var _ FsProductModel3dModel = (*customFsProductModel3dModel)(nil)

View File

@ -1,6 +1,6 @@
// Code generated by goctl. DO NOT EDIT. // Code generated by goctl. DO NOT EDIT.
package model package gmodel
import ( import (
"context" "context"

View File

@ -1,6 +1,6 @@
// Code generated by goctl. DO NOT EDIT. // Code generated by goctl. DO NOT EDIT.
package model package gmodel
import ( import (
"context" "context"

View File

@ -1,11 +1,12 @@
package model package gmodel
import ( import (
"context" "context"
"fmt" "fmt"
"strings"
"github.com/zeromicro/go-zero/core/stores/sqlc" "github.com/zeromicro/go-zero/core/stores/sqlc"
"github.com/zeromicro/go-zero/core/stores/sqlx" "github.com/zeromicro/go-zero/core/stores/sqlx"
"strings"
) )
var _ FsProductPriceModel = (*customFsProductPriceModel)(nil) var _ FsProductPriceModel = (*customFsProductPriceModel)(nil)

View File

@ -1,6 +1,6 @@
// Code generated by goctl. DO NOT EDIT. // Code generated by goctl. DO NOT EDIT.
package model package gmodel
import ( import (
"context" "context"

View File

@ -1,10 +1,11 @@
package model package gmodel
import ( import (
"context" "context"
"fmt" "fmt"
"github.com/zeromicro/go-zero/core/stores/sqlx"
"strings" "strings"
"github.com/zeromicro/go-zero/core/stores/sqlx"
) )
var _ FsProductSizeModel = (*customFsProductSizeModel)(nil) var _ FsProductSizeModel = (*customFsProductSizeModel)(nil)

View File

@ -1,6 +1,6 @@
// Code generated by goctl. DO NOT EDIT. // Code generated by goctl. DO NOT EDIT.
package model package gmodel
import ( import (
"context" "context"

View File

@ -1,8 +1,9 @@
package model package gmodel
import ( import (
"context" "context"
"fmt" "fmt"
"github.com/zeromicro/go-zero/core/stores/sqlx" "github.com/zeromicro/go-zero/core/stores/sqlx"
) )

View File

@ -1,6 +1,6 @@
// Code generated by goctl. DO NOT EDIT. // Code generated by goctl. DO NOT EDIT.
package model package gmodel
import ( import (
"context" "context"

View File

@ -1,10 +1,11 @@
package model package gmodel
import ( import (
"context" "context"
"fmt" "fmt"
"github.com/zeromicro/go-zero/core/stores/sqlx"
"strings" "strings"
"github.com/zeromicro/go-zero/core/stores/sqlx"
) )
var _ FsProductTemplateV2Model = (*customFsProductTemplateV2Model)(nil) var _ FsProductTemplateV2Model = (*customFsProductTemplateV2Model)(nil)

View File

@ -1,6 +1,6 @@
// Code generated by goctl. DO NOT EDIT. // Code generated by goctl. DO NOT EDIT.
package model package gmodel
import ( import (
"context" "context"

View File

@ -1,8 +1,9 @@
package model package gmodel
import ( import (
"context" "context"
"fmt" "fmt"
"github.com/zeromicro/go-zero/core/stores/sqlx" "github.com/zeromicro/go-zero/core/stores/sqlx"
) )

View File

@ -1,6 +1,6 @@
// Code generated by goctl. DO NOT EDIT. // Code generated by goctl. DO NOT EDIT.
package model package gmodel
import ( import (
"context" "context"

View File

@ -1,8 +1,9 @@
package model package gmodel
import ( import (
"context" "context"
"fmt" "fmt"
"github.com/zeromicro/go-zero/core/stores/sqlx" "github.com/zeromicro/go-zero/core/stores/sqlx"
) )

View File

@ -1,6 +1,6 @@
// Code generated by goctl. DO NOT EDIT. // Code generated by goctl. DO NOT EDIT.
package model package gmodel
import ( import (
"context" "context"

View File

@ -1,10 +1,11 @@
package model package gmodel
import ( import (
"context" "context"
"fmt" "fmt"
"github.com/zeromicro/go-zero/core/stores/sqlx"
"strings" "strings"
"github.com/zeromicro/go-zero/core/stores/sqlx"
) )
var _ FsTagsModel = (*customFsTagsModel)(nil) var _ FsTagsModel = (*customFsTagsModel)(nil)

View File

@ -1,6 +1,6 @@
// Code generated by goctl. DO NOT EDIT. // Code generated by goctl. DO NOT EDIT.
package model package gmodel
import ( import (
"context" "context"

View File

@ -1,4 +1,4 @@
package model package gmodel
import ( import (
"context" "context"

View File

@ -1,6 +1,6 @@
// Code generated by goctl. DO NOT EDIT. // Code generated by goctl. DO NOT EDIT.
package model package gmodel
import ( import (
"context" "context"

View File

@ -3,6 +3,7 @@ package gmodel
import ( import (
"context" "context"
"errors" "errors"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@ -3,9 +3,10 @@ package gmodel
import ( import (
"context" "context"
"fusenapi/utils/auth" "fusenapi/utils/auth"
"time"
"github.com/zeromicro/go-zero/core/logx" "github.com/zeromicro/go-zero/core/logx"
"gorm.io/gorm" "gorm.io/gorm"
"time"
) )
func (m *FsGuestModel) GenerateGuestID(ctx context.Context, AccessSecret *string) (authKey string, err error) { func (m *FsGuestModel) GenerateGuestID(ctx context.Context, AccessSecret *string) (authKey string, err error) {

View File

@ -3,6 +3,7 @@ package gmodel
import ( import (
"context" "context"
"errors" "errors"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@ -3,6 +3,7 @@ package gmodel
import ( import (
"context" "context"
"errors" "errors"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@ -3,6 +3,7 @@ package gmodel
import ( import (
"context" "context"
"errors" "errors"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@ -3,6 +3,7 @@ package gmodel
import ( import (
"context" "context"
"errors" "errors"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@ -3,6 +3,7 @@ package gmodel
import ( import (
"context" "context"
"errors" "errors"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@ -1,4 +1,4 @@
package model package gmodel
import ( import (
"gorm.io/gorm" "gorm.io/gorm"

View File

@ -1,2 +1,3 @@
package model package gmodel
// TODO: 使用model的属性做你想做的
// TODO: 使用model的属性做你想做的

View File

@ -1,4 +1,4 @@
package model package gmodel
import ( import (
"gorm.io/gorm" "gorm.io/gorm"

View File

@ -1,2 +1,3 @@
package model package gmodel
// TODO: 使用model的属性做你想做的
// TODO: 使用model的属性做你想做的

View File

@ -1,4 +1,4 @@
package model package gmodel
import ( import (
"gorm.io/gorm" "gorm.io/gorm"

View File

@ -1,2 +1,3 @@
package model package gmodel
// TODO: 使用model的属性做你想做的
// TODO: 使用model的属性做你想做的

View File

@ -1,4 +1,4 @@
package model package gmodel
import ( import (
"gorm.io/gorm" "gorm.io/gorm"

View File

@ -1,2 +1,3 @@
package model package gmodel
// TODO: 使用model的属性做你想做的
// TODO: 使用model的属性做你想做的

View File

@ -1,4 +1,4 @@
package model package gmodel
import ( import (
"gorm.io/gorm" "gorm.io/gorm"

View File

@ -1,2 +1,3 @@
package model package gmodel
// TODO: 使用model的属性做你想做的
// TODO: 使用model的属性做你想做的

View File

@ -1,4 +1,4 @@
package model package gmodel
import ( import (
"gorm.io/gorm" "gorm.io/gorm"

View File

@ -1,2 +1,3 @@
package model package gmodel
// TODO: 使用model的属性做你想做的
// TODO: 使用model的属性做你想做的

View File

@ -1,4 +1,4 @@
package model package gmodel
import ( import (
"gorm.io/gorm" "gorm.io/gorm"

View File

@ -1,2 +1,3 @@
package model package gmodel
// TODO: 使用model的属性做你想做的
// TODO: 使用model的属性做你想做的

View File

@ -1,4 +1,4 @@
package model package gmodel
import ( import (
"gorm.io/gorm" "gorm.io/gorm"

View File

@ -1,4 +1,4 @@
package model package gmodel
import ( import (
"gorm.io/gorm" "gorm.io/gorm"

View File

@ -1,2 +1,3 @@
package model package gmodel
// TODO: 使用model的属性做你想做的
// TODO: 使用model的属性做你想做的

View File

@ -1,2 +1,3 @@
package model package gmodel
// TODO: 使用model的属性做你想做的
// TODO: 使用model的属性做你想做的

View File

@ -1,8 +1,9 @@
package model package gmodel
import ( import (
"gorm.io/gorm"
"time" "time"
"gorm.io/gorm"
) )
// fs_cart 购物车 // fs_cart 购物车

View File

@ -1,2 +1,3 @@
package model package gmodel
// TODO: 使用model的属性做你想做的
// TODO: 使用model的属性做你想做的

View File

@ -1,4 +1,4 @@
package model package gmodel
import ( import (
"gorm.io/gorm" "gorm.io/gorm"

View File

@ -1,2 +1,3 @@
package model package gmodel
// TODO: 使用model的属性做你想做的
// TODO: 使用model的属性做你想做的

View File

@ -1,4 +1,4 @@
package model package gmodel
import ( import (
"gorm.io/gorm" "gorm.io/gorm"

View File

@ -1,2 +1,3 @@
package model package gmodel
// TODO: 使用model的属性做你想做的
// TODO: 使用model的属性做你想做的

View File

@ -1,4 +1,4 @@
package model package gmodel
import ( import (
"gorm.io/gorm" "gorm.io/gorm"

View File

@ -1,2 +1,3 @@
package model package gmodel
// TODO: 使用model的属性做你想做的
// TODO: 使用model的属性做你想做的

View File

@ -1,4 +1,4 @@
package model package gmodel
import ( import (
"gorm.io/gorm" "gorm.io/gorm"

View File

@ -1,2 +1,3 @@
package model package gmodel
// TODO: 使用model的属性做你想做的
// TODO: 使用model的属性做你想做的

View File

@ -1,4 +1,4 @@
package model package gmodel
import ( import (
"gorm.io/gorm" "gorm.io/gorm"

View File

@ -1,2 +1,3 @@
package model package gmodel
// TODO: 使用model的属性做你想做的
// TODO: 使用model的属性做你想做的

View File

@ -1,4 +1,4 @@
package model package gmodel
import ( import (
"gorm.io/gorm" "gorm.io/gorm"

View File

@ -1,2 +1,3 @@
package model package gmodel
// TODO: 使用model的属性做你想做的
// TODO: 使用model的属性做你想做的

View File

@ -1,4 +1,4 @@
package model package gmodel
import ( import (
"gorm.io/gorm" "gorm.io/gorm"

View File

@ -1,2 +1,3 @@
package model package gmodel
// TODO: 使用model的属性做你想做的
// TODO: 使用model的属性做你想做的

View File

@ -1,4 +1,4 @@
package model package gmodel
import ( import (
"gorm.io/gorm" "gorm.io/gorm"

View File

@ -1,2 +1,3 @@
package model package gmodel
// TODO: 使用model的属性做你想做的
// TODO: 使用model的属性做你想做的

View File

@ -1,4 +1,4 @@
package model package gmodel
import ( import (
"gorm.io/gorm" "gorm.io/gorm"

View File

@ -1,2 +1,3 @@
package model package gmodel
// TODO: 使用model的属性做你想做的
// TODO: 使用model的属性做你想做的

View File

@ -1,4 +1,4 @@
package model package gmodel
import ( import (
"gorm.io/gorm" "gorm.io/gorm"

View File

@ -1,2 +1,3 @@
package model package gmodel
// TODO: 使用model的属性做你想做的
// TODO: 使用model的属性做你想做的

View File

@ -1,4 +1,4 @@
package model package gmodel
import ( import (
"gorm.io/gorm" "gorm.io/gorm"

View File

@ -1,2 +1,3 @@
package model package gmodel
// TODO: 使用model的属性做你想做的
// TODO: 使用model的属性做你想做的

Some files were not shown because too many files have changed in this diff Show More