Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Article ¶
type Article struct { Id int Title string `orm:"unique"` Subtitle string `orm:"null"` Author string // Tags [5]string Text string `orm:"-"` Createtime int64 Status bool }
func ListArticleByPage ¶
NOTICE : I originally set the type of "articles" as "*[]*Article" ,which is also accepted by the orm function ,HOWEVER,error about reflect occurs, so I change the type to "[]*Article", and then everything works just fine
type Pagination ¶
func (*Pagination) Set ¶
func (p *Pagination) Set(pageIndex, numPerPage, pagenum int64)
Alright,I admit,it's NOT very good to write a function containing specific url in "models"
Click to show internal directories.
Click to hide internal directories.