Files
zeekayandHanzo Dev 1a76145191 Hanzo Marketing: lifecycle email, from one place
The web app for /v1/marketing on api.hanzo.ai (audiences, drip sequences and
their steps, enrollments, campaigns, the send calendar, promos and opt-outs)
and the small Go service beside it. Earlier history is kept privately in
hanzoai/marketing-v1.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-15 11:36:13 -07:00

57 lines
1.1 KiB
Go

package model
import (
"github.com/hanzoai/commerce/datastore"
"github.com/hanzoai/commerce/models/mixin"
"github.com/hanzoai/orm"
)
func init() { orm.Register[AdSet]("adset") }
type FacebookAdSet struct{}
type AdSet struct {
mixin.Model[AdSet]
FacebookAdSet
AdCampaignId string `json:"adCampaignId"`
AdConfigId string `json:"adConfigId"`
Status Status `json:"status"`
}
func (a AdSet) GetAdCampaignId() string {
return a.AdCampaignId
}
func (a AdSet) GetAdConfigId() string {
return a.AdConfigId
}
func (a AdSet) GetAdSearchFieldAndIds() (string, []string) {
return "AdSetId", []string{a.Id()}
}
func (a AdSet) GetHeadlineSearchFieldAndIds() (string, []string) {
return "AdSetId", []string{a.Id()}
}
func (a AdSet) GetCopySearchFieldAndIds() (string, []string) {
return "AdSetId", []string{a.Id()}
}
func (a AdSet) GetMediaSearchFieldAndIds() (string, []string) {
return "AdSetId", []string{a.Id()}
}
func NewAdSet(db *datastore.Datastore) *AdSet {
a := new(AdSet)
a.Init(db)
a.Status = PendingStatus
return a
}
func QueryAdSet(db *datastore.Datastore) datastore.Query {
return db.Query("adset")
}