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
23 lines
601 B
Go
23 lines
601 B
Go
package store
|
|
|
|
import (
|
|
"github.com/hanzoai/commerce/datastore"
|
|
"github.com/hanzoai/commerce/models/types/currency"
|
|
. "github.com/hanzoai/commerce/types"
|
|
"github.com/hanzoai/commerce/util/fake"
|
|
"github.com/hanzoai/commerce/util/slug"
|
|
)
|
|
|
|
func Fake(db *datastore.Datastore) *Store {
|
|
s := New(db)
|
|
s.Name = fake.Company()
|
|
s.Slug = slug.Slugify(s.Name)
|
|
s.Domain = s.Name + ".com"
|
|
s.Prefix = fake.Word()
|
|
s.Currency = currency.USD
|
|
s.Address = Address{Line1: fake.Street(), City: fake.City(), State: fake.State(), PostalCode: fake.Zip(), Country: "US"}
|
|
s.Email = fake.EmailAddress()
|
|
|
|
return s
|
|
}
|