articleLike

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: May 29, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveOrCreateById

func SaveOrCreateById(entity *Entity) int64

Types

type Entity

type Entity struct {
	Id     uint64 `gorm:"primaryKey;column:id;autoIncrement;not null;" json:"id"` // 主键
	UserId uint64 ``                                                              // 用户
	/* 154-byte string literal not displayed */
	ArticleId uint64 `` //
	/* 163-byte string literal not displayed */
	Status int `` // 点赞状态(1:有效点赞 0:取消点赞)
	/* 141-byte string literal not displayed */
	CreatedAt time.Time `gorm:"column:created_at;autoCreateTime;<-:create;" json:"createdAt"` //
	UpdatedAt time.Time `gorm:"column:updated_at;autoUpdateTime;index;" json:"updatedAt"`
}

func Get

func Get(id any) (entity Entity)

func GetByArticleId

func GetByArticleId(userId, articleId any) (entity Entity)

func (*Entity) TableName

func (itself *Entity) TableName() string

Jump to

Keyboard shortcuts

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