Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Base ¶
type Base struct { // Table name in database Table string // Fields definitions list Fields []field.Mapper }
Base model with table common properties and fields definitions
func (Base) GetPrimaryKey ¶
GetPrimaryKey returns this model primary key or nil if primary key not defined
type Field ¶
type Field struct { // Model mapper Model Mapper // field maper for associated model Field field.Mapper }
Field contains both mappers for model and field
type Mapper ¶
type Mapper interface { // GetModel base object GetModel() *Base }
Mapper interface to model properties
type OptionFunc ¶
type OptionFunc func(*Base)
OptionFunc function uses to configure model properties object
func OptFields ¶
func OptFields(fieldMappers ...field.Mapper) OptionFunc
OptFields list property configure
Click to show internal directories.
Click to hide internal directories.