cmd

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "dev"

Version is set via -ldflags at build time.

Functions

func Execute

func Execute()

Execute 执行根命令

Types

type ColumnInfo

type ColumnInfo struct {
	Name          string
	GoField       string
	GoType        string
	Type          string
	Comment       string
	Pk            bool
	NotNull       bool
	IsQuery       bool
	IsEdit        bool // Is editable field
	IsNil         bool // Allow null values
	IsValid       bool // Need validation
	IsZero        bool // Can be zero value
	QueryType     string
	JsonField     string
	ColumnDefault sql.NullString

	// Template aliases for compatibility
	ColumnName    string // Alias for Name
	ColumnComment string // Alias for Comment
}

type TableInfo

type TableInfo struct {
	ProjectName  string // Dynamic project name from go.mod
	PackageName  string
	ModuleName   string // Sub-module name (empty when PackageName == table name, to avoid double path)
	ClassName    string
	TableName    string
	ConfDbName   string
	TBName       string
	TableComment string
	PkGoField    string // Primary key Go field name
	PkType       string // Primary key Go type
	ApiRoot      string // API root path prefix (e.g., /v1)
	RoutePrefix  string // Full route prefix for swagger/vue (e.g., "/v1/articles" or "/v1/blog/articles")
	Columns      []ColumnInfo
}

Jump to

Keyboard shortcuts

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