models

package
v0.0.0-...-f1f66e6 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2014 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TableName

func TableName(str string) string

返回带前缀的表名

Types

type Book

type Book struct {
	Id          int64
	Bookcode    string    `orm:"size(20)"`
	Bookname    string    `orm:"unique;size(100)"`
	Borrowby    string    `orm:"size(12)"`
	Borrowtime  time.Time `orm:"auto_now_add;type(datetime)"`
	Status      int8
	Borrowcount int64
	Booktype    string `orm:"size(45)"`
}

用户表模型

func (*Book) Delete

func (m *Book) Delete() error

func (*Book) Insert

func (m *Book) Insert() error

func (*Book) Query

func (m *Book) Query() orm.QuerySeter

func (*Book) Read

func (m *Book) Read(fields ...string) error

func (*Book) TableName

func (m *Book) TableName() string

func (*Book) Update

func (m *Book) Update(fields ...string) error

type BookBorrowLog

type BookBorrowLog struct {
	Id         int64
	Bookid     int64
	Borrowby   string    `orm:"size(20)"`
	Borrowtime time.Time `orm:"auto_now_add;type(datetime)"`
}

用户表模型

func (*BookBorrowLog) Delete

func (m *BookBorrowLog) Delete() error

func (*BookBorrowLog) Insert

func (m *BookBorrowLog) Insert() error

func (*BookBorrowLog) Query

func (m *BookBorrowLog) Query() orm.QuerySeter

func (*BookBorrowLog) Read

func (m *BookBorrowLog) Read(fields ...string) error

func (*BookBorrowLog) TableName

func (m *BookBorrowLog) TableName() string

func (*BookBorrowLog) Update

func (m *BookBorrowLog) Update(fields ...string) error

type User

type User struct {
	Id       int64
	Username string    `orm:"size(20)"`
	Password string    `orm:"unique;size(100)"`
	Userrole string    `orm:"size(40)"`
	Regtime  time.Time `orm:"auto_now_add;type(datetime)"`
}

用户表模型

func (*User) Delete

func (m *User) Delete() error

func (*User) Insert

func (m *User) Insert() error

func (*User) Query

func (m *User) Query() orm.QuerySeter

func (*User) Read

func (m *User) Read(fields ...string) error

func (*User) TableName

func (m *User) TableName() string

func (*User) Update

func (m *User) Update(fields ...string) error

Jump to

Keyboard shortcuts

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