promotion

package
v1.34.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: MIT Imports: 5 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

	Code           string     `json:"code"`
	Type           string     `json:"type"`
	Status         string     `json:"status"`
	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) Defaults

func (p *Promotion) Defaults()

func (*Promotion) Init

func (p *Promotion) Init(db *datastore.Datastore)

func (Promotion) Kind

func (p Promotion) Kind() string

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