data

package
v0.0.0-...-f12ea2b Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: Unlicense Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RatingStringKey = "rat"
)
View Source
const (
	RedisDefaultExpire = 8 * time.Hour
)

Variables

ProviderSet is data providers.

View Source
var Tables = []any{
	new(Rating),
}

Functions

func NewRatingRepo

func NewRatingRepo(data *Data, logger log.Logger) biz.RatingRepo

NewRatingRepo .

Types

type Data

type Data struct {
	// contains filtered or unexported fields
}

Data .

func NewData

func NewData(c *conf.Bootstrap, logger log.Logger) (data *Data, closer func(), err error)

NewData .

func (*Data) PushMsg

func (d *Data) PushMsg(key string, msg []byte) (err error)

PushMsg push a message.

type Rating

type Rating struct {
	RecordID   uint64 `gorm:"primaryKey"`
	RecordType uint64 `gorm:"primaryKey;comment:'评论类型1电影2电视剧'"`
	UserID     uint64 `gorm:"primaryKey;comment:'用户ID'"`
	Value      uint32 `gorm:"not null;comment:'评分'"`
}

Rating defines the movie rating.

Jump to

Keyboard shortcuts

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