You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.1 KiB
Go

package model
import "time"
// DailyTask defines a daily or weekly task template.
type DailyTask struct {
ID string `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
ObjectiveType string `json:"objectiveType"` // kill_count, elite_kill, collect_gold, use_buff, reach_level
ObjectiveCount int `json:"objectiveCount"`
RewardType string `json:"rewardType"` // gold, potion
RewardAmount int `json:"rewardAmount"`
Period string `json:"period"` // daily, weekly
}
// HeroDailyTask tracks a hero's progress on a daily/weekly task for a period.
type HeroDailyTask struct {
HeroID int64 `json:"heroId"`
TaskID string `json:"taskId"`
Progress int `json:"progress"`
Completed bool `json:"completed"`
Claimed bool `json:"claimed"`
PeriodStart time.Time `json:"periodStart"`
Task *DailyTask `json:"task,omitempty"`
}
// DailyTaskReward holds the reward granted when claiming a daily/weekly task.
type DailyTaskReward struct {
RewardType string `json:"rewardType"`
RewardAmount int `json:"rewardAmount"`
}