Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLikeReceivedCount ¶
func GetUserBookmarkedArticleIds ¶
GetUserBookmarkedArticleIds 获取用户收藏的文章ID列表
func SaveOrCreateById ¶
Types ¶
type Entity ¶
type Entity struct {
Id uint64 `gorm:"primaryKey;column:id;autoIncrement;not null;" json:"id"` // 主键
UserId uint64 `gorm:"column:user_id;type:bigint unsigned;not null;default:0;uniqueIndex:uniq_user_article_book,priority:1" json:"userId"` // 用户
ArticleId uint64 `` //
/* 127-byte string literal not displayed */
Status int `gorm:"column:status;type:int;not null;default:1;" json:"status"` // 收藏状态(1:有效点赞 0:取消点赞)
CreatedAt time.Time `gorm:"column:created_at;autoCreateTime;<-:create;" json:"createdAt"` //
UpdatedAt time.Time `gorm:"column:updated_at;autoUpdateTime;index;" json:"updatedAt"`
}
func GetByArticleId ¶
Click to show internal directories.
Click to hide internal directories.