promotion

package
v1.41.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Query

Types

type Promotion

type Promotion struct {
	mixin.Model[Promotion]

	Code           string     `json:"code"`
	Type           string     `json:"type"`
	Status         string     `json:"status" orm:"default:draft"`
	IsAutomatic    bool       `json:"isAutomatic"`
	IsTaxInclusive bool       `json:"isTaxInclusive"`
	CampaignId     string     `json:"campaignId"`
	StartsAt       *time.Time `json:"startsAt,omitempty"`
	EndsAt         *time.Time `json:"endsAt,omitempty"`

	Metadata  Map    `json:"metadata,omitempty" datastore:"-"`
	Metadata_ string `json:"-" datastore:",noindex"`
}

func New

func New(db *datastore.Datastore) *Promotion

func (*Promotion) Load

func (p *Promotion) Load(ps []datastore.Property) (err error)

func (*Promotion) Save

func (p *Promotion) Save() ([]datastore.Property, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL