product

package
v0.0.0-...-82e7740 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

generated by xgen -- DO NOT EDIT

generated by xgen -- DO NOT EDIT

generated by xgen -- DO NOT EDIT

generated by xgen -- DO NOT EDIT

Index

Constants

This section is empty.

Variables

View Source
var (
	ENTITY           = schema.TABLE("eg_product", "产品信息")
	ENTITY_ID        = ENTITY.PRIMARY("id", "标识")
	ENTITY_MEMO      = ENTITY.COLUMN("memo", "备注")
	ENTITY_CREATES   = ENTITY.COLUMN("creates", "创建机构")
	ENTITY_CREATER   = ENTITY.CREATER("creater", "创建人员")
	ENTITY_CREATED   = ENTITY.CREATED("created", "创建时间")
	ENTITY_MODIFIER  = ENTITY.MODIFIER("modifier", "更新人员")
	ENTITY_MODIFIED  = ENTITY.MODIFIED("modified", "更新时间")
	ENTITY_VERSION   = ENTITY.VERSION("version", "乐观锁")
	ENTITY_DELETION  = ENTITY.DELETION("deletion", "删除标志")
	ENTITY_ARTIFICAL = ENTITY.COLUMN("artifical", "人造数据")
	ENTITY_HISTORY   = ENTITY.COLUMN("history", "历史数据")
	ENTITY_NAME      = ENTITY.COLUMN("name", "名称")
	ENTITY_NUM       = ENTITY.COLUMN("num", "库存数")
	ENTITY_PRICE     = ENTITY.COLUMN("price", "价格")
)
View Source
var Mgr = &Manager{
	Manager: service.Manager{
		Entity: func() entity.Interface {
			return NewEntity()
		},
		Entities: func() entity.Interfaces {
			return NewEntities(10)
		},
	},
}

Functions

func SetPriority

func SetPriority(value int)

Types

type Controller

type Controller struct {
	controller.JSONController
}

type Entities

type Entities struct {
	// contains filtered or unexported fields
}

func NewEntities

func NewEntities(v int) *Entities

func (*Entities) Append

func (me *Entities) Append(v entity.Interface)

func (*Entities) Cap

func (me *Entities) Cap() int

func (*Entities) Index

func (me *Entities) Index(v int) entity.Interface

func (*Entities) JSON

func (me *Entities) JSON() string

func (*Entities) Len

func (me *Entities) Len() int

func (*Entities) Make

func (me *Entities) Make(cap int)

func (*Entities) New

func (me *Entities) New() entity.Interface

func (*Entities) Slice

func (me *Entities) Slice() interface{}

func (*Entities) Value

func (me *Entities) Value(v int) *Entity

func (*Entities) Values

func (me *Entities) Values() []*Entity

type Entity

type Entity struct {
	entity.Sys
	// contains filtered or unexported fields
}

产品信息实体结构. @entity(module:"product" project:"example")

func NewEntity

func NewEntity() *Entity

func (*Entity) Column

func (me *Entity) Column(field string) (schema.Column, bool)

func (*Entity) Columns

func (me *Entity) Columns() []schema.Column

func (*Entity) ExcelColumns

func (me *Entity) ExcelColumns() []string

func (*Entity) Get

func (me *Entity) Get(column string) interface{}

func (*Entity) GetPtr

func (me *Entity) GetPtr(column string) interface{}

func (*Entity) GetString

func (me *Entity) GetString(field string) string

func (*Entity) JSON

func (me *Entity) JSON() string

func (*Entity) Name

func (me *Entity) Name() string

func (*Entity) Names

func (me *Entity) Names() []string

func (Entity) New

func (me Entity) New() entity.Interface

func (*Entity) Num

func (me *Entity) Num() int

func (*Entity) Price

func (me *Entity) Price() float64

func (*Entity) SetName

func (me *Entity) SetName(v string)

func (*Entity) SetNum

func (me *Entity) SetNum(v int)

func (*Entity) SetPrice

func (me *Entity) SetPrice(v float64)

func (*Entity) SetString

func (me *Entity) SetString(field, value string) error

func (*Entity) Table

func (me *Entity) Table() schema.Table

func (*Entity) Type

func (me *Entity) Type(column string) (entity.Type, bool)

func (*Entity) Validate

func (me *Entity) Validate() error

func (*Entity) Value

func (me *Entity) Value() *Entity

type Manager

type Manager struct {
	service.Manager
}

Jump to

Keyboard shortcuts

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