package model

import (
	"github.com/gogf/gf/v2/frame/g"
	"github.com/gogf/gf/v2/os/gtime"
)

type SignInRewardDetail struct {
	g.Meta     `orm:"table:sign_in_reward_details"`
	Id         int64       `json:"id"           orm:"id"`
	RuleId     int64       `json:"ruleId"       orm:"rule_id"`
	DayNumber  int         `json:"dayNumber"    orm:"day_number"`
	RewardType int         `json:"rewardType"   orm:"reward_type"`
	Quantity   int         `json:"quantity"     orm:"quantity"`
	Status     int         `json:"status"       orm:"status"`
	CreatedAt  *gtime.Time `json:"createdAt"    orm:"created_at"`
	UpdatedAt  *gtime.Time `json:"updatedAt"    orm:"updated_at"`
	DeletedAt  *gtime.Time `json:"deletedAt"    orm:"deleted_at"`
}

type SimpleReward struct {
	g.Meta     `orm:"table:sign_in_reward_details"`
	Id         int64 `json:"id"           orm:"id"`
	RuleId     int64 `json:"ruleId"       orm:"rule_id"`
	DayNumber  int   `json:"dayNumber"    orm:"day_number"`
	RewardType int   `json:"rewardType"   orm:"reward_type"`
	Quantity   int   `json:"quantity"     orm:"quantity"`
}

// 查询单个明细入参
type SignInRewardDetailGetIn struct {
	Id int64 `json:"id" dc:"明细ID"`
}

// 查询单个明细出参
type SignInRewardDetailGetOut struct {
	SignInRewardDetail
}

// 查询明细列表入参
type SignInRewardDetailListIn struct {
	RuleId int64 `json:"ruleId" dc:"规则ID"`
}

// 查询明细列表出参
type SignInRewardDetailListOut struct {
	List []SignInRewardDetail `json:"list"`
}

// 删除明细入参
type SignInRewardDetailDeleteIn struct {
	Id int64 `json:"id" dc:"明细ID"`
}

// 删除明细出参
type SignInRewardDetailDeleteOut struct {
	Success bool `json:"success"`
}

// 设置明细状态入参
type SignInRewardDetailSetStatusIn struct {
	Id     int64 `json:"id" dc:"明细ID"`
	Status int   `json:"status" dc:"状态"`
}

// 设置明细状态出参
type SignInRewardDetailSetStatusOut struct {
	Success bool `json:"success"`
}

type SignInListItem struct {
	g.Meta    `orm:"table:sign_in_reward_details"`
	Id        int64 `json:"id"           orm:"id"`
	RuleId    int64 `json:"ruleId"       orm:"rule_id"`
	DayNumber int   `json:"dayNumber"    orm:"day_number"`
	Quantity  int   `json:"quantity"     orm:"quantity"`
	IsClaimed bool  `json:"isClaimed"    orm:"-"`
}
