Documentation
¶
Index ¶
- func Query(db *datastore.Datastore) datastore.Query
- type Referrent
- type Referrer
- func (r *Referrer) ApplyActions(ctx context.Context, orgId string, event referral.Event, ...) error
- func (r *Referrer) Defaults()
- func (r *Referrer) Load(ps []datastore.Property) (err error)
- func (r *Referrer) LoadAffiliate() error
- func (r *Referrer) LoadReferralProgram() error
- func (r *Referrer) Referrals() ([]*referral.Referral, error)
- func (r *Referrer) Save() (ps []datastore.Property, err error)
- func (r *Referrer) SaveReferral(ctx context.Context, orgId string, event referral.Event, rfn Referrent, ...) (*referral.Referral, error)
- func (r *Referrer) TestTrigger(action referralprogram.Action, event referral.Event) (bool, error)
- func (r *Referrer) Transactions() ([]*transaction.Transaction, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Referrer ¶
type Referrer struct {
mixin.Model[Referrer]
Code string `json:"code"`
Program referralprogram.ReferralProgram `json:"program"`
ProgramId string `json:"programId"`
OrderId string `json:"orderId"`
UserId string `json:"userId"`
AffiliateId string `json:"affiliateId,omitempty"`
Affiliate affiliate.Affiliate `json:"affiliate,omitempty" datastore:"-"`
FirstReferredAt time.Time `json:"firstReferredAt"`
Client client.Client `json:"-"`
Blacklisted bool `json:"blacklisted,omitempty"`
Duplicate bool `json:"duplicate,omitempty"`
State Map `json:"state,omitempty" datastore:"-"`
State_ string `json:"-" datastore:",noindex"`
}
Is a link that can refer customers to buy products
func (*Referrer) ApplyActions ¶
func (*Referrer) LoadAffiliate ¶
func (*Referrer) LoadReferralProgram ¶
func (*Referrer) SaveReferral ¶
func (*Referrer) TestTrigger ¶
func (*Referrer) Transactions ¶
func (r *Referrer) Transactions() ([]*transaction.Transaction, error)
Click to show internal directories.
Click to hide internal directories.