model

package
v0.0.0-...-9d05754 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

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