Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCollectionCount ¶
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;" json:"userId"` // 用户ID
ArticleId uint64 `gorm:"column:article_id;type:bigint unsigned;not null;" json:"articleId"` // 文章ID
Status int8 `gorm:"column:status;type:tinyint;not null;default:0;" json:"status"` // 有效收藏 1 无效收藏 0
CreatedAt time.Time `gorm:"column:created_at;index;autoCreateTime;<-:create;" json:"createdAt"` //
UpdatedAt time.Time `gorm:"column:updated_at;autoUpdateTime;" json:"updatedAt"`
}
Click to show internal directories.
Click to hide internal directories.