-
Notifications
You must be signed in to change notification settings - Fork 43
/
update_response.go
38 lines (32 loc) · 1.03 KB
/
update_response.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package campaign
import (
"strconv"
"github.com/bububa/oceanengine/marketing-api/model"
"github.com/bububa/oceanengine/marketing-api/util"
)
// UpdateResponse 广告组更新 API Response
type UpdateResponse struct {
model.BaseResponse
// Data json返回值
Data *UpdateResponseData `json:"data,omitempty"`
}
// UpdateResponseData json返回值
type UpdateResponseData struct {
// CampaignID 广告组id
CampaignID uint64 `json:"campaign_id,omitempty"`
// CampaignIDs 广告组id
CampaignIDs []uint64 `json:"campaign_ids,omitempty"`
// Errors 更新失败的广告组列表
Errors []UpdateError `json:"errors,omitempty"`
}
// UpdateError 更新失败错误
type UpdateError struct {
// CampaignID 广告组ID
CampaignID uint64 `json:"campaign_id,omitempty"`
// ErrorMessage 错误信息
ErrorMessage string `json:"error_message,omitempty"`
}
// Error implement error interface
func (r UpdateError) Error() string {
return util.StringsJoin("广告组ID: ", strconv.FormatUint(r.CampaignID, 10), ", 错误信息", r.ErrorMessage)
}