templates

package
v1.0.0-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field struct {
	// Struct property name
	GoName string
	// Struct property path
	GoPath     string
	ColumnName string

	Type types.Type

	CustomMarshaler   string
	CustomUnmarshaler string

	IsBinary          bool
	IsTextMarshaler   bool
	IsTextUnmarshaler bool
	Size              int
	Index             int
}

type Model

type Model struct {
	// Go struct name
	GoName string
	// Sql table name
	TableName string
	// Primary key
	PK *PK
	// Sql columns
	Fields []*Field
	// Is model implement `Tabler` interface
	HasTableName bool
	// Is model implement `Columner` interface
	HasColumn bool
}

func (Model) HasNotOnlyPK

func (m Model) HasNotOnlyPK() bool

type ModelTmplParams

type ModelTmplParams struct {
	// Models
	Models []*Model
}

type PK

type PK struct {
	IsAutoIncr bool

	Field *Field
}

Jump to

Keyboard shortcuts

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