Versions in this module Expand all Collapse all v0 v0.3.1 Nov 16, 2026 v0.3.0 Nov 15, 2026 Changes in this version type TableState + Facets map[string][]string + Hidden []string + PerPage int + Rows int + func (t TableState) Pager() components.Paginator + func (t TableState) State() components.DataTableState v0.2.0 Oct 25, 2026 v0.1.0 Oct 13, 2026 Changes in this version + const AdminRole + const AffiliatesManage + const DashboardView + const DayLayout + const DefaultCookieDays + const DefaultCookieName + const DefaultLocation + const DefaultMinWithdrawal + const DefaultPageSize + const DefaultPrefix + const DefaultReferralPath + const FallbackLocale + const MaxLevels + const MaxPageSize + const PayoutVia + const PlansManage + const PublishCommand + const ReferralRecord + const TranslationGroup + const ViewAdminAffiliate + const ViewAdminAffiliates + const ViewAdminCommissions + const ViewAdminPlans + const ViewAdminWithdrawals + const ViewDashboard + const WalletSlug + var ErrBlocked = forbidden("affiliate: a blocked affiliate cannot withdraw") + var ErrDocumentReferred = validation.Errors + var ErrNegativeBalance = validation.Errors + var ErrNotFound = fmt.Errorf("affiliate: record not found: %w", model.ErrModelNotFound) + var ErrOnePerDay = validation.Errors + var ErrSameTree = validation.Errors + var ErrSelfReferral = validation.Errors + var ErrTaken = validation.Errors + var PayoutKindNames = []string + var PayoutKinds = map[string][]string + func CommissionOf(amount, rateBps int64) int64 + func Locales() []string + func PublishedPaths() []string + func ViewNames() []string + func ViewPackages() []string + type AccountOption struct + ID string + Label string + type AccountRequest struct + Details map[string]string + Kind string + Label string + type AdminAffiliatePageData struct + Affiliate AffiliateRow + Available string + Balance string + BlockURL string + Clicks int64 + Commissions string + CommissionsURL string + Held string + Link string + Negative bool + Sales int64 + Signups int64 + Tree []TreeRow + WriteOffURL string + type AdminAffiliatesPageData struct + Rows []AffiliateRow + Status string + StoreURL string + Table TableState + type AdminCommissionsPageData struct + AffiliateID string + Level string + Rows []CommissionRow + Status string + Table TableState + type AdminPlansPageData struct + Plans []PlanRow + StoreURL string + type AdminWithdrawalsPageData struct + Rows []WithdrawalRow + Status string + URL string + type Affiliate struct + Code string + CreatedAt time.Time + CreatedBy string + Document string + ID string + Name string + Status AffiliateStatus + TenantID string + UpdatedAt time.Time + UserID string + func (a Affiliate) IsActive() bool + func (row *Affiliate) Fresh(ctx context.Context, g auth.Grant, with ...string) (*Affiliate, error) + func (row *Affiliate) Replicate(except ...string) (*Affiliate, error) + type AffiliateCollection []*Affiliate + func AffiliateCollectionOf(rows model.Rows) AffiliateCollection + func (c AffiliateCollection) Contains(key any) bool + func (c AffiliateCollection) Except(keys ...any) AffiliateCollection + func (c AffiliateCollection) Find(key any) *Affiliate + func (c AffiliateCollection) FindOrFail(key any) (*Affiliate, error) + func (c AffiliateCollection) Fresh(ctx context.Context, g auth.Grant, with ...string) (AffiliateCollection, error) + func (c AffiliateCollection) Load(ctx context.Context, g auth.Grant, relations ...string) error + func (c AffiliateCollection) LoadCount(ctx context.Context, g auth.Grant, relations ...string) error + func (c AffiliateCollection) LoadMissing(ctx context.Context, g auth.Grant, relations ...string) error + func (c AffiliateCollection) ModelKeys() []any + func (c AffiliateCollection) Only(keys ...any) AffiliateCollection + func (c AffiliateCollection) Pluck(column string) []any + func (c AffiliateCollection) Rows() model.Rows + func (c AffiliateCollection) ToArray() []map[string]any + func (c AffiliateCollection) Unique() AffiliateCollection + type AffiliatePolicy struct + func (AffiliatePolicy) Can(ctx context.Context, s security.Subject, a security.Action, record Affiliate) error + type AffiliateQuery struct + func Affiliates(db model.DB) *AffiliateQuery + func (q *AffiliateQuery) AddSelect(columns ...any) *AffiliateQuery + func (q *AffiliateQuery) Avg(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *AffiliateQuery) Base() *model.Builder + func (q *AffiliateQuery) Chunk(ctx context.Context, g auth.Grant, count int, ...) error + func (q *AffiliateQuery) Clone() *AffiliateQuery + func (q *AffiliateQuery) Count(ctx context.Context, g auth.Grant, columns ...any) (int64, error) + func (q *AffiliateQuery) Create(ctx context.Context, g auth.Grant, attributes map[string]any) (*Affiliate, error) + func (q *AffiliateQuery) Cursor(ctx context.Context, g auth.Grant) iter.Seq2[*Affiliate, error] + func (q *AffiliateQuery) CursorPaginate(ctx context.Context, g auth.Grant, perPage int, cursor *pagination.Cursor, ...) (AffiliateCollection, *pagination.CursorPage, error) + func (q *AffiliateQuery) Decrement(ctx context.Context, g auth.Grant, column string, amount any, ...) (int64, error) + func (q *AffiliateQuery) Delete(ctx context.Context, g auth.Grant) (int64, error) + func (q *AffiliateQuery) DoesntExist(ctx context.Context, g auth.Grant) (bool, error) + func (q *AffiliateQuery) DoesntHave(relation, boolean string, callback func(*query.Builder)) *AffiliateQuery + func (q *AffiliateQuery) Each(ctx context.Context, g auth.Grant, count int, ...) error + func (q *AffiliateQuery) Exists(ctx context.Context, g auth.Grant) (bool, error) + func (q *AffiliateQuery) Find(ctx context.Context, g auth.Grant, id any, columns ...any) (*Affiliate, error) + func (q *AffiliateQuery) FindMany(ctx context.Context, g auth.Grant, ids []any, columns ...any) (AffiliateCollection, error) + func (q *AffiliateQuery) FindOrFail(ctx context.Context, g auth.Grant, id any, columns ...any) (*Affiliate, error) + func (q *AffiliateQuery) FindOrNew(ctx context.Context, g auth.Grant, id any, columns ...any) (*Affiliate, error) + func (q *AffiliateQuery) First(ctx context.Context, g auth.Grant, columns ...any) (*Affiliate, error) + func (q *AffiliateQuery) FirstOrCreate(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*Affiliate, error) + func (q *AffiliateQuery) FirstOrFail(ctx context.Context, g auth.Grant, columns ...any) (*Affiliate, error) + func (q *AffiliateQuery) FirstOrNew(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*Affiliate, error) + func (q *AffiliateQuery) FirstWhere(ctx context.Context, g auth.Grant, column any, args ...any) (*Affiliate, error) + func (q *AffiliateQuery) ForPage(page, perPage int) *AffiliateQuery + func (q *AffiliateQuery) ForceCreate(ctx context.Context, g auth.Grant, attributes map[string]any) (*Affiliate, error) + func (q *AffiliateQuery) Get(ctx context.Context, g auth.Grant, columns ...any) (AffiliateCollection, error) + func (q *AffiliateQuery) GroupBy(groups ...any) *AffiliateQuery + func (q *AffiliateQuery) Has(relation, operator string, count int, boolean string, ...) *AffiliateQuery + func (q *AffiliateQuery) Increment(ctx context.Context, g auth.Grant, column string, amount any, ...) (int64, error) + func (q *AffiliateQuery) Insert(ctx context.Context, g auth.Grant, values ...map[string]any) (bool, error) + func (q *AffiliateQuery) InsertOrIgnore(ctx context.Context, g auth.Grant, values ...map[string]any) (bool, error) + func (q *AffiliateQuery) Join(table any, first any, args ...any) *AffiliateQuery + func (q *AffiliateQuery) Latest(column ...string) *AffiliateQuery + func (q *AffiliateQuery) Limit(value int) *AffiliateQuery + func (q *AffiliateQuery) Max(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *AffiliateQuery) Min(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *AffiliateQuery) New() (*Affiliate, error) + func (q *AffiliateQuery) Offset(value int) *AffiliateQuery + func (q *AffiliateQuery) Oldest(column ...string) *AffiliateQuery + func (q *AffiliateQuery) OrDoesntHave(relation string) *AffiliateQuery + func (q *AffiliateQuery) OrHas(relation, operator string, count int) *AffiliateQuery + func (q *AffiliateQuery) OrWhere(column any, args ...any) *AffiliateQuery + func (q *AffiliateQuery) OrWhereDoesntHave(relation string, callback func(*query.Builder)) *AffiliateQuery + func (q *AffiliateQuery) OrWhereHas(relation string, callback func(*query.Builder)) *AffiliateQuery + func (q *AffiliateQuery) OrWhereNot(column any, args ...any) *AffiliateQuery + func (q *AffiliateQuery) OrWhereRelation(relation string, column any, args ...any) *AffiliateQuery + func (q *AffiliateQuery) OrderBy(column any, direction ...string) *AffiliateQuery + func (q *AffiliateQuery) OrderByDesc(column any) *AffiliateQuery + func (q *AffiliateQuery) Paginate(ctx context.Context, g auth.Grant, perPage, page int, opts pagination.Options, ...) (AffiliateCollection, *pagination.LengthAwarePage, error) + func (q *AffiliateQuery) Pluck(ctx context.Context, g auth.Grant, column string) ([]any, error) + func (q *AffiliateQuery) Select(columns ...any) *AffiliateQuery + func (q *AffiliateQuery) SelectRaw(expression string, bindings ...any) *AffiliateQuery + func (q *AffiliateQuery) SimplePaginate(ctx context.Context, g auth.Grant, perPage, page int, opts pagination.Options, ...) (AffiliateCollection, *pagination.Page, error) + func (q *AffiliateQuery) Sole(ctx context.Context, g auth.Grant, columns ...any) (*Affiliate, error) + func (q *AffiliateQuery) SoleValue(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *AffiliateQuery) Sum(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *AffiliateQuery) Touch(ctx context.Context, g auth.Grant, column ...string) (int64, error) + func (q *AffiliateQuery) Update(ctx context.Context, g auth.Grant, values map[string]any) (int64, error) + func (q *AffiliateQuery) UpdateOrCreate(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*Affiliate, error) + func (q *AffiliateQuery) Upsert(ctx context.Context, g auth.Grant, values []map[string]any, ...) (int64, error) + func (q *AffiliateQuery) Value(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *AffiliateQuery) ValueOrFail(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *AffiliateQuery) Where(column any, args ...any) *AffiliateQuery + func (q *AffiliateQuery) WhereBelongsTo(relationshipName string, related ...model.Entity) *AffiliateQuery + func (q *AffiliateQuery) WhereBetween(column any, from, to any) *AffiliateQuery + func (q *AffiliateQuery) WhereColumn(first any, args ...any) *AffiliateQuery + func (q *AffiliateQuery) WhereDoesntHave(relation string, callback func(*query.Builder)) *AffiliateQuery + func (q *AffiliateQuery) WhereExists(callback func(*query.Builder)) *AffiliateQuery + func (q *AffiliateQuery) WhereHas(relation string, callback func(*query.Builder)) *AffiliateQuery + func (q *AffiliateQuery) WhereHasCount(relation string, callback func(*query.Builder), operator string, count int) *AffiliateQuery + func (q *AffiliateQuery) WhereIn(column any, values []any) *AffiliateQuery + func (q *AffiliateQuery) WhereKey(id any) *AffiliateQuery + func (q *AffiliateQuery) WhereNot(column any, args ...any) *AffiliateQuery + func (q *AffiliateQuery) WhereNotExists(callback func(*query.Builder)) *AffiliateQuery + func (q *AffiliateQuery) WhereNotIn(column any, values []any) *AffiliateQuery + func (q *AffiliateQuery) WhereNotNull(columns ...any) *AffiliateQuery + func (q *AffiliateQuery) WhereNull(columns ...any) *AffiliateQuery + func (q *AffiliateQuery) WhereRelation(relation string, column any, args ...any) *AffiliateQuery + func (q *AffiliateQuery) With(relations ...string) *AffiliateQuery + func (q *AffiliateQuery) WithAvg(relation, column string) *AffiliateQuery + func (q *AffiliateQuery) WithCount(relations ...string) *AffiliateQuery + func (q *AffiliateQuery) WithExists(relation string) *AffiliateQuery + func (q *AffiliateQuery) WithMax(relation, column string) *AffiliateQuery + func (q *AffiliateQuery) WithMin(relation, column string) *AffiliateQuery + func (q *AffiliateQuery) WithSum(relation, column string) *AffiliateQuery + func (q *AffiliateQuery) Without(relations ...string) *AffiliateQuery + func (q *AffiliateQuery) WithoutGlobalScope(identifier string) *AffiliateQuery + func (q *AffiliateQuery) WithoutGlobalScopes(identifiers ...string) *AffiliateQuery + type AffiliateRow struct + Active bool + Code string + Created string + Document string + ID string + Name string + Status string + StatusKey string + URL string + User string + type AffiliateService struct + func NewAffiliateService(db *data.DB) *AffiliateService + func (s *AffiliateService) ActivatePlan(ctx context.Context, actor security.Subject, id string) (*PlanView, error) + func (s *AffiliateService) ActivePlan(ctx context.Context, actor security.Subject) (*PlanView, error) + func (s *AffiliateService) AddPayoutAccount(ctx context.Context, actor security.Subject, in AccountRequest) (*wallet.PayoutAccount, error) + func (s *AffiliateService) AffiliatesPage(ctx context.Context, actor security.Subject, q AffiliatesQuery) ([]*Affiliate, int, error) + func (s *AffiliateService) Attribute(ctx context.Context, actor security.Subject, in AttributeRequest) (*Referral, error) + func (s *AffiliateService) BalanceOf(ctx context.Context, actor security.Subject, affiliateID string) (Balance, error) + func (s *AffiliateService) CommissionsPage(ctx context.Context, actor security.Subject, q CommissionsQuery) ([]CommissionView, int, error) + func (s *AffiliateService) Create(ctx context.Context, actor security.Subject, in CreateRequest) (*Affiliate, error) + func (s *AffiliateService) CreatePlan(ctx context.Context, actor security.Subject, in PlanRequest, activate bool) (*PlanView, error) + func (s *AffiliateService) Find(ctx context.Context, actor security.Subject, id string) (*Affiliate, error) + func (s *AffiliateService) Mine(ctx context.Context, actor security.Subject) (*Affiliate, error) + func (s *AffiliateService) MyWithdrawals(ctx context.Context, actor security.Subject) ([]*wallet.WithdrawalRequest, error) + func (s *AffiliateService) PayWithdrawal(ctx context.Context, actor security.Subject, in wallet.PaymentInput, ...) (*wallet.WithdrawalRequest, error) + func (s *AffiliateService) PayoutAccounts(ctx context.Context, actor security.Subject, affiliateID string) ([]*wallet.PayoutAccount, error) + func (s *AffiliateService) Plans(ctx context.Context, actor security.Subject) ([]PlanView, error) + func (s *AffiliateService) RecordClick(ctx context.Context, actor security.Subject, in ClickRequest) (*Affiliate, int, error) + func (s *AffiliateService) RecordConversion(ctx context.Context, actor security.Subject, in ConversionRequest) (*Conversion, []*Commission, error) + func (s *AffiliateService) RecordRefund(ctx context.Context, actor security.Subject, orderRef, reason string) (*Conversion, error) + func (s *AffiliateService) RejectWithdrawal(ctx context.Context, actor security.Subject, requestID, reason string) (*wallet.WithdrawalRequest, error) + func (s *AffiliateService) RequestWithdrawal(ctx context.Context, actor security.Subject, in WithdrawalRequest) (*wallet.WithdrawalRequest, error) + func (s *AffiliateService) ReverseCommission(ctx context.Context, actor security.Subject, commissionID, reason string) (*Commission, error) + func (s *AffiliateService) SetBlocked(ctx context.Context, actor security.Subject, id string, blocked bool) (*Affiliate, error) + func (s *AffiliateService) StartPaying(ctx context.Context, actor security.Subject, requestID string) (*wallet.WithdrawalRequest, error) + func (s *AffiliateService) StatsOf(ctx context.Context, actor security.Subject, affiliateID string, from, to Day) (Stats, error) + func (s *AffiliateService) Tree(ctx context.Context, actor security.Subject, affiliateID string) ([]TreeNode, error) + func (s *AffiliateService) Upline(ctx context.Context, actor security.Subject, userID string) ([]*Affiliate, error) + func (s *AffiliateService) WithdrawalReceipt(ctx context.Context, actor security.Subject, requestID string) (*wallet.WithdrawalRequest, filesystem.File, error) + func (s *AffiliateService) Withdrawals(ctx context.Context, actor security.Subject, status wallet.WithdrawalStatus) ([]AffiliateWithdrawal, error) + func (s *AffiliateService) WriteOff(ctx context.Context, actor security.Subject, affiliateID, reason string) (int64, error) + type AffiliateStatus string + const AffiliateActive + const AffiliateBlocked + type AffiliateWithdrawal struct + Affiliate *Affiliate + Request *wallet.WithdrawalRequest + type AffiliatesQuery struct + Dir string + Page int + PerPage int + Search string + Sort string + Status AffiliateStatus + type AttributeRequest struct + Code string + Document string + UserID string + type Balance struct + Available int64 + Balance int64 + Held int64 + type CellInput struct + Label string + Name string + Placeholder string + Required bool + Type string + Value string + type Click struct + AffiliateID string + At time.Time + CreatedAt time.Time + ID string + IPHash string + LandingURL string + TenantID string + UpdatedAt time.Time + func (row *Click) Fresh(ctx context.Context, g auth.Grant, with ...string) (*Click, error) + func (row *Click) Replicate(except ...string) (*Click, error) + type ClickCollection []*Click + func ClickCollectionOf(rows model.Rows) ClickCollection + func (c ClickCollection) Contains(key any) bool + func (c ClickCollection) Except(keys ...any) ClickCollection + func (c ClickCollection) Find(key any) *Click + func (c ClickCollection) FindOrFail(key any) (*Click, error) + func (c ClickCollection) Fresh(ctx context.Context, g auth.Grant, with ...string) (ClickCollection, error) + func (c ClickCollection) Load(ctx context.Context, g auth.Grant, relations ...string) error + func (c ClickCollection) LoadCount(ctx context.Context, g auth.Grant, relations ...string) error + func (c ClickCollection) LoadMissing(ctx context.Context, g auth.Grant, relations ...string) error + func (c ClickCollection) ModelKeys() []any + func (c ClickCollection) Only(keys ...any) ClickCollection + func (c ClickCollection) Pluck(column string) []any + func (c ClickCollection) Rows() model.Rows + func (c ClickCollection) ToArray() []map[string]any + func (c ClickCollection) Unique() ClickCollection + type ClickQuery struct + func Clicks(db model.DB) *ClickQuery + func (q *ClickQuery) AddSelect(columns ...any) *ClickQuery + func (q *ClickQuery) Avg(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *ClickQuery) Base() *model.Builder + func (q *ClickQuery) Chunk(ctx context.Context, g auth.Grant, count int, ...) error + func (q *ClickQuery) Clone() *ClickQuery + func (q *ClickQuery) Count(ctx context.Context, g auth.Grant, columns ...any) (int64, error) + func (q *ClickQuery) Create(ctx context.Context, g auth.Grant, attributes map[string]any) (*Click, error) + func (q *ClickQuery) Cursor(ctx context.Context, g auth.Grant) iter.Seq2[*Click, error] + func (q *ClickQuery) CursorPaginate(ctx context.Context, g auth.Grant, perPage int, cursor *pagination.Cursor, ...) (ClickCollection, *pagination.CursorPage, error) + func (q *ClickQuery) Decrement(ctx context.Context, g auth.Grant, column string, amount any, ...) (int64, error) + func (q *ClickQuery) Delete(ctx context.Context, g auth.Grant) (int64, error) + func (q *ClickQuery) DoesntExist(ctx context.Context, g auth.Grant) (bool, error) + func (q *ClickQuery) DoesntHave(relation, boolean string, callback func(*query.Builder)) *ClickQuery + func (q *ClickQuery) Each(ctx context.Context, g auth.Grant, count int, ...) error + func (q *ClickQuery) Exists(ctx context.Context, g auth.Grant) (bool, error) + func (q *ClickQuery) Find(ctx context.Context, g auth.Grant, id any, columns ...any) (*Click, error) + func (q *ClickQuery) FindMany(ctx context.Context, g auth.Grant, ids []any, columns ...any) (ClickCollection, error) + func (q *ClickQuery) FindOrFail(ctx context.Context, g auth.Grant, id any, columns ...any) (*Click, error) + func (q *ClickQuery) FindOrNew(ctx context.Context, g auth.Grant, id any, columns ...any) (*Click, error) + func (q *ClickQuery) First(ctx context.Context, g auth.Grant, columns ...any) (*Click, error) + func (q *ClickQuery) FirstOrCreate(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*Click, error) + func (q *ClickQuery) FirstOrFail(ctx context.Context, g auth.Grant, columns ...any) (*Click, error) + func (q *ClickQuery) FirstOrNew(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*Click, error) + func (q *ClickQuery) FirstWhere(ctx context.Context, g auth.Grant, column any, args ...any) (*Click, error) + func (q *ClickQuery) ForPage(page, perPage int) *ClickQuery + func (q *ClickQuery) ForceCreate(ctx context.Context, g auth.Grant, attributes map[string]any) (*Click, error) + func (q *ClickQuery) Get(ctx context.Context, g auth.Grant, columns ...any) (ClickCollection, error) + func (q *ClickQuery) GroupBy(groups ...any) *ClickQuery + func (q *ClickQuery) Has(relation, operator string, count int, boolean string, ...) *ClickQuery + func (q *ClickQuery) Increment(ctx context.Context, g auth.Grant, column string, amount any, ...) (int64, error) + func (q *ClickQuery) Insert(ctx context.Context, g auth.Grant, values ...map[string]any) (bool, error) + func (q *ClickQuery) InsertOrIgnore(ctx context.Context, g auth.Grant, values ...map[string]any) (bool, error) + func (q *ClickQuery) Join(table any, first any, args ...any) *ClickQuery + func (q *ClickQuery) Latest(column ...string) *ClickQuery + func (q *ClickQuery) Limit(value int) *ClickQuery + func (q *ClickQuery) Max(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *ClickQuery) Min(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *ClickQuery) New() (*Click, error) + func (q *ClickQuery) Offset(value int) *ClickQuery + func (q *ClickQuery) Oldest(column ...string) *ClickQuery + func (q *ClickQuery) OrDoesntHave(relation string) *ClickQuery + func (q *ClickQuery) OrHas(relation, operator string, count int) *ClickQuery + func (q *ClickQuery) OrWhere(column any, args ...any) *ClickQuery + func (q *ClickQuery) OrWhereDoesntHave(relation string, callback func(*query.Builder)) *ClickQuery + func (q *ClickQuery) OrWhereHas(relation string, callback func(*query.Builder)) *ClickQuery + func (q *ClickQuery) OrWhereNot(column any, args ...any) *ClickQuery + func (q *ClickQuery) OrWhereRelation(relation string, column any, args ...any) *ClickQuery + func (q *ClickQuery) OrderBy(column any, direction ...string) *ClickQuery + func (q *ClickQuery) OrderByDesc(column any) *ClickQuery + func (q *ClickQuery) Paginate(ctx context.Context, g auth.Grant, perPage, page int, opts pagination.Options, ...) (ClickCollection, *pagination.LengthAwarePage, error) + func (q *ClickQuery) Pluck(ctx context.Context, g auth.Grant, column string) ([]any, error) + func (q *ClickQuery) Select(columns ...any) *ClickQuery + func (q *ClickQuery) SelectRaw(expression string, bindings ...any) *ClickQuery + func (q *ClickQuery) SimplePaginate(ctx context.Context, g auth.Grant, perPage, page int, opts pagination.Options, ...) (ClickCollection, *pagination.Page, error) + func (q *ClickQuery) Sole(ctx context.Context, g auth.Grant, columns ...any) (*Click, error) + func (q *ClickQuery) SoleValue(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *ClickQuery) Sum(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *ClickQuery) Touch(ctx context.Context, g auth.Grant, column ...string) (int64, error) + func (q *ClickQuery) Update(ctx context.Context, g auth.Grant, values map[string]any) (int64, error) + func (q *ClickQuery) UpdateOrCreate(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*Click, error) + func (q *ClickQuery) Upsert(ctx context.Context, g auth.Grant, values []map[string]any, ...) (int64, error) + func (q *ClickQuery) Value(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *ClickQuery) ValueOrFail(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *ClickQuery) Where(column any, args ...any) *ClickQuery + func (q *ClickQuery) WhereBelongsTo(relationshipName string, related ...model.Entity) *ClickQuery + func (q *ClickQuery) WhereBetween(column any, from, to any) *ClickQuery + func (q *ClickQuery) WhereColumn(first any, args ...any) *ClickQuery + func (q *ClickQuery) WhereDoesntHave(relation string, callback func(*query.Builder)) *ClickQuery + func (q *ClickQuery) WhereExists(callback func(*query.Builder)) *ClickQuery + func (q *ClickQuery) WhereHas(relation string, callback func(*query.Builder)) *ClickQuery + func (q *ClickQuery) WhereHasCount(relation string, callback func(*query.Builder), operator string, count int) *ClickQuery + func (q *ClickQuery) WhereIn(column any, values []any) *ClickQuery + func (q *ClickQuery) WhereKey(id any) *ClickQuery + func (q *ClickQuery) WhereNot(column any, args ...any) *ClickQuery + func (q *ClickQuery) WhereNotExists(callback func(*query.Builder)) *ClickQuery + func (q *ClickQuery) WhereNotIn(column any, values []any) *ClickQuery + func (q *ClickQuery) WhereNotNull(columns ...any) *ClickQuery + func (q *ClickQuery) WhereNull(columns ...any) *ClickQuery + func (q *ClickQuery) WhereRelation(relation string, column any, args ...any) *ClickQuery + func (q *ClickQuery) With(relations ...string) *ClickQuery + func (q *ClickQuery) WithAvg(relation, column string) *ClickQuery + func (q *ClickQuery) WithCount(relations ...string) *ClickQuery + func (q *ClickQuery) WithExists(relation string) *ClickQuery + func (q *ClickQuery) WithMax(relation, column string) *ClickQuery + func (q *ClickQuery) WithMin(relation, column string) *ClickQuery + func (q *ClickQuery) WithSum(relation, column string) *ClickQuery + func (q *ClickQuery) Without(relations ...string) *ClickQuery + func (q *ClickQuery) WithoutGlobalScope(identifier string) *ClickQuery + func (q *ClickQuery) WithoutGlobalScopes(identifiers ...string) *ClickQuery + type ClickRequest struct + Address string + Code string + LandingURL string + type Commission struct + AffiliateID string + Amount int64 + ConversionID string + CreatedAt time.Time + ID string + Level int + RateBps int64 + ReversalOperationID string + ReversedReason string + Status CommissionStatus + TenantID string + UpdatedAt time.Time + WalletOperationID string + func (row *Commission) Fresh(ctx context.Context, g auth.Grant, with ...string) (*Commission, error) + func (row *Commission) Replicate(except ...string) (*Commission, error) + type CommissionCollection []*Commission + func CommissionCollectionOf(rows model.Rows) CommissionCollection + func (c CommissionCollection) Contains(key any) bool + func (c CommissionCollection) Except(keys ...any) CommissionCollection + func (c CommissionCollection) Find(key any) *Commission + func (c CommissionCollection) FindOrFail(key any) (*Commission, error) + func (c CommissionCollection) Fresh(ctx context.Context, g auth.Grant, with ...string) (CommissionCollection, error) + func (c CommissionCollection) Load(ctx context.Context, g auth.Grant, relations ...string) error + func (c CommissionCollection) LoadCount(ctx context.Context, g auth.Grant, relations ...string) error + func (c CommissionCollection) LoadMissing(ctx context.Context, g auth.Grant, relations ...string) error + func (c CommissionCollection) ModelKeys() []any + func (c CommissionCollection) Only(keys ...any) CommissionCollection + func (c CommissionCollection) Pluck(column string) []any + func (c CommissionCollection) Rows() model.Rows + func (c CommissionCollection) ToArray() []map[string]any + func (c CommissionCollection) Unique() CommissionCollection + type CommissionQuery struct + func Commissions(db model.DB) *CommissionQuery + func (q *CommissionQuery) AddSelect(columns ...any) *CommissionQuery + func (q *CommissionQuery) Avg(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *CommissionQuery) Base() *model.Builder + func (q *CommissionQuery) Chunk(ctx context.Context, g auth.Grant, count int, ...) error + func (q *CommissionQuery) Clone() *CommissionQuery + func (q *CommissionQuery) Count(ctx context.Context, g auth.Grant, columns ...any) (int64, error) + func (q *CommissionQuery) Create(ctx context.Context, g auth.Grant, attributes map[string]any) (*Commission, error) + func (q *CommissionQuery) Cursor(ctx context.Context, g auth.Grant) iter.Seq2[*Commission, error] + func (q *CommissionQuery) CursorPaginate(ctx context.Context, g auth.Grant, perPage int, cursor *pagination.Cursor, ...) (CommissionCollection, *pagination.CursorPage, error) + func (q *CommissionQuery) Decrement(ctx context.Context, g auth.Grant, column string, amount any, ...) (int64, error) + func (q *CommissionQuery) Delete(ctx context.Context, g auth.Grant) (int64, error) + func (q *CommissionQuery) DoesntExist(ctx context.Context, g auth.Grant) (bool, error) + func (q *CommissionQuery) DoesntHave(relation, boolean string, callback func(*query.Builder)) *CommissionQuery + func (q *CommissionQuery) Each(ctx context.Context, g auth.Grant, count int, ...) error + func (q *CommissionQuery) Exists(ctx context.Context, g auth.Grant) (bool, error) + func (q *CommissionQuery) Find(ctx context.Context, g auth.Grant, id any, columns ...any) (*Commission, error) + func (q *CommissionQuery) FindMany(ctx context.Context, g auth.Grant, ids []any, columns ...any) (CommissionCollection, error) + func (q *CommissionQuery) FindOrFail(ctx context.Context, g auth.Grant, id any, columns ...any) (*Commission, error) + func (q *CommissionQuery) FindOrNew(ctx context.Context, g auth.Grant, id any, columns ...any) (*Commission, error) + func (q *CommissionQuery) First(ctx context.Context, g auth.Grant, columns ...any) (*Commission, error) + func (q *CommissionQuery) FirstOrCreate(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*Commission, error) + func (q *CommissionQuery) FirstOrFail(ctx context.Context, g auth.Grant, columns ...any) (*Commission, error) + func (q *CommissionQuery) FirstOrNew(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*Commission, error) + func (q *CommissionQuery) FirstWhere(ctx context.Context, g auth.Grant, column any, args ...any) (*Commission, error) + func (q *CommissionQuery) ForPage(page, perPage int) *CommissionQuery + func (q *CommissionQuery) ForceCreate(ctx context.Context, g auth.Grant, attributes map[string]any) (*Commission, error) + func (q *CommissionQuery) Get(ctx context.Context, g auth.Grant, columns ...any) (CommissionCollection, error) + func (q *CommissionQuery) GroupBy(groups ...any) *CommissionQuery + func (q *CommissionQuery) Has(relation, operator string, count int, boolean string, ...) *CommissionQuery + func (q *CommissionQuery) Increment(ctx context.Context, g auth.Grant, column string, amount any, ...) (int64, error) + func (q *CommissionQuery) Insert(ctx context.Context, g auth.Grant, values ...map[string]any) (bool, error) + func (q *CommissionQuery) InsertOrIgnore(ctx context.Context, g auth.Grant, values ...map[string]any) (bool, error) + func (q *CommissionQuery) Join(table any, first any, args ...any) *CommissionQuery + func (q *CommissionQuery) Latest(column ...string) *CommissionQuery + func (q *CommissionQuery) Limit(value int) *CommissionQuery + func (q *CommissionQuery) Max(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *CommissionQuery) Min(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *CommissionQuery) New() (*Commission, error) + func (q *CommissionQuery) Offset(value int) *CommissionQuery + func (q *CommissionQuery) Oldest(column ...string) *CommissionQuery + func (q *CommissionQuery) OrDoesntHave(relation string) *CommissionQuery + func (q *CommissionQuery) OrHas(relation, operator string, count int) *CommissionQuery + func (q *CommissionQuery) OrWhere(column any, args ...any) *CommissionQuery + func (q *CommissionQuery) OrWhereDoesntHave(relation string, callback func(*query.Builder)) *CommissionQuery + func (q *CommissionQuery) OrWhereHas(relation string, callback func(*query.Builder)) *CommissionQuery + func (q *CommissionQuery) OrWhereNot(column any, args ...any) *CommissionQuery + func (q *CommissionQuery) OrWhereRelation(relation string, column any, args ...any) *CommissionQuery + func (q *CommissionQuery) OrderBy(column any, direction ...string) *CommissionQuery + func (q *CommissionQuery) OrderByDesc(column any) *CommissionQuery + func (q *CommissionQuery) Paginate(ctx context.Context, g auth.Grant, perPage, page int, opts pagination.Options, ...) (CommissionCollection, *pagination.LengthAwarePage, error) + func (q *CommissionQuery) Pluck(ctx context.Context, g auth.Grant, column string) ([]any, error) + func (q *CommissionQuery) Select(columns ...any) *CommissionQuery + func (q *CommissionQuery) SelectRaw(expression string, bindings ...any) *CommissionQuery + func (q *CommissionQuery) SimplePaginate(ctx context.Context, g auth.Grant, perPage, page int, opts pagination.Options, ...) (CommissionCollection, *pagination.Page, error) + func (q *CommissionQuery) Sole(ctx context.Context, g auth.Grant, columns ...any) (*Commission, error) + func (q *CommissionQuery) SoleValue(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *CommissionQuery) Sum(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *CommissionQuery) Touch(ctx context.Context, g auth.Grant, column ...string) (int64, error) + func (q *CommissionQuery) Update(ctx context.Context, g auth.Grant, values map[string]any) (int64, error) + func (q *CommissionQuery) UpdateOrCreate(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*Commission, error) + func (q *CommissionQuery) Upsert(ctx context.Context, g auth.Grant, values []map[string]any, ...) (int64, error) + func (q *CommissionQuery) Value(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *CommissionQuery) ValueOrFail(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *CommissionQuery) Where(column any, args ...any) *CommissionQuery + func (q *CommissionQuery) WhereBelongsTo(relationshipName string, related ...model.Entity) *CommissionQuery + func (q *CommissionQuery) WhereBetween(column any, from, to any) *CommissionQuery + func (q *CommissionQuery) WhereColumn(first any, args ...any) *CommissionQuery + func (q *CommissionQuery) WhereDoesntHave(relation string, callback func(*query.Builder)) *CommissionQuery + func (q *CommissionQuery) WhereExists(callback func(*query.Builder)) *CommissionQuery + func (q *CommissionQuery) WhereHas(relation string, callback func(*query.Builder)) *CommissionQuery + func (q *CommissionQuery) WhereHasCount(relation string, callback func(*query.Builder), operator string, count int) *CommissionQuery + func (q *CommissionQuery) WhereIn(column any, values []any) *CommissionQuery + func (q *CommissionQuery) WhereKey(id any) *CommissionQuery + func (q *CommissionQuery) WhereNot(column any, args ...any) *CommissionQuery + func (q *CommissionQuery) WhereNotExists(callback func(*query.Builder)) *CommissionQuery + func (q *CommissionQuery) WhereNotIn(column any, values []any) *CommissionQuery + func (q *CommissionQuery) WhereNotNull(columns ...any) *CommissionQuery + func (q *CommissionQuery) WhereNull(columns ...any) *CommissionQuery + func (q *CommissionQuery) WhereRelation(relation string, column any, args ...any) *CommissionQuery + func (q *CommissionQuery) With(relations ...string) *CommissionQuery + func (q *CommissionQuery) WithAvg(relation, column string) *CommissionQuery + func (q *CommissionQuery) WithCount(relations ...string) *CommissionQuery + func (q *CommissionQuery) WithExists(relation string) *CommissionQuery + func (q *CommissionQuery) WithMax(relation, column string) *CommissionQuery + func (q *CommissionQuery) WithMin(relation, column string) *CommissionQuery + func (q *CommissionQuery) WithSum(relation, column string) *CommissionQuery + func (q *CommissionQuery) Without(relations ...string) *CommissionQuery + func (q *CommissionQuery) WithoutGlobalScope(identifier string) *CommissionQuery + func (q *CommissionQuery) WithoutGlobalScopes(identifiers ...string) *CommissionQuery + type CommissionRow struct + Affiliate string + AffiliateURL string + Amount string + AmountSort string + Buyer string + Date string + ID string + Level int + Order string + Product string + Rate string + Reason string + ReverseURL string + Reversible bool + Status string + StatusKey string + type CommissionStatus string + const CommissionAvailable + const CommissionReversed + type CommissionView struct + Affiliate *Affiliate + Commission Commission + Conversion *Conversion + type CommissionsQuery struct + AffiliateID string + Dir string + From Day + Level int + Page int + PerPage int + Sort string + Status CommissionStatus + To Day + type Config struct + CookieName string + LandingPath string + Location *time.Location + PageSize int + Prefix string + ReferralPath string + SecureCookie bool + Tenant string + Translator *translation.Translator + Wallet *wallet.WalletService + func (c Config) Validate() error + type Conversion struct + AffiliateID string + Amount int64 + BuyerUserID string + CreatedAt time.Time + ID string + OccurredAt time.Time + OrderRef string + PlanID string + ProductID string + Renewal Flag + Status ConversionStatus + TenantID string + UpdatedAt time.Time + func (row *Conversion) Fresh(ctx context.Context, g auth.Grant, with ...string) (*Conversion, error) + func (row *Conversion) Replicate(except ...string) (*Conversion, error) + type ConversionCollection []*Conversion + func ConversionCollectionOf(rows model.Rows) ConversionCollection + func (c ConversionCollection) Contains(key any) bool + func (c ConversionCollection) Except(keys ...any) ConversionCollection + func (c ConversionCollection) Find(key any) *Conversion + func (c ConversionCollection) FindOrFail(key any) (*Conversion, error) + func (c ConversionCollection) Fresh(ctx context.Context, g auth.Grant, with ...string) (ConversionCollection, error) + func (c ConversionCollection) Load(ctx context.Context, g auth.Grant, relations ...string) error + func (c ConversionCollection) LoadCount(ctx context.Context, g auth.Grant, relations ...string) error + func (c ConversionCollection) LoadMissing(ctx context.Context, g auth.Grant, relations ...string) error + func (c ConversionCollection) ModelKeys() []any + func (c ConversionCollection) Only(keys ...any) ConversionCollection + func (c ConversionCollection) Pluck(column string) []any + func (c ConversionCollection) Rows() model.Rows + func (c ConversionCollection) ToArray() []map[string]any + func (c ConversionCollection) Unique() ConversionCollection + type ConversionQuery struct + func Conversions(db model.DB) *ConversionQuery + func (q *ConversionQuery) AddSelect(columns ...any) *ConversionQuery + func (q *ConversionQuery) Avg(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *ConversionQuery) Base() *model.Builder + func (q *ConversionQuery) Chunk(ctx context.Context, g auth.Grant, count int, ...) error + func (q *ConversionQuery) Clone() *ConversionQuery + func (q *ConversionQuery) Count(ctx context.Context, g auth.Grant, columns ...any) (int64, error) + func (q *ConversionQuery) Create(ctx context.Context, g auth.Grant, attributes map[string]any) (*Conversion, error) + func (q *ConversionQuery) Cursor(ctx context.Context, g auth.Grant) iter.Seq2[*Conversion, error] + func (q *ConversionQuery) CursorPaginate(ctx context.Context, g auth.Grant, perPage int, cursor *pagination.Cursor, ...) (ConversionCollection, *pagination.CursorPage, error) + func (q *ConversionQuery) Decrement(ctx context.Context, g auth.Grant, column string, amount any, ...) (int64, error) + func (q *ConversionQuery) Delete(ctx context.Context, g auth.Grant) (int64, error) + func (q *ConversionQuery) DoesntExist(ctx context.Context, g auth.Grant) (bool, error) + func (q *ConversionQuery) DoesntHave(relation, boolean string, callback func(*query.Builder)) *ConversionQuery + func (q *ConversionQuery) Each(ctx context.Context, g auth.Grant, count int, ...) error + func (q *ConversionQuery) Exists(ctx context.Context, g auth.Grant) (bool, error) + func (q *ConversionQuery) Find(ctx context.Context, g auth.Grant, id any, columns ...any) (*Conversion, error) + func (q *ConversionQuery) FindMany(ctx context.Context, g auth.Grant, ids []any, columns ...any) (ConversionCollection, error) + func (q *ConversionQuery) FindOrFail(ctx context.Context, g auth.Grant, id any, columns ...any) (*Conversion, error) + func (q *ConversionQuery) FindOrNew(ctx context.Context, g auth.Grant, id any, columns ...any) (*Conversion, error) + func (q *ConversionQuery) First(ctx context.Context, g auth.Grant, columns ...any) (*Conversion, error) + func (q *ConversionQuery) FirstOrCreate(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*Conversion, error) + func (q *ConversionQuery) FirstOrFail(ctx context.Context, g auth.Grant, columns ...any) (*Conversion, error) + func (q *ConversionQuery) FirstOrNew(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*Conversion, error) + func (q *ConversionQuery) FirstWhere(ctx context.Context, g auth.Grant, column any, args ...any) (*Conversion, error) + func (q *ConversionQuery) ForPage(page, perPage int) *ConversionQuery + func (q *ConversionQuery) ForceCreate(ctx context.Context, g auth.Grant, attributes map[string]any) (*Conversion, error) + func (q *ConversionQuery) Get(ctx context.Context, g auth.Grant, columns ...any) (ConversionCollection, error) + func (q *ConversionQuery) GroupBy(groups ...any) *ConversionQuery + func (q *ConversionQuery) Has(relation, operator string, count int, boolean string, ...) *ConversionQuery + func (q *ConversionQuery) Increment(ctx context.Context, g auth.Grant, column string, amount any, ...) (int64, error) + func (q *ConversionQuery) Insert(ctx context.Context, g auth.Grant, values ...map[string]any) (bool, error) + func (q *ConversionQuery) InsertOrIgnore(ctx context.Context, g auth.Grant, values ...map[string]any) (bool, error) + func (q *ConversionQuery) Join(table any, first any, args ...any) *ConversionQuery + func (q *ConversionQuery) Latest(column ...string) *ConversionQuery + func (q *ConversionQuery) Limit(value int) *ConversionQuery + func (q *ConversionQuery) Max(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *ConversionQuery) Min(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *ConversionQuery) New() (*Conversion, error) + func (q *ConversionQuery) Offset(value int) *ConversionQuery + func (q *ConversionQuery) Oldest(column ...string) *ConversionQuery + func (q *ConversionQuery) OrDoesntHave(relation string) *ConversionQuery + func (q *ConversionQuery) OrHas(relation, operator string, count int) *ConversionQuery + func (q *ConversionQuery) OrWhere(column any, args ...any) *ConversionQuery + func (q *ConversionQuery) OrWhereDoesntHave(relation string, callback func(*query.Builder)) *ConversionQuery + func (q *ConversionQuery) OrWhereHas(relation string, callback func(*query.Builder)) *ConversionQuery + func (q *ConversionQuery) OrWhereNot(column any, args ...any) *ConversionQuery + func (q *ConversionQuery) OrWhereRelation(relation string, column any, args ...any) *ConversionQuery + func (q *ConversionQuery) OrderBy(column any, direction ...string) *ConversionQuery + func (q *ConversionQuery) OrderByDesc(column any) *ConversionQuery + func (q *ConversionQuery) Paginate(ctx context.Context, g auth.Grant, perPage, page int, opts pagination.Options, ...) (ConversionCollection, *pagination.LengthAwarePage, error) + func (q *ConversionQuery) Pluck(ctx context.Context, g auth.Grant, column string) ([]any, error) + func (q *ConversionQuery) Select(columns ...any) *ConversionQuery + func (q *ConversionQuery) SelectRaw(expression string, bindings ...any) *ConversionQuery + func (q *ConversionQuery) SimplePaginate(ctx context.Context, g auth.Grant, perPage, page int, opts pagination.Options, ...) (ConversionCollection, *pagination.Page, error) + func (q *ConversionQuery) Sole(ctx context.Context, g auth.Grant, columns ...any) (*Conversion, error) + func (q *ConversionQuery) SoleValue(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *ConversionQuery) Sum(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *ConversionQuery) Touch(ctx context.Context, g auth.Grant, column ...string) (int64, error) + func (q *ConversionQuery) Update(ctx context.Context, g auth.Grant, values map[string]any) (int64, error) + func (q *ConversionQuery) UpdateOrCreate(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*Conversion, error) + func (q *ConversionQuery) Upsert(ctx context.Context, g auth.Grant, values []map[string]any, ...) (int64, error) + func (q *ConversionQuery) Value(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *ConversionQuery) ValueOrFail(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *ConversionQuery) Where(column any, args ...any) *ConversionQuery + func (q *ConversionQuery) WhereBelongsTo(relationshipName string, related ...model.Entity) *ConversionQuery + func (q *ConversionQuery) WhereBetween(column any, from, to any) *ConversionQuery + func (q *ConversionQuery) WhereColumn(first any, args ...any) *ConversionQuery + func (q *ConversionQuery) WhereDoesntHave(relation string, callback func(*query.Builder)) *ConversionQuery + func (q *ConversionQuery) WhereExists(callback func(*query.Builder)) *ConversionQuery + func (q *ConversionQuery) WhereHas(relation string, callback func(*query.Builder)) *ConversionQuery + func (q *ConversionQuery) WhereHasCount(relation string, callback func(*query.Builder), operator string, count int) *ConversionQuery + func (q *ConversionQuery) WhereIn(column any, values []any) *ConversionQuery + func (q *ConversionQuery) WhereKey(id any) *ConversionQuery + func (q *ConversionQuery) WhereNot(column any, args ...any) *ConversionQuery + func (q *ConversionQuery) WhereNotExists(callback func(*query.Builder)) *ConversionQuery + func (q *ConversionQuery) WhereNotIn(column any, values []any) *ConversionQuery + func (q *ConversionQuery) WhereNotNull(columns ...any) *ConversionQuery + func (q *ConversionQuery) WhereNull(columns ...any) *ConversionQuery + func (q *ConversionQuery) WhereRelation(relation string, column any, args ...any) *ConversionQuery + func (q *ConversionQuery) With(relations ...string) *ConversionQuery + func (q *ConversionQuery) WithAvg(relation, column string) *ConversionQuery + func (q *ConversionQuery) WithCount(relations ...string) *ConversionQuery + func (q *ConversionQuery) WithExists(relation string) *ConversionQuery + func (q *ConversionQuery) WithMax(relation, column string) *ConversionQuery + func (q *ConversionQuery) WithMin(relation, column string) *ConversionQuery + func (q *ConversionQuery) WithSum(relation, column string) *ConversionQuery + func (q *ConversionQuery) Without(relations ...string) *ConversionQuery + func (q *ConversionQuery) WithoutGlobalScope(identifier string) *ConversionQuery + func (q *ConversionQuery) WithoutGlobalScopes(identifiers ...string) *ConversionQuery + type ConversionRequest struct + Amount int64 + BuyerUserID string + OccurredAt time.Time + OrderRef string + ProductID string + Renewal bool + func (r ConversionRequest) Validate() validation.Errors + type ConversionStatus string + const ConversionCounted + const ConversionRefunded + type CreateRequest struct + Code string + Document string + Name string + UserID string + func (r CreateRequest) Validate() validation.Errors + type DashboardPageData struct + AccountURL string + Accounts []AccountOption + Available string + Balance string + Blocked bool + Clicks int64 + Code string + Commissions string + Document string + From string + Held string + Level string + Link string + Max string + Min string + Name string + Negative bool + Plan *PlanRow + Rows []CommissionRow + Sales int64 + Signups int64 + Status string + Table TableState + To string + WithdrawURL string + Withdrawals []WithdrawalRow + type Day string + func DayOf(t time.Time, loc *time.Location) Day + func ParseDay(s string) (Day, error) + func (d Day) IsZero() bool + func (d Day) Time() time.Time + type Flag bool + func (f *Flag) Scan(value any) error + func (f Flag) Value() (driver.Value, error) + type FormState struct + func (f FormState) FieldError(name string) string + type Labels struct + Locale string + func (l Labels) Status(s string) string + func (l Labels) T(key string) string + type LevelRow struct + Level int + Rate string + type Module struct + func New(cfg Config, db *data.DB, sessions *security.SessionStore) (*Module, error) + func (m *Module) Boot(context.Context) error + func (m *Module) CodeFrom(r *stdhttp.Request) string + func (m *Module) Labels(locale string) Labels + func (m *Module) Migrations() []foundation.Migration + func (m *Module) Name() string + func (m *Module) Publishes() []foundation.Publication + func (m *Module) Routes(r *fhttp.Router) + func (m *Module) Service() *AffiliateService + type OptionalText string + func (t *OptionalText) Scan(value any) error + func (t OptionalText) Value() (driver.Value, error) + type Plan struct + Active Flag + CookieDays int + CreatedAt time.Time + CreatedBy string + ID string + Kind PlanKind + MaxWithdrawal int64 + MinWithdrawal int64 + Name string + TenantID string + UpdatedAt time.Time + func (row *Plan) Fresh(ctx context.Context, g auth.Grant, with ...string) (*Plan, error) + func (row *Plan) Replicate(except ...string) (*Plan, error) + type PlanCollection []*Plan + func PlanCollectionOf(rows model.Rows) PlanCollection + func (c PlanCollection) Contains(key any) bool + func (c PlanCollection) Except(keys ...any) PlanCollection + func (c PlanCollection) Find(key any) *Plan + func (c PlanCollection) FindOrFail(key any) (*Plan, error) + func (c PlanCollection) Fresh(ctx context.Context, g auth.Grant, with ...string) (PlanCollection, error) + func (c PlanCollection) Load(ctx context.Context, g auth.Grant, relations ...string) error + func (c PlanCollection) LoadCount(ctx context.Context, g auth.Grant, relations ...string) error + func (c PlanCollection) LoadMissing(ctx context.Context, g auth.Grant, relations ...string) error + func (c PlanCollection) ModelKeys() []any + func (c PlanCollection) Only(keys ...any) PlanCollection + func (c PlanCollection) Pluck(column string) []any + func (c PlanCollection) Rows() model.Rows + func (c PlanCollection) ToArray() []map[string]any + func (c PlanCollection) Unique() PlanCollection + type PlanKind string + const Linear + const Multilevel + type PlanLevel struct + CreatedAt time.Time + ID string + Level int + PlanID string + RateBps int64 + TenantID string + UpdatedAt time.Time + func (row *PlanLevel) Fresh(ctx context.Context, g auth.Grant, with ...string) (*PlanLevel, error) + func (row *PlanLevel) Replicate(except ...string) (*PlanLevel, error) + type PlanLevelCollection []*PlanLevel + func PlanLevelCollectionOf(rows model.Rows) PlanLevelCollection + func (c PlanLevelCollection) Contains(key any) bool + func (c PlanLevelCollection) Except(keys ...any) PlanLevelCollection + func (c PlanLevelCollection) Find(key any) *PlanLevel + func (c PlanLevelCollection) FindOrFail(key any) (*PlanLevel, error) + func (c PlanLevelCollection) Fresh(ctx context.Context, g auth.Grant, with ...string) (PlanLevelCollection, error) + func (c PlanLevelCollection) Load(ctx context.Context, g auth.Grant, relations ...string) error + func (c PlanLevelCollection) LoadCount(ctx context.Context, g auth.Grant, relations ...string) error + func (c PlanLevelCollection) LoadMissing(ctx context.Context, g auth.Grant, relations ...string) error + func (c PlanLevelCollection) ModelKeys() []any + func (c PlanLevelCollection) Only(keys ...any) PlanLevelCollection + func (c PlanLevelCollection) Pluck(column string) []any + func (c PlanLevelCollection) Rows() model.Rows + func (c PlanLevelCollection) ToArray() []map[string]any + func (c PlanLevelCollection) Unique() PlanLevelCollection + type PlanLevelQuery struct + func PlanLevels(db model.DB) *PlanLevelQuery + func (q *PlanLevelQuery) AddSelect(columns ...any) *PlanLevelQuery + func (q *PlanLevelQuery) Avg(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *PlanLevelQuery) Base() *model.Builder + func (q *PlanLevelQuery) Chunk(ctx context.Context, g auth.Grant, count int, ...) error + func (q *PlanLevelQuery) Clone() *PlanLevelQuery + func (q *PlanLevelQuery) Count(ctx context.Context, g auth.Grant, columns ...any) (int64, error) + func (q *PlanLevelQuery) Create(ctx context.Context, g auth.Grant, attributes map[string]any) (*PlanLevel, error) + func (q *PlanLevelQuery) Cursor(ctx context.Context, g auth.Grant) iter.Seq2[*PlanLevel, error] + func (q *PlanLevelQuery) CursorPaginate(ctx context.Context, g auth.Grant, perPage int, cursor *pagination.Cursor, ...) (PlanLevelCollection, *pagination.CursorPage, error) + func (q *PlanLevelQuery) Decrement(ctx context.Context, g auth.Grant, column string, amount any, ...) (int64, error) + func (q *PlanLevelQuery) Delete(ctx context.Context, g auth.Grant) (int64, error) + func (q *PlanLevelQuery) DoesntExist(ctx context.Context, g auth.Grant) (bool, error) + func (q *PlanLevelQuery) DoesntHave(relation, boolean string, callback func(*query.Builder)) *PlanLevelQuery + func (q *PlanLevelQuery) Each(ctx context.Context, g auth.Grant, count int, ...) error + func (q *PlanLevelQuery) Exists(ctx context.Context, g auth.Grant) (bool, error) + func (q *PlanLevelQuery) Find(ctx context.Context, g auth.Grant, id any, columns ...any) (*PlanLevel, error) + func (q *PlanLevelQuery) FindMany(ctx context.Context, g auth.Grant, ids []any, columns ...any) (PlanLevelCollection, error) + func (q *PlanLevelQuery) FindOrFail(ctx context.Context, g auth.Grant, id any, columns ...any) (*PlanLevel, error) + func (q *PlanLevelQuery) FindOrNew(ctx context.Context, g auth.Grant, id any, columns ...any) (*PlanLevel, error) + func (q *PlanLevelQuery) First(ctx context.Context, g auth.Grant, columns ...any) (*PlanLevel, error) + func (q *PlanLevelQuery) FirstOrCreate(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*PlanLevel, error) + func (q *PlanLevelQuery) FirstOrFail(ctx context.Context, g auth.Grant, columns ...any) (*PlanLevel, error) + func (q *PlanLevelQuery) FirstOrNew(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*PlanLevel, error) + func (q *PlanLevelQuery) FirstWhere(ctx context.Context, g auth.Grant, column any, args ...any) (*PlanLevel, error) + func (q *PlanLevelQuery) ForPage(page, perPage int) *PlanLevelQuery + func (q *PlanLevelQuery) ForceCreate(ctx context.Context, g auth.Grant, attributes map[string]any) (*PlanLevel, error) + func (q *PlanLevelQuery) Get(ctx context.Context, g auth.Grant, columns ...any) (PlanLevelCollection, error) + func (q *PlanLevelQuery) GroupBy(groups ...any) *PlanLevelQuery + func (q *PlanLevelQuery) Has(relation, operator string, count int, boolean string, ...) *PlanLevelQuery + func (q *PlanLevelQuery) Increment(ctx context.Context, g auth.Grant, column string, amount any, ...) (int64, error) + func (q *PlanLevelQuery) Insert(ctx context.Context, g auth.Grant, values ...map[string]any) (bool, error) + func (q *PlanLevelQuery) InsertOrIgnore(ctx context.Context, g auth.Grant, values ...map[string]any) (bool, error) + func (q *PlanLevelQuery) Join(table any, first any, args ...any) *PlanLevelQuery + func (q *PlanLevelQuery) Latest(column ...string) *PlanLevelQuery + func (q *PlanLevelQuery) Limit(value int) *PlanLevelQuery + func (q *PlanLevelQuery) Max(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *PlanLevelQuery) Min(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *PlanLevelQuery) New() (*PlanLevel, error) + func (q *PlanLevelQuery) Offset(value int) *PlanLevelQuery + func (q *PlanLevelQuery) Oldest(column ...string) *PlanLevelQuery + func (q *PlanLevelQuery) OrDoesntHave(relation string) *PlanLevelQuery + func (q *PlanLevelQuery) OrHas(relation, operator string, count int) *PlanLevelQuery + func (q *PlanLevelQuery) OrWhere(column any, args ...any) *PlanLevelQuery + func (q *PlanLevelQuery) OrWhereDoesntHave(relation string, callback func(*query.Builder)) *PlanLevelQuery + func (q *PlanLevelQuery) OrWhereHas(relation string, callback func(*query.Builder)) *PlanLevelQuery + func (q *PlanLevelQuery) OrWhereNot(column any, args ...any) *PlanLevelQuery + func (q *PlanLevelQuery) OrWhereRelation(relation string, column any, args ...any) *PlanLevelQuery + func (q *PlanLevelQuery) OrderBy(column any, direction ...string) *PlanLevelQuery + func (q *PlanLevelQuery) OrderByDesc(column any) *PlanLevelQuery + func (q *PlanLevelQuery) Paginate(ctx context.Context, g auth.Grant, perPage, page int, opts pagination.Options, ...) (PlanLevelCollection, *pagination.LengthAwarePage, error) + func (q *PlanLevelQuery) Pluck(ctx context.Context, g auth.Grant, column string) ([]any, error) + func (q *PlanLevelQuery) Select(columns ...any) *PlanLevelQuery + func (q *PlanLevelQuery) SelectRaw(expression string, bindings ...any) *PlanLevelQuery + func (q *PlanLevelQuery) SimplePaginate(ctx context.Context, g auth.Grant, perPage, page int, opts pagination.Options, ...) (PlanLevelCollection, *pagination.Page, error) + func (q *PlanLevelQuery) Sole(ctx context.Context, g auth.Grant, columns ...any) (*PlanLevel, error) + func (q *PlanLevelQuery) SoleValue(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *PlanLevelQuery) Sum(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *PlanLevelQuery) Touch(ctx context.Context, g auth.Grant, column ...string) (int64, error) + func (q *PlanLevelQuery) Update(ctx context.Context, g auth.Grant, values map[string]any) (int64, error) + func (q *PlanLevelQuery) UpdateOrCreate(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*PlanLevel, error) + func (q *PlanLevelQuery) Upsert(ctx context.Context, g auth.Grant, values []map[string]any, ...) (int64, error) + func (q *PlanLevelQuery) Value(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *PlanLevelQuery) ValueOrFail(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *PlanLevelQuery) Where(column any, args ...any) *PlanLevelQuery + func (q *PlanLevelQuery) WhereBelongsTo(relationshipName string, related ...model.Entity) *PlanLevelQuery + func (q *PlanLevelQuery) WhereBetween(column any, from, to any) *PlanLevelQuery + func (q *PlanLevelQuery) WhereColumn(first any, args ...any) *PlanLevelQuery + func (q *PlanLevelQuery) WhereDoesntHave(relation string, callback func(*query.Builder)) *PlanLevelQuery + func (q *PlanLevelQuery) WhereExists(callback func(*query.Builder)) *PlanLevelQuery + func (q *PlanLevelQuery) WhereHas(relation string, callback func(*query.Builder)) *PlanLevelQuery + func (q *PlanLevelQuery) WhereHasCount(relation string, callback func(*query.Builder), operator string, count int) *PlanLevelQuery + func (q *PlanLevelQuery) WhereIn(column any, values []any) *PlanLevelQuery + func (q *PlanLevelQuery) WhereKey(id any) *PlanLevelQuery + func (q *PlanLevelQuery) WhereNot(column any, args ...any) *PlanLevelQuery + func (q *PlanLevelQuery) WhereNotExists(callback func(*query.Builder)) *PlanLevelQuery + func (q *PlanLevelQuery) WhereNotIn(column any, values []any) *PlanLevelQuery + func (q *PlanLevelQuery) WhereNotNull(columns ...any) *PlanLevelQuery + func (q *PlanLevelQuery) WhereNull(columns ...any) *PlanLevelQuery + func (q *PlanLevelQuery) WhereRelation(relation string, column any, args ...any) *PlanLevelQuery + func (q *PlanLevelQuery) With(relations ...string) *PlanLevelQuery + func (q *PlanLevelQuery) WithAvg(relation, column string) *PlanLevelQuery + func (q *PlanLevelQuery) WithCount(relations ...string) *PlanLevelQuery + func (q *PlanLevelQuery) WithExists(relation string) *PlanLevelQuery + func (q *PlanLevelQuery) WithMax(relation, column string) *PlanLevelQuery + func (q *PlanLevelQuery) WithMin(relation, column string) *PlanLevelQuery + func (q *PlanLevelQuery) WithSum(relation, column string) *PlanLevelQuery + func (q *PlanLevelQuery) Without(relations ...string) *PlanLevelQuery + func (q *PlanLevelQuery) WithoutGlobalScope(identifier string) *PlanLevelQuery + func (q *PlanLevelQuery) WithoutGlobalScopes(identifiers ...string) *PlanLevelQuery + type PlanQuery struct + func Plans(db model.DB) *PlanQuery + func (q *PlanQuery) AddSelect(columns ...any) *PlanQuery + func (q *PlanQuery) Avg(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *PlanQuery) Base() *model.Builder + func (q *PlanQuery) Chunk(ctx context.Context, g auth.Grant, count int, ...) error + func (q *PlanQuery) Clone() *PlanQuery + func (q *PlanQuery) Count(ctx context.Context, g auth.Grant, columns ...any) (int64, error) + func (q *PlanQuery) Create(ctx context.Context, g auth.Grant, attributes map[string]any) (*Plan, error) + func (q *PlanQuery) Cursor(ctx context.Context, g auth.Grant) iter.Seq2[*Plan, error] + func (q *PlanQuery) CursorPaginate(ctx context.Context, g auth.Grant, perPage int, cursor *pagination.Cursor, ...) (PlanCollection, *pagination.CursorPage, error) + func (q *PlanQuery) Decrement(ctx context.Context, g auth.Grant, column string, amount any, ...) (int64, error) + func (q *PlanQuery) Delete(ctx context.Context, g auth.Grant) (int64, error) + func (q *PlanQuery) DoesntExist(ctx context.Context, g auth.Grant) (bool, error) + func (q *PlanQuery) DoesntHave(relation, boolean string, callback func(*query.Builder)) *PlanQuery + func (q *PlanQuery) Each(ctx context.Context, g auth.Grant, count int, ...) error + func (q *PlanQuery) Exists(ctx context.Context, g auth.Grant) (bool, error) + func (q *PlanQuery) Find(ctx context.Context, g auth.Grant, id any, columns ...any) (*Plan, error) + func (q *PlanQuery) FindMany(ctx context.Context, g auth.Grant, ids []any, columns ...any) (PlanCollection, error) + func (q *PlanQuery) FindOrFail(ctx context.Context, g auth.Grant, id any, columns ...any) (*Plan, error) + func (q *PlanQuery) FindOrNew(ctx context.Context, g auth.Grant, id any, columns ...any) (*Plan, error) + func (q *PlanQuery) First(ctx context.Context, g auth.Grant, columns ...any) (*Plan, error) + func (q *PlanQuery) FirstOrCreate(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*Plan, error) + func (q *PlanQuery) FirstOrFail(ctx context.Context, g auth.Grant, columns ...any) (*Plan, error) + func (q *PlanQuery) FirstOrNew(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*Plan, error) + func (q *PlanQuery) FirstWhere(ctx context.Context, g auth.Grant, column any, args ...any) (*Plan, error) + func (q *PlanQuery) ForPage(page, perPage int) *PlanQuery + func (q *PlanQuery) ForceCreate(ctx context.Context, g auth.Grant, attributes map[string]any) (*Plan, error) + func (q *PlanQuery) Get(ctx context.Context, g auth.Grant, columns ...any) (PlanCollection, error) + func (q *PlanQuery) GroupBy(groups ...any) *PlanQuery + func (q *PlanQuery) Has(relation, operator string, count int, boolean string, ...) *PlanQuery + func (q *PlanQuery) Increment(ctx context.Context, g auth.Grant, column string, amount any, ...) (int64, error) + func (q *PlanQuery) Insert(ctx context.Context, g auth.Grant, values ...map[string]any) (bool, error) + func (q *PlanQuery) InsertOrIgnore(ctx context.Context, g auth.Grant, values ...map[string]any) (bool, error) + func (q *PlanQuery) Join(table any, first any, args ...any) *PlanQuery + func (q *PlanQuery) Latest(column ...string) *PlanQuery + func (q *PlanQuery) Limit(value int) *PlanQuery + func (q *PlanQuery) Max(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *PlanQuery) Min(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *PlanQuery) New() (*Plan, error) + func (q *PlanQuery) Offset(value int) *PlanQuery + func (q *PlanQuery) Oldest(column ...string) *PlanQuery + func (q *PlanQuery) OrDoesntHave(relation string) *PlanQuery + func (q *PlanQuery) OrHas(relation, operator string, count int) *PlanQuery + func (q *PlanQuery) OrWhere(column any, args ...any) *PlanQuery + func (q *PlanQuery) OrWhereDoesntHave(relation string, callback func(*query.Builder)) *PlanQuery + func (q *PlanQuery) OrWhereHas(relation string, callback func(*query.Builder)) *PlanQuery + func (q *PlanQuery) OrWhereNot(column any, args ...any) *PlanQuery + func (q *PlanQuery) OrWhereRelation(relation string, column any, args ...any) *PlanQuery + func (q *PlanQuery) OrderBy(column any, direction ...string) *PlanQuery + func (q *PlanQuery) OrderByDesc(column any) *PlanQuery + func (q *PlanQuery) Paginate(ctx context.Context, g auth.Grant, perPage, page int, opts pagination.Options, ...) (PlanCollection, *pagination.LengthAwarePage, error) + func (q *PlanQuery) Pluck(ctx context.Context, g auth.Grant, column string) ([]any, error) + func (q *PlanQuery) Select(columns ...any) *PlanQuery + func (q *PlanQuery) SelectRaw(expression string, bindings ...any) *PlanQuery + func (q *PlanQuery) SimplePaginate(ctx context.Context, g auth.Grant, perPage, page int, opts pagination.Options, ...) (PlanCollection, *pagination.Page, error) + func (q *PlanQuery) Sole(ctx context.Context, g auth.Grant, columns ...any) (*Plan, error) + func (q *PlanQuery) SoleValue(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *PlanQuery) Sum(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *PlanQuery) Touch(ctx context.Context, g auth.Grant, column ...string) (int64, error) + func (q *PlanQuery) Update(ctx context.Context, g auth.Grant, values map[string]any) (int64, error) + func (q *PlanQuery) UpdateOrCreate(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*Plan, error) + func (q *PlanQuery) Upsert(ctx context.Context, g auth.Grant, values []map[string]any, ...) (int64, error) + func (q *PlanQuery) Value(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *PlanQuery) ValueOrFail(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *PlanQuery) Where(column any, args ...any) *PlanQuery + func (q *PlanQuery) WhereBelongsTo(relationshipName string, related ...model.Entity) *PlanQuery + func (q *PlanQuery) WhereBetween(column any, from, to any) *PlanQuery + func (q *PlanQuery) WhereColumn(first any, args ...any) *PlanQuery + func (q *PlanQuery) WhereDoesntHave(relation string, callback func(*query.Builder)) *PlanQuery + func (q *PlanQuery) WhereExists(callback func(*query.Builder)) *PlanQuery + func (q *PlanQuery) WhereHas(relation string, callback func(*query.Builder)) *PlanQuery + func (q *PlanQuery) WhereHasCount(relation string, callback func(*query.Builder), operator string, count int) *PlanQuery + func (q *PlanQuery) WhereIn(column any, values []any) *PlanQuery + func (q *PlanQuery) WhereKey(id any) *PlanQuery + func (q *PlanQuery) WhereNot(column any, args ...any) *PlanQuery + func (q *PlanQuery) WhereNotExists(callback func(*query.Builder)) *PlanQuery + func (q *PlanQuery) WhereNotIn(column any, values []any) *PlanQuery + func (q *PlanQuery) WhereNotNull(columns ...any) *PlanQuery + func (q *PlanQuery) WhereNull(columns ...any) *PlanQuery + func (q *PlanQuery) WhereRelation(relation string, column any, args ...any) *PlanQuery + func (q *PlanQuery) With(relations ...string) *PlanQuery + func (q *PlanQuery) WithAvg(relation, column string) *PlanQuery + func (q *PlanQuery) WithCount(relations ...string) *PlanQuery + func (q *PlanQuery) WithExists(relation string) *PlanQuery + func (q *PlanQuery) WithMax(relation, column string) *PlanQuery + func (q *PlanQuery) WithMin(relation, column string) *PlanQuery + func (q *PlanQuery) WithSum(relation, column string) *PlanQuery + func (q *PlanQuery) Without(relations ...string) *PlanQuery + func (q *PlanQuery) WithoutGlobalScope(identifier string) *PlanQuery + func (q *PlanQuery) WithoutGlobalScopes(identifiers ...string) *PlanQuery + type PlanRequest struct + CookieDays int + Kind PlanKind + MaxWithdrawal int64 + MinWithdrawal int64 + Name string + Rates []int64 + func (r PlanRequest) Validate() validation.Errors + type PlanRow struct + ActivateURL string + Active bool + CookieDays int + Created string + ID string + Kind string + KindKey string + Levels []LevelRow + Max string + Min string + Name string + type PlanView struct + Levels []PlanLevel + Plan Plan + func (p PlanView) Rate(level int) int64 + type Referral struct + AffiliateID string + Code string + CreatedAt time.Time + Document OptionalText + ID string + TenantID string + UpdatedAt time.Time + UserID string + func (row *Referral) Fresh(ctx context.Context, g auth.Grant, with ...string) (*Referral, error) + func (row *Referral) Replicate(except ...string) (*Referral, error) + type ReferralCollection []*Referral + func ReferralCollectionOf(rows model.Rows) ReferralCollection + func (c ReferralCollection) Contains(key any) bool + func (c ReferralCollection) Except(keys ...any) ReferralCollection + func (c ReferralCollection) Find(key any) *Referral + func (c ReferralCollection) FindOrFail(key any) (*Referral, error) + func (c ReferralCollection) Fresh(ctx context.Context, g auth.Grant, with ...string) (ReferralCollection, error) + func (c ReferralCollection) Load(ctx context.Context, g auth.Grant, relations ...string) error + func (c ReferralCollection) LoadCount(ctx context.Context, g auth.Grant, relations ...string) error + func (c ReferralCollection) LoadMissing(ctx context.Context, g auth.Grant, relations ...string) error + func (c ReferralCollection) ModelKeys() []any + func (c ReferralCollection) Only(keys ...any) ReferralCollection + func (c ReferralCollection) Pluck(column string) []any + func (c ReferralCollection) Rows() model.Rows + func (c ReferralCollection) ToArray() []map[string]any + func (c ReferralCollection) Unique() ReferralCollection + type ReferralQuery struct + func Referrals(db model.DB) *ReferralQuery + func (q *ReferralQuery) AddSelect(columns ...any) *ReferralQuery + func (q *ReferralQuery) Avg(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *ReferralQuery) Base() *model.Builder + func (q *ReferralQuery) Chunk(ctx context.Context, g auth.Grant, count int, ...) error + func (q *ReferralQuery) Clone() *ReferralQuery + func (q *ReferralQuery) Count(ctx context.Context, g auth.Grant, columns ...any) (int64, error) + func (q *ReferralQuery) Create(ctx context.Context, g auth.Grant, attributes map[string]any) (*Referral, error) + func (q *ReferralQuery) Cursor(ctx context.Context, g auth.Grant) iter.Seq2[*Referral, error] + func (q *ReferralQuery) CursorPaginate(ctx context.Context, g auth.Grant, perPage int, cursor *pagination.Cursor, ...) (ReferralCollection, *pagination.CursorPage, error) + func (q *ReferralQuery) Decrement(ctx context.Context, g auth.Grant, column string, amount any, ...) (int64, error) + func (q *ReferralQuery) Delete(ctx context.Context, g auth.Grant) (int64, error) + func (q *ReferralQuery) DoesntExist(ctx context.Context, g auth.Grant) (bool, error) + func (q *ReferralQuery) DoesntHave(relation, boolean string, callback func(*query.Builder)) *ReferralQuery + func (q *ReferralQuery) Each(ctx context.Context, g auth.Grant, count int, ...) error + func (q *ReferralQuery) Exists(ctx context.Context, g auth.Grant) (bool, error) + func (q *ReferralQuery) Find(ctx context.Context, g auth.Grant, id any, columns ...any) (*Referral, error) + func (q *ReferralQuery) FindMany(ctx context.Context, g auth.Grant, ids []any, columns ...any) (ReferralCollection, error) + func (q *ReferralQuery) FindOrFail(ctx context.Context, g auth.Grant, id any, columns ...any) (*Referral, error) + func (q *ReferralQuery) FindOrNew(ctx context.Context, g auth.Grant, id any, columns ...any) (*Referral, error) + func (q *ReferralQuery) First(ctx context.Context, g auth.Grant, columns ...any) (*Referral, error) + func (q *ReferralQuery) FirstOrCreate(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*Referral, error) + func (q *ReferralQuery) FirstOrFail(ctx context.Context, g auth.Grant, columns ...any) (*Referral, error) + func (q *ReferralQuery) FirstOrNew(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*Referral, error) + func (q *ReferralQuery) FirstWhere(ctx context.Context, g auth.Grant, column any, args ...any) (*Referral, error) + func (q *ReferralQuery) ForPage(page, perPage int) *ReferralQuery + func (q *ReferralQuery) ForceCreate(ctx context.Context, g auth.Grant, attributes map[string]any) (*Referral, error) + func (q *ReferralQuery) Get(ctx context.Context, g auth.Grant, columns ...any) (ReferralCollection, error) + func (q *ReferralQuery) GroupBy(groups ...any) *ReferralQuery + func (q *ReferralQuery) Has(relation, operator string, count int, boolean string, ...) *ReferralQuery + func (q *ReferralQuery) Increment(ctx context.Context, g auth.Grant, column string, amount any, ...) (int64, error) + func (q *ReferralQuery) Insert(ctx context.Context, g auth.Grant, values ...map[string]any) (bool, error) + func (q *ReferralQuery) InsertOrIgnore(ctx context.Context, g auth.Grant, values ...map[string]any) (bool, error) + func (q *ReferralQuery) Join(table any, first any, args ...any) *ReferralQuery + func (q *ReferralQuery) Latest(column ...string) *ReferralQuery + func (q *ReferralQuery) Limit(value int) *ReferralQuery + func (q *ReferralQuery) Max(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *ReferralQuery) Min(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *ReferralQuery) New() (*Referral, error) + func (q *ReferralQuery) Offset(value int) *ReferralQuery + func (q *ReferralQuery) Oldest(column ...string) *ReferralQuery + func (q *ReferralQuery) OrDoesntHave(relation string) *ReferralQuery + func (q *ReferralQuery) OrHas(relation, operator string, count int) *ReferralQuery + func (q *ReferralQuery) OrWhere(column any, args ...any) *ReferralQuery + func (q *ReferralQuery) OrWhereDoesntHave(relation string, callback func(*query.Builder)) *ReferralQuery + func (q *ReferralQuery) OrWhereHas(relation string, callback func(*query.Builder)) *ReferralQuery + func (q *ReferralQuery) OrWhereNot(column any, args ...any) *ReferralQuery + func (q *ReferralQuery) OrWhereRelation(relation string, column any, args ...any) *ReferralQuery + func (q *ReferralQuery) OrderBy(column any, direction ...string) *ReferralQuery + func (q *ReferralQuery) OrderByDesc(column any) *ReferralQuery + func (q *ReferralQuery) Paginate(ctx context.Context, g auth.Grant, perPage, page int, opts pagination.Options, ...) (ReferralCollection, *pagination.LengthAwarePage, error) + func (q *ReferralQuery) Pluck(ctx context.Context, g auth.Grant, column string) ([]any, error) + func (q *ReferralQuery) Select(columns ...any) *ReferralQuery + func (q *ReferralQuery) SelectRaw(expression string, bindings ...any) *ReferralQuery + func (q *ReferralQuery) SimplePaginate(ctx context.Context, g auth.Grant, perPage, page int, opts pagination.Options, ...) (ReferralCollection, *pagination.Page, error) + func (q *ReferralQuery) Sole(ctx context.Context, g auth.Grant, columns ...any) (*Referral, error) + func (q *ReferralQuery) SoleValue(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *ReferralQuery) Sum(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *ReferralQuery) Touch(ctx context.Context, g auth.Grant, column ...string) (int64, error) + func (q *ReferralQuery) Update(ctx context.Context, g auth.Grant, values map[string]any) (int64, error) + func (q *ReferralQuery) UpdateOrCreate(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*Referral, error) + func (q *ReferralQuery) Upsert(ctx context.Context, g auth.Grant, values []map[string]any, ...) (int64, error) + func (q *ReferralQuery) Value(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *ReferralQuery) ValueOrFail(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *ReferralQuery) Where(column any, args ...any) *ReferralQuery + func (q *ReferralQuery) WhereBelongsTo(relationshipName string, related ...model.Entity) *ReferralQuery + func (q *ReferralQuery) WhereBetween(column any, from, to any) *ReferralQuery + func (q *ReferralQuery) WhereColumn(first any, args ...any) *ReferralQuery + func (q *ReferralQuery) WhereDoesntHave(relation string, callback func(*query.Builder)) *ReferralQuery + func (q *ReferralQuery) WhereExists(callback func(*query.Builder)) *ReferralQuery + func (q *ReferralQuery) WhereHas(relation string, callback func(*query.Builder)) *ReferralQuery + func (q *ReferralQuery) WhereHasCount(relation string, callback func(*query.Builder), operator string, count int) *ReferralQuery + func (q *ReferralQuery) WhereIn(column any, values []any) *ReferralQuery + func (q *ReferralQuery) WhereKey(id any) *ReferralQuery + func (q *ReferralQuery) WhereNot(column any, args ...any) *ReferralQuery + func (q *ReferralQuery) WhereNotExists(callback func(*query.Builder)) *ReferralQuery + func (q *ReferralQuery) WhereNotIn(column any, values []any) *ReferralQuery + func (q *ReferralQuery) WhereNotNull(columns ...any) *ReferralQuery + func (q *ReferralQuery) WhereNull(columns ...any) *ReferralQuery + func (q *ReferralQuery) WhereRelation(relation string, column any, args ...any) *ReferralQuery + func (q *ReferralQuery) With(relations ...string) *ReferralQuery + func (q *ReferralQuery) WithAvg(relation, column string) *ReferralQuery + func (q *ReferralQuery) WithCount(relations ...string) *ReferralQuery + func (q *ReferralQuery) WithExists(relation string) *ReferralQuery + func (q *ReferralQuery) WithMax(relation, column string) *ReferralQuery + func (q *ReferralQuery) WithMin(relation, column string) *ReferralQuery + func (q *ReferralQuery) WithSum(relation, column string) *ReferralQuery + func (q *ReferralQuery) Without(relations ...string) *ReferralQuery + func (q *ReferralQuery) WithoutGlobalScope(identifier string) *ReferralQuery + func (q *ReferralQuery) WithoutGlobalScopes(identifiers ...string) *ReferralQuery + type Screen struct + Labels Labels + Prefix string + func (s Screen) AdminNav(current string) template.HTML + func (s Screen) AffiliateStatusOptions() []components.SelectOption + func (s Screen) CellForm(action, label, variant string, inputs ...CellInput) template.HTML + func (s Screen) CommissionStatusOptions() []components.SelectOption + func (s Screen) Form() FormState + func (s Screen) LevelOptions() []components.SelectOption + func (s Screen) PayoutKindOptions() []components.SelectOption + func (s Screen) PixKeyOptions() []components.SelectOption + func (s Screen) PlanKindOptions() []components.SelectOption + func (s Screen) TableLines() components.DataTableLines + func (s Screen) WithdrawalStatusOptions() []components.SelectOption + type Stats struct + Clicks int64 + Commissions int64 + Sales int64 + Signups int64 + type TableState struct + CurrentPage int + Dir string + Pages int + Query string + Sort string + Total int + URL string + type TreeNode struct + AffiliateID string + Code string + JoinedAt time.Time + Level int + Name string + ParentID string + Status AffiliateStatus + UserID string + type TreeRow struct + Code string + Joined string + Level int + Name string + Status string + URL string + User string + type WithdrawalDay struct + AffiliateID string + Attempt int + CreatedAt time.Time + Day Day + ID string + TenantID string + UpdatedAt time.Time + WithdrawalRequestID string + func (row *WithdrawalDay) Fresh(ctx context.Context, g auth.Grant, with ...string) (*WithdrawalDay, error) + func (row *WithdrawalDay) Replicate(except ...string) (*WithdrawalDay, error) + type WithdrawalDayCollection []*WithdrawalDay + func WithdrawalDayCollectionOf(rows model.Rows) WithdrawalDayCollection + func (c WithdrawalDayCollection) Contains(key any) bool + func (c WithdrawalDayCollection) Except(keys ...any) WithdrawalDayCollection + func (c WithdrawalDayCollection) Find(key any) *WithdrawalDay + func (c WithdrawalDayCollection) FindOrFail(key any) (*WithdrawalDay, error) + func (c WithdrawalDayCollection) Fresh(ctx context.Context, g auth.Grant, with ...string) (WithdrawalDayCollection, error) + func (c WithdrawalDayCollection) Load(ctx context.Context, g auth.Grant, relations ...string) error + func (c WithdrawalDayCollection) LoadCount(ctx context.Context, g auth.Grant, relations ...string) error + func (c WithdrawalDayCollection) LoadMissing(ctx context.Context, g auth.Grant, relations ...string) error + func (c WithdrawalDayCollection) ModelKeys() []any + func (c WithdrawalDayCollection) Only(keys ...any) WithdrawalDayCollection + func (c WithdrawalDayCollection) Pluck(column string) []any + func (c WithdrawalDayCollection) Rows() model.Rows + func (c WithdrawalDayCollection) ToArray() []map[string]any + func (c WithdrawalDayCollection) Unique() WithdrawalDayCollection + type WithdrawalDayQuery struct + func WithdrawalDays(db model.DB) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) AddSelect(columns ...any) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) Avg(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *WithdrawalDayQuery) Base() *model.Builder + func (q *WithdrawalDayQuery) Chunk(ctx context.Context, g auth.Grant, count int, ...) error + func (q *WithdrawalDayQuery) Clone() *WithdrawalDayQuery + func (q *WithdrawalDayQuery) Count(ctx context.Context, g auth.Grant, columns ...any) (int64, error) + func (q *WithdrawalDayQuery) Create(ctx context.Context, g auth.Grant, attributes map[string]any) (*WithdrawalDay, error) + func (q *WithdrawalDayQuery) Cursor(ctx context.Context, g auth.Grant) iter.Seq2[*WithdrawalDay, error] + func (q *WithdrawalDayQuery) CursorPaginate(ctx context.Context, g auth.Grant, perPage int, cursor *pagination.Cursor, ...) (WithdrawalDayCollection, *pagination.CursorPage, error) + func (q *WithdrawalDayQuery) Decrement(ctx context.Context, g auth.Grant, column string, amount any, ...) (int64, error) + func (q *WithdrawalDayQuery) Delete(ctx context.Context, g auth.Grant) (int64, error) + func (q *WithdrawalDayQuery) DoesntExist(ctx context.Context, g auth.Grant) (bool, error) + func (q *WithdrawalDayQuery) DoesntHave(relation, boolean string, callback func(*query.Builder)) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) Each(ctx context.Context, g auth.Grant, count int, ...) error + func (q *WithdrawalDayQuery) Exists(ctx context.Context, g auth.Grant) (bool, error) + func (q *WithdrawalDayQuery) Find(ctx context.Context, g auth.Grant, id any, columns ...any) (*WithdrawalDay, error) + func (q *WithdrawalDayQuery) FindMany(ctx context.Context, g auth.Grant, ids []any, columns ...any) (WithdrawalDayCollection, error) + func (q *WithdrawalDayQuery) FindOrFail(ctx context.Context, g auth.Grant, id any, columns ...any) (*WithdrawalDay, error) + func (q *WithdrawalDayQuery) FindOrNew(ctx context.Context, g auth.Grant, id any, columns ...any) (*WithdrawalDay, error) + func (q *WithdrawalDayQuery) First(ctx context.Context, g auth.Grant, columns ...any) (*WithdrawalDay, error) + func (q *WithdrawalDayQuery) FirstOrCreate(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*WithdrawalDay, error) + func (q *WithdrawalDayQuery) FirstOrFail(ctx context.Context, g auth.Grant, columns ...any) (*WithdrawalDay, error) + func (q *WithdrawalDayQuery) FirstOrNew(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*WithdrawalDay, error) + func (q *WithdrawalDayQuery) FirstWhere(ctx context.Context, g auth.Grant, column any, args ...any) (*WithdrawalDay, error) + func (q *WithdrawalDayQuery) ForPage(page, perPage int) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) ForceCreate(ctx context.Context, g auth.Grant, attributes map[string]any) (*WithdrawalDay, error) + func (q *WithdrawalDayQuery) Get(ctx context.Context, g auth.Grant, columns ...any) (WithdrawalDayCollection, error) + func (q *WithdrawalDayQuery) GroupBy(groups ...any) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) Has(relation, operator string, count int, boolean string, ...) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) Increment(ctx context.Context, g auth.Grant, column string, amount any, ...) (int64, error) + func (q *WithdrawalDayQuery) Insert(ctx context.Context, g auth.Grant, values ...map[string]any) (bool, error) + func (q *WithdrawalDayQuery) InsertOrIgnore(ctx context.Context, g auth.Grant, values ...map[string]any) (bool, error) + func (q *WithdrawalDayQuery) Join(table any, first any, args ...any) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) Latest(column ...string) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) Limit(value int) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) Max(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *WithdrawalDayQuery) Min(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *WithdrawalDayQuery) New() (*WithdrawalDay, error) + func (q *WithdrawalDayQuery) Offset(value int) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) Oldest(column ...string) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) OrDoesntHave(relation string) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) OrHas(relation, operator string, count int) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) OrWhere(column any, args ...any) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) OrWhereDoesntHave(relation string, callback func(*query.Builder)) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) OrWhereHas(relation string, callback func(*query.Builder)) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) OrWhereNot(column any, args ...any) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) OrWhereRelation(relation string, column any, args ...any) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) OrderBy(column any, direction ...string) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) OrderByDesc(column any) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) Paginate(ctx context.Context, g auth.Grant, perPage, page int, opts pagination.Options, ...) (WithdrawalDayCollection, *pagination.LengthAwarePage, error) + func (q *WithdrawalDayQuery) Pluck(ctx context.Context, g auth.Grant, column string) ([]any, error) + func (q *WithdrawalDayQuery) Select(columns ...any) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) SelectRaw(expression string, bindings ...any) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) SimplePaginate(ctx context.Context, g auth.Grant, perPage, page int, opts pagination.Options, ...) (WithdrawalDayCollection, *pagination.Page, error) + func (q *WithdrawalDayQuery) Sole(ctx context.Context, g auth.Grant, columns ...any) (*WithdrawalDay, error) + func (q *WithdrawalDayQuery) SoleValue(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *WithdrawalDayQuery) Sum(ctx context.Context, g auth.Grant, column any) (any, error) + func (q *WithdrawalDayQuery) Touch(ctx context.Context, g auth.Grant, column ...string) (int64, error) + func (q *WithdrawalDayQuery) Update(ctx context.Context, g auth.Grant, values map[string]any) (int64, error) + func (q *WithdrawalDayQuery) UpdateOrCreate(ctx context.Context, g auth.Grant, attributes, values map[string]any) (*WithdrawalDay, error) + func (q *WithdrawalDayQuery) Upsert(ctx context.Context, g auth.Grant, values []map[string]any, ...) (int64, error) + func (q *WithdrawalDayQuery) Value(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *WithdrawalDayQuery) ValueOrFail(ctx context.Context, g auth.Grant, column string) (any, error) + func (q *WithdrawalDayQuery) Where(column any, args ...any) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) WhereBelongsTo(relationshipName string, related ...model.Entity) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) WhereBetween(column any, from, to any) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) WhereColumn(first any, args ...any) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) WhereDoesntHave(relation string, callback func(*query.Builder)) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) WhereExists(callback func(*query.Builder)) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) WhereHas(relation string, callback func(*query.Builder)) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) WhereHasCount(relation string, callback func(*query.Builder), operator string, count int) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) WhereIn(column any, values []any) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) WhereKey(id any) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) WhereNot(column any, args ...any) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) WhereNotExists(callback func(*query.Builder)) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) WhereNotIn(column any, values []any) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) WhereNotNull(columns ...any) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) WhereNull(columns ...any) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) WhereRelation(relation string, column any, args ...any) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) With(relations ...string) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) WithAvg(relation, column string) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) WithCount(relations ...string) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) WithExists(relation string) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) WithMax(relation, column string) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) WithMin(relation, column string) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) WithSum(relation, column string) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) Without(relations ...string) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) WithoutGlobalScope(identifier string) *WithdrawalDayQuery + func (q *WithdrawalDayQuery) WithoutGlobalScopes(identifiers ...string) *WithdrawalDayQuery + type WithdrawalRequest struct + AccountID string + Amount int64 + type WithdrawalRow struct + Account string + Affiliate string + AffiliateURL string + Amount string + ID string + Open bool + Paid bool + PayURL string + ProcessURL string + Processing bool + Reason string + ReceiptURL string + RejectURL string + RequestedAt string + Status string + StatusKey string