generateCode

package
v0.0.0-...-4a0e227 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(table Table) error

func ToCamelCase

func ToCamelCase(snake string) string

将字段名称转换为驼峰式

Types

type Field

type Field struct {
	Name     string
	Type     string
	Nullable bool
	GormTag  string // GORM 标签
	Validate string // 验证标签
	JsonTag  string // JSON 标签
}

type Table

type Table struct {
	Name   string
	Fields []Field
}

Jump to

Keyboard shortcuts

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