model

package
v0.0.0-...-04961f1 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = sqlx.ErrNotFound

Functions

This section is empty.

Types

type LikeCount

type LikeCount struct {
	Id         uint64    `db:"id"`          // 主键ID
	BizId      string    `db:"biz_id"`      // 业务ID
	ObjId      uint64    `db:"obj_id"`      // 点赞对象id
	LikeNum    int64     `db:"like_num"`    // 点赞数
	DislikeNum int64     `db:"dislike_num"` // 点踩数
	CreateTime time.Time `db:"create_time"` // 创建时间
	UpdateTime time.Time `db:"update_time"` // 最后修改时间
}

type LikeCountModel

type LikeCountModel interface {
	// contains filtered or unexported methods
}

LikeCountModel is an interface to be customized, add more methods here, and implement the added methods in customLikeCountModel.

func NewLikeCountModel

func NewLikeCountModel(conn sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) LikeCountModel

NewLikeCountModel returns a model for the database table.

type LikeRecord

type LikeRecord struct {
	Id         uint64    `db:"id"`          // 主键ID
	BizId      string    `db:"biz_id"`      // 业务ID
	ObjId      uint64    `db:"obj_id"`      // 点赞对象id
	UserId     uint64    `db:"user_id"`     // 用户ID
	LikeType   int64     `db:"like_type"`   // 类型 0:点赞 1:点踩
	CreateTime time.Time `db:"create_time"` // 创建时间
	UpdateTime time.Time `db:"update_time"` // 最后修改时间
}

type LikeRecordModel

type LikeRecordModel interface {
	// contains filtered or unexported methods
}

LikeRecordModel is an interface to be customized, add more methods here, and implement the added methods in customLikeRecordModel.

func NewLikeRecordModel

func NewLikeRecordModel(conn sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) LikeRecordModel

NewLikeRecordModel returns a model for the database table.

Jump to

Keyboard shortcuts

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