lib

package
v0.0.0-...-ee07ed5 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MissFieldMap = map[string]bool{
	"ID_":       true,
	"DeletedAt": true,
}

MissFieldMap 忽略的fields

View Source
var StubDBName string

StubDBName stubDBName

Functions

func Lcfirst

func Lcfirst(str string) string

Lcfirst 首字母小写

Types

type Field

type Field struct {
	CommentGorm string `json:"comment_gorm"`
	JsonName    string `json:"json_name"`
	Name        string `json:"name"`
	Type        string `json:"type"`
}

func ParseFields

func ParseFields(filePath string) (string, []Field)

ParseFields go run . -f .\proto\src.go

type IndexItem

type IndexItem struct {
	Title     string `json:"title"`
	DataIndex string `json:"dataIndex"`
	ValueType string `json:"valueType"`
}

type Model

type Model struct {
	TableName          string
	StructName         string
	StructNamePlural   string
	VariableName       string
	VariableNamePlural string
	PackageName        string
	DBName             string
	CustomCode         []string
	IndexItems         []IndexItem
}

func MakeModelFromString

func MakeModelFromString(path string) *Model

MakeModelFromString 格式化用户输入的内容

Jump to

Keyboard shortcuts

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