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

26 lines
556 B
Go

package fixtures
import (
"github.com/zap-proto/zip"
"github.com/hanzoai/commerce/auth/password"
"github.com/hanzoai/commerce/datastore"
"github.com/hanzoai/commerce/models/user"
)
var User = New("user", func(c *zip.Ctx) *user.User {
db := datastore.New(c.Context())
// 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
})