affiliate

package
v1.49.39 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Query

Types

type Affiliate

type Affiliate struct {
	mixin.Model[Affiliate]

	Enabled   bool `json:"enabled"`
	Connected bool `json:"connected"`

	UserId   string `json:"userId,omitempty"`
	Name     string `json:"name,omitempty"`
	Company  string `json:"company,omitempty"`
	Country  string `json:"country,omitempty"`
	TaxId    string `json:"taxId,omitempty"`
	Timezone string `json:"timezone,omitempty"`

	Commission commission.Commission `json:"commission,omitempty"`
	Schedule   schedule.Schedule     `json:"schedule,omitempty"`
	CouponId   string                `json:"couponId,omitempty"`

	// Wallet is how this affiliate is PAID: a web3 address they connect
	// themselves. Payouts settle in crypto (or by wire, arranged off this
	// record) — there is no processor account id here, because Hanzo does
	// not disburse through a payment processor. An empty wallet does not
	// stop a fee from being EARNED; it only means the transfer that records
	// what is owed has nowhere to send it yet.
	Wallet string `json:"wallet,omitempty"`
}

func Fake

func Fake(db *datastore.Datastore, userId string) *Affiliate

func New

func New(db *datastore.Datastore) *Affiliate

type ByName

type ByName []*Affiliate

func (ByName) Len

func (a ByName) Len() int

func (ByName) Less

func (a ByName) Less(i, j int) bool

func (ByName) Swap

func (a ByName) Swap(i, j int)

Jump to

Keyboard shortcuts

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