model

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TotalScore of up rating
	TotalScore = 600
	// LowerBoundScore ...
	LowerBoundScore = 240
)

Variables

Prizes list prize levels by priority

Ranks list all levels of rank

Functions

This section is empty.

Types

type Privilege

type Privilege struct{}

Privilege of rating

type Prize

type Prize struct {
	Level   PrizeLevel `json:"level"`
	Desc    string     `json:"desc"`
	Content string     `json:"content"`
}

Prize of rating

type PrizeLevel

type PrizeLevel int8

PrizeLevel of prize

const (
	PrizeLevelOne PrizeLevel = 10 * (1 + iota)
	PrizeLevelTwo
	PrizeLevelThree
	PrizeLevelFour
	PrizeLevelFive
)

Prize Level List

func (PrizeLevel) Prize

func (p PrizeLevel) Prize(arg ...interface{}) *Prize

Prize constructor

type Rank

type Rank struct {
	Level RankLevel `json:"level"`
	Desc  string    `json:"desc"`
}

Rank of rating

type RankLevel

type RankLevel int8

RankLevel of rank

const (
	RankLevelSuper RankLevel = 10 * (1 + iota)
	RankLevelStrong
	RankLevelStandout
	RankLevelNormal
	RankLevelNone
)

RankLevel list

func (RankLevel) Rank

func (r RankLevel) Rank() *Rank

Rank content of rankLevel

func (RankLevel) Score

func (r RankLevel) Score() int

Score of rankLevel

type Rating

type Rating struct {
	Score      *Score       `json:"score"`
	Rank       *Rank        `json:"rank"`
	Prize      *Prize       `json:"prize"`
	Privileges []*Privilege `json:"privileges"`
}

Rating of up

type Score

type Score struct {
	MID       int64     `json:"mid"`
	Magnetic  int       `json:"magnetic"`   // 电磁力
	Creative  int       `json:"creative"`   // 创作力
	Influence int       `json:"influence"`  // 影响力
	Credit    int       `json:"credit"`     // 信用分
	CDate     time.Time `json:"c_date"`     // 统计月
	StatStart time.Time `json:"stat_start"` // 统计周期开始日
	StatEnd   time.Time `json:"stat_end"`   // 统计周期结束日
}

Score of rating

Jump to

Keyboard shortcuts

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