MCPcopy Create free account
hub / github.com/TruthHun/BookStack / CreditLog

Struct CreditLog

models/credit.go:34–42  ·  view source on GitHub ↗

CreditLog 积分变更日志记录

Source from the content-addressed store, hash-verified

32
33// CreditLog 积分变更日志记录
34type CreditLog struct {
35 Id int
36 Uid int `orm:"index"` // 用户ID
37 Identify string `orm:"index;size(32)"` // 规则标识
38 Score int // 积分,有正有负数,负数表示被扣分,正数表示加分
39 RewardBy int // 被谁奖励的,0 表示为系统奖励的,如果 Uid == RewardBy,表示用户自己充值的(如果有这个功能的话),否则表示是管理员(需要是管理员身份)打赏的
40 Log string `orm:"size(512)"` // 日志内容
41 CreatedAt time.Time `orm:"auto_now"`
42}
43
44// InitCreditRule 如果还没存在积分规则,则初始化积分规则
45func InitCreditRule() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected