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
25 lines
523 B
Go
25 lines
523 B
Go
package fixtures
|
|
|
|
import (
|
|
"github.com/zap-proto/zip"
|
|
|
|
"github.com/hanzoai/commerce/auth/password"
|
|
"github.com/hanzoai/commerce/models/user"
|
|
)
|
|
|
|
var UserCustomer = New("user-customer", func(c *zip.Ctx) *user.User {
|
|
db := getNamespaceDb(c)
|
|
|
|
// Such tees owner & operator
|
|
usr := user.New(db)
|
|
usr.Email = "[email protected]"
|
|
usr.GetOrCreate("Email=", usr.Email)
|
|
|
|
usr.FirstName = "Jackson"
|
|
usr.LastName = "Shirts"
|
|
usr.Phone = "(999) 999-9999"
|
|
usr.PasswordHash, _ = password.Hash("suchtees")
|
|
usr.MustPut()
|
|
return usr
|
|
})
|