entity

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 7, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Column

type Column struct {
	Table         string `db:"TABLE_NAME"`
	Name          string `db:"COLUMN_NAME"`
	Type          string `db:"COLUMN_TYPE"`
	DataType      string `db:"COLUMN_DATA_TYPE"`
	ColumnKey     string `db:"COLUMN_KEY"`
	Comment       string `db:"COLUMN_COMMENT"`
	Default       string `db:"COLUMN_DEFAULT"`
	AutoIncrement int    `db:"AUTO_INCREMENT" `
	NotNull       int    `db:"NOT_NULL"`
	OrmTag        string
}

type Entity

type Entity struct {
	PKG                 string
	Name                string
	FileName            string
	Comment             bool
	Table               *Table
	Fields              []*Field
	DefaultFields       []*Field
	NoDefaultFields     []*Field
	HaveId              bool
	Ids                 []*Field
	ImportTime          bool
	ImportSql           bool
	Orm                 bool
	IntId               bool
	IdCount             int
	AutoIncrement       bool
	HaveField           bool
	OrmIndexDefinitions []string
}

type Field

type Field struct {
	Name             string
	Type             string
	OpName           string
	OpVar            string
	Comment          bool
	ColumnAnnotation bool
	ColumnDefinition string
	JSONTag          bool
	JSONTagName      string
	Column           *Column
	HaveDefault      bool
	IgnoreDefault    bool
	Default          string
	Orm              bool
}

type Index

type Index struct {
	Table  string `db:"TABLE_NAME"`
	Name   string `db:"INDEX_NAME"`
	Unique int    `db:"INDEX_UNIQUE"`
	Column string `db:"INDEX_COLUMN"`
}

type Mapper

type Mapper struct {
	PKG      string
	Name     string
	VarName  string
	FileName string
	Batis    string
	Entity   *Entity
}

type Table

type Table struct {
	Name    string `db:"TABLE_NAME"`
	Comment string `db:"TABLE_COMMENT"`
	Columns []*Column
	Indexes []*Index
}

Jump to

Keyboard shortcuts

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