-
Notifications
You must be signed in to change notification settings - Fork 42
/
create.go
39 lines (34 loc) · 1.26 KB
/
create.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
39
package campaign
import (
"github.com/bububa/oceanengine/marketing-api/enum"
"github.com/bububa/oceanengine/marketing-api/model"
"github.com/bububa/oceanengine/marketing-api/util"
)
// CreateRequest 创建广告组 API Request
type CreateRequest struct {
// AdvertiserID 广告主ID
AdvertiserID uint64 `json:"advertiser_id,omitempty"`
// CampaignName 广告组名称,长度为1-100个字符,其中1个中文字符算2位
CampaignName string `json:"campaign_name,omitempty"`
// MarketingGoal 营销目标
MarketingGoal enum.MarketingGoal `json:"marketing_goal,omitempty"`
// BudgetMode 广告组预算类型
BudgetMode enum.BudgetMode `json:"budget_mode,omitempty"`
// Budget 广告组预算,取值范围: ≥ 0; 当budget_mode为"BUDGET_MODE_DAY"时,必填,且日预算不少于300 元
Budget float64 `json:"budget,omitempty"`
}
// Encode implement PostRequest interface
func (r CreateRequest) Encode() []byte {
return util.JSONMarshal(r)
}
// CreateResponse 创建广告组 API Response
type CreateResponse struct {
model.BaseResponse
// Data json返回值
Data *CreateResponseData `json:"data,omitempty"`
}
// CreateResponseData json返回值
type CreateResponseData struct {
// CampaignID 广告组id
CampaignID uint64 `json:"campaign_id,omitempty"`
}