package models

import (
	"github.com/mhaya/game/game_cluster/internal/data"
)

const (
	SourceGuide       = 1
	SourceRoll        = 2
	SourceSignIn      = 3
	SourceDailyTask   = 4
	SourceAchieveTask = 5
	SourceRank        = 6
	SourceInvite      = 7
	SourceRefreshRoll = 8
	SourceShare       = 9
	SourceLevelUp     = 10
	SourceDraw        = 11
	SourceCashOut     = 12
)

type PlayerRewardBase struct {
	UserName   string            `json:"userName" bson:"userName"`
	Source     int               `json:"source" json:"source"`
	SourceId   int               `json:"sourceId" json:"sourceId"`
	AddReward  []data.ItemReward `json:"AddReward" bson:"addReward"`
	SubReward  []data.ItemReward `json:"SubReward" bson:"subReward"`
	Desc       interface{}       `json:"desc" bson:"desc"`
	CreateTime int64             `json:"createTime" bson:"createTime"`
}

type PlayerReward map[int]*PlayerRewardBase

func NewPlayerReward() map[int]*PlayerRewardBase {
	return make(map[int]*PlayerRewardBase)
}
