mirror of
https://github.com/hanzoai/commerce.git
synced 2026-10-30 15:08:42 +00:00
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
21 lines
539 B
Go
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
|
|
}
|