genCURD

package
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Entrypoint = pclient.NewTool(pclient.ToolOption{
	ToolName:       "genCURD",
	Use:            "curd",
	Aliases:        []string{"genCURD"},
	Short:          "基于数据库生成 CURD 代码",
	CacheKeyPrefix: cacheKeyPrefix,
	ParamList:      paramSettingList,
	Run:            Run,
})

Functions

func Run

func Run(values pclient.ParamMap) error

--------------------------------------------------

func StrFirstToLowerButID

func StrFirstToLowerButID(f string) string

Types

type RunOptions

type RunOptions struct {
	DSN     string
	WorkDir string
}

type Table

type Table struct {
	TblName     string
	ServiceName string
	ColList     []*colInfo
	PriCol      *colInfo // 暂时只支持单主键,符合主键后续扩展
	IdxList     []indexInfo

	// 生成代码需要的值
	HyphenName     string // 中横线[-]命名
	LowerCamelName string // 驼峰命名,首字母小写
	UpperCamelName string // 驼峰命名,首字母大写
}

func (*Table) String

func (t *Table) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL