example

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AstPrint

func AstPrint()

AstPrint /*

func OpenAstFile

func OpenAstFile(path string) (*ast.File, string)

func PrintAst

func PrintAst(path string)

func SwitchImportFilePath

func SwitchImportFilePath(f *ast.File, expr *ast.SelectorExpr) string

func TraversalAstDir

func TraversalAstDir(typeName, path, traversalFile string) string

func TraversalAstFile

func TraversalAstFile(path string) []*ast.Field

Types

type A

type A func()

type Account

type Account struct {
	tmp.TimestampDeep
	TimestampAt
	AccountID
	Name     string `db:"f_name,size=50,default=''" json:"name"`
	Password string `db:"f_password"`
	UserID   uint64 `db:"f_userID"`
	Nickname string `db:"f_nick_name,size=90,default=''"`
}

Account 账户 @def primary f_id @def unique_index i_userID f_userID @def index i_name f_name @def unique_index i_userID_name f_userID f_name

func (Account) AutoFieldKeys

func (Account) AutoFieldKeys() map[string]bool

func (Account) FieldCreatedTimeKey

func (Account) FieldCreatedTimeKey() string

func (Account) FieldDeepKey

func (Account) FieldDeepKey() string

func (Account) FieldDeleteTimeKey

func (Account) FieldDeleteTimeKey() string

func (Account) FieldIdKey

func (Account) FieldIdKey() string

func (Account) FieldKeys

func (Account) FieldKeys() []string

func (Account) FieldNameKey

func (Account) FieldNameKey() string

func (Account) FieldNickNameKey

func (Account) FieldNickNameKey() string

func (Account) FieldPasswordKey

func (Account) FieldPasswordKey() string

func (Account) FieldUpdatedTimeKey

func (Account) FieldUpdatedTimeKey() string

func (Account) FieldUserIDKey

func (Account) FieldUserIDKey() string

func (Account) IndexNameKey

func (Account) IndexNameKey() string

func (Account) IndexNameValue

func (Account) IndexNameValue() string

func (Account) Migrate

func (Account) Migrate(db *sqlx.DB) sql.Result

func (Account) PrimaryKeys

func (Account) PrimaryKeys() []string

func (Account) Schema

func (Account) Schema() string

func (Account) TableName

func (Account) TableName() string

func (Account) UniqueIndexUserIDKey

func (Account) UniqueIndexUserIDKey() string

func (Account) UniqueIndexUserIDNameKey

func (Account) UniqueIndexUserIDNameKey() string

func (Account) UniqueIndexUserIDNameValue

func (Account) UniqueIndexUserIDNameValue() string

func (Account) UniqueIndexUserIDValue

func (Account) UniqueIndexUserIDValue() string

type AccountID

type AccountID struct {
	ID uint64 `db:"f_id,autoincrement"`
}

type TimestampAt

type TimestampAt struct {
	CreatedTime uint64 `db:"created_time,default='0'"`
	UpdatedTime uint64 `db:"updated_time,default='0'"`
	DeleteTime  uint64 `db:"delete_time,default='0'"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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