Files
zeekay 1943f1c093 Hanzo Commerce
Multi-tenant commerce and billing: orders, subscriptions, invoices, plans,
usage metering and a credit ledger. One Go binary. MIT OR Apache-2.0.

Claude-Session: https://claude.ai/code/session_01SAtaDFm8VDiWrhYHNNtxMw
2026-09-23 21:52:16 -07:00

21 lines
539 B
Go

package affiliate
import (
"github.com/hanzoai/commerce/datastore"
"github.com/hanzoai/commerce/models/types/commission"
"github.com/hanzoai/commerce/models/types/country"
"github.com/hanzoai/commerce/util/fake"
)
func Fake(db *datastore.Datastore, userId string) *Affiliate {
aff := New(db)
aff.Name = fake.FullName()
aff.UserId = userId
aff.Company = fake.Company()
aff.Country = country.Fake()
aff.TaxId = fake.RandSeq(9, []rune("0123456789"))
aff.Commission = commission.Fake()
aff.CouponId = "TEST-COUPON"
return aff
}