models

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllModelStructures

func AllModelStructures() []interface{}

AllModelStructures get all model structures

Types

type ExampleModel

type ExampleModel struct {
	ID                          int       `xorm:"'id' Int pk autoincr" json:"id"`
	Name                        string    `xorm:"'Name' Varchar(64) index" json:"name"`
	UpdateTime                  time.Time `xorm:"'updateTime' DateTime index" json:"updateTime"`
	behaviors.ModifyingBehavior `xorm:"extends"`
	rdbms.Datasource            `xorm:"-" datasource:"default"`
}

ExampleModel model

func (*ExampleModel) Fetch

func (m *ExampleModel) Fetch() (bool, error)

Fetch retrieve one record by self condition

func (*ExampleModel) Save

func (m *ExampleModel) Save() (bool, error)

Save record to database

func (*ExampleModel) TableName

func (m *ExampleModel) TableName() string

TableName returns table name in database

Jump to

Keyboard shortcuts

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