entity

package
v1.0.19 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GormModelField

type GormModelField struct {
	Name        string
	Type        string
	Tag         string
	OpenApiType string

	MapFunc    *string
	MapApiFunc *string

	Parent *GormModelMetadata `json:"-"`
	// contains filtered or unexported fields
}

func (*GormModelField) GetGoType added in v1.0.17

func (f *GormModelField) GetGoType() string

Get the type for use in a Go type declaration

Example: github.com/shopspring/decimal.Decimal -> decimal.Decimal

func (*GormModelField) GetType

func (f *GormModelField) GetType() types.Type

func (*GormModelField) WithType

func (f *GormModelField) WithType(t types.Type, moduleName string)

type GormModelMetadata

type GormModelMetadata struct {
	Name     string
	Fields   []*GormModelField
	Embedded []*GormModelMetadata
	IsApi    bool
	// contains filtered or unexported fields
}

func (*GormModelMetadata) AllFields

func (m *GormModelMetadata) AllFields() []*GormModelField

func (*GormModelMetadata) GetField added in v1.0.5

func (m *GormModelMetadata) GetField(name string) *GormModelField

func (*GormModelMetadata) GetType added in v1.0.8

func (m *GormModelMetadata) GetType() types.Type

func (*GormModelMetadata) WithType added in v1.0.8

func (m *GormModelMetadata) WithType(t types.Type)

Jump to

Keyboard shortcuts

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