Documentation ¶
Index ¶
- type ArticleModel
- func GetArticlesByPage(db *gorm.DB, page, numPerPage int64) ([]*ArticleModel, error)
- func GetArticlesByPage2(db *gorm.DB, page, numPerPage int64) ([]*ArticleModel, error)
- func GetArticlesByPage3(db *gorm.DB, lastId, numPerPage int64) ([]*ArticleModel, error)
- func GetArticlesByUserIDAndPage(db *gorm.DB, userID string, page, numPerPage int64) ([]*ArticleModel, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArticleModel ¶
type ArticleModel struct { ID int64 `gorm:"column:id"` ArticleID string `gorm:"column:article_id"` UserID string `gorm:"column:user_id"` Title string `gorm:"column:title"` Content string `gorm:"column:content"` Tags string `gorm:"column:tags"` CreateTime time.Time `gorm:"column:create_time;-"` UpdateTime time.Time `gorm:"column:update_time;-"` IsDelete uint8 `gorm:"column:is_delete"` }
func GetArticlesByPage ¶
func GetArticlesByPage(db *gorm.DB, page, numPerPage int64) ([]*ArticleModel, error)
func GetArticlesByPage2 ¶
func GetArticlesByPage2(db *gorm.DB, page, numPerPage int64) ([]*ArticleModel, error)
func GetArticlesByPage3 ¶
func GetArticlesByPage3(db *gorm.DB, lastId, numPerPage int64) ([]*ArticleModel, error)
func GetArticlesByUserIDAndPage ¶
func GetArticlesByUserIDAndPage(db *gorm.DB, userID string, page, numPerPage int64) ([]*ArticleModel, error)
page从0开始
func (ArticleModel) TableName ¶
func (u ArticleModel) TableName() string
Click to show internal directories.
Click to hide internal directories.