package forms

type ChapterOrdinaryListReq struct {
	PlayerId int64 `form:"player_id" json:"player_id" binding:"required"`
}

type ChapterActivityListReq struct {
	PlayerId int64 `form:"player_id" json:"player_id" binding:"required"`
}

// 重新进入
type ChapterReconnectReq struct {
	ListReq
	ChannelId string `json:"channel_id" form:"channel_id"`
	Day       string `form:"day"`
	EndDay    string `form:"endDay"`
	ServerId  int    `json:"server_id" form:"server_id"`
}
type ChapterReconnectItem struct {
	Id              int    `json:"key"`
	Index           int    `json:"index"`
	ChapterId       int    `json:"chapter_id"`
	Chapter         string `json:"chapter"`
	DifficultyIndex int    `json:"difficulty_index"`
	Difficulty      string `json:"difficulty"`
	DieCount        int64  `json:"die_count"`
	DieUserCount    int64  `json:"die_user_count"`
	NewDieCount     int64  `json:"new_die_count"`
	NewDieUserCount int64  `json:"new_die_user_count"`
}

type ChapterReconnectRespData struct {
	ListRes
}

type ChapterReconnectItemSlice []ChapterReconnectItem

func (p ChapterReconnectItemSlice) Len() int {
	return len(p)
}

func (p ChapterReconnectItemSlice) Swap(i, j int) {
	p[i], p[j] = p[j], p[i]
}

func (p ChapterReconnectItemSlice) Less(i, j int) bool {
	return p[j].Index > p[i].Index
}
