package forms import "errors" type AdminEmailListReq struct { ListReq Sender string `json:"sender" form:"sender"` OperatorId int64 `json:"operatorId" form:"operatorId"` CreatedAt []int64 `json:"createdAt" form:"createdAt"` IsExport int `json:"isExport" form:"isExport"` } func (req *AdminEmailListReq) Check() error { if req.CreatedAt != nil && len(req.CreatedAt) != 2 { return errors.New("生成时间必须选择一个区间或者留空") } if len(req.CreatedAt) == 2 { if req.CreatedAt[0] > req.CreatedAt[1] { return errors.New("生成时间选择的区间值不合理") } // 默认是毫秒 req.CreatedAt[0] = req.CreatedAt[0] / 1000 req.CreatedAt[1] = req.CreatedAt[1] / 1000 } return nil } type AdminEmailListRes struct { ListRes } type AdminEmailAddReq struct { Id int64 `json:"id"` Title string `json:"title"` // 标题 Content string `json:"content"` // 内容 Ext []struct { Id string `json:"id"` Count string `json:"count"` } `json:"ext"` // 奖励材料 SendType int32 `json:"sendType"` // 1 立即发送 0 待发送 SendAt int64 `json:"sendAt"` // 准备发送的时间 Expired int32 `json:"expired"` // 过期天数 ReceiptType int32 `json:"receiptType"` // 收件类型 1全服 2指定服 3指定玩家 ServerIds []int32 `json:"serverIds"` PlayerIds []string `json:"playerIds"` Remark string `json:"remark"` } type AdminEmailAddRes struct { } type AdminEmailVerifyReq struct { Id int64 `json:"id"` VerifyStatus int `json:"verifyStatus"` } type AdminEmailVerifyRes struct { }