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

51 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[AdConfig]("adconfig") }
type AdConfig struct {
mixin.Model[AdConfig]
FacebookAdTypePlacements
AdCampaignId string `json:"adCampaignId"`
}
func (a AdConfig) GetAdCampaignId() string {
return a.AdCampaignId
}
func (a AdConfig) GetAdSetSearchFieldAndIds() (string, []string) {
return "AdConfigId", []string{a.Id()}
}
func (a AdConfig) GetAdSearchFieldAndIds() (string, []string) {
return "AdConfigId", []string{a.Id()}
}
func (a AdConfig) GetHeadlineSearchFieldAndIds() (string, []string) {
return "AdConfigId", []string{a.Id()}
}
func (a AdConfig) GetCopySearchFieldAndIds() (string, []string) {
return "AdConfigId", []string{a.Id()}
}
func (a AdConfig) GetMediaSearchFieldAndIds() (string, []string) {
return "AdConfigId", []string{a.Id()}
}
func NewAdConfig(db *datastore.Datastore) *AdConfig {
a := new(AdConfig)
a.Init(db)
return a
}
func QueryAdConfig(db *datastore.Datastore) datastore.Query {
return db.Query("adconfig")
}