mirror of
https://gitee.com/johng/gf.git
synced 2024-12-02 20:28:17 +08:00
gofmt
This commit is contained in:
parent
4facdd5c9e
commit
a5a88222a6
@ -1,3 +1,3 @@
|
||||
package article
|
||||
|
||||
// Fill with you ideas below.
|
||||
// Fill with you ideas below.
|
||||
|
@ -12,19 +12,19 @@ import (
|
||||
|
||||
// Entity is the golang structure for table gf_article.
|
||||
type Entity struct {
|
||||
Id int `orm:"id,primary" json:"id"` //
|
||||
CatId int `orm:"cat_id" json:"cat_id"` // 分类ID
|
||||
Uid int `orm:"uid" json:"uid"` // 用户ID
|
||||
Title string `orm:"title" json:"title"` // 标题
|
||||
Content string `orm:"content" json:"content"` // 内容
|
||||
Order int `orm:"order" json:"order"` // 排序
|
||||
Brief string `orm:"brief" json:"brief"` // 摘要
|
||||
Thumb string `orm:"thumb" json:"thumb"` // 缩略图
|
||||
Tags string `orm:"tags" json:"tags"` // 标签
|
||||
Referer string `orm:"referer" json:"referer"` // 内容来源
|
||||
Status int `orm:"status" json:"status"` // 状态\n0: 禁用\n1: 正常
|
||||
CreateTime *gtime.Time `orm:"create_time" json:"create_time"` // 创建时间
|
||||
UpdateTime *gtime.Time `orm:"update_time" json:"update_time"` // 修改时间
|
||||
Id int `orm:"id,primary" json:"id"` //
|
||||
CatId int `orm:"cat_id" json:"cat_id"` // 分类ID
|
||||
Uid int `orm:"uid" json:"uid"` // 用户ID
|
||||
Title string `orm:"title" json:"title"` // 标题
|
||||
Content string `orm:"content" json:"content"` // 内容
|
||||
Order int `orm:"order" json:"order"` // 排序
|
||||
Brief string `orm:"brief" json:"brief"` // 摘要
|
||||
Thumb string `orm:"thumb" json:"thumb"` // 缩略图
|
||||
Tags string `orm:"tags" json:"tags"` // 标签
|
||||
Referer string `orm:"referer" json:"referer"` // 内容来源
|
||||
Status int `orm:"status" json:"status"` // 状态\n0: 禁用\n1: 正常
|
||||
CreateTime *gtime.Time `orm:"create_time" json:"create_time"` // 创建时间
|
||||
UpdateTime *gtime.Time `orm:"update_time" json:"update_time"` // 修改时间
|
||||
}
|
||||
|
||||
// Article is alias of Entity, which some developers say they just want.
|
||||
@ -65,4 +65,4 @@ func (r *Entity) Update() (result sql.Result, err error) {
|
||||
// Delete does "DELETE FROM...WHERE..." statement for deleting current object from table.
|
||||
func (r *Entity) Delete() (result sql.Result, err error) {
|
||||
return Model.Where(gdb.GetWhereConditionOfStruct(r)).Delete()
|
||||
}
|
||||
}
|
||||
|
@ -325,4 +325,4 @@ func (m *arModel) Chunk(limit int, callback func(entities []*Entity, err error)
|
||||
}
|
||||
return callback(entities, err)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user