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
30 lines
473 B
Go
30 lines
473 B
Go
package tokentransaction
|
|
|
|
import (
|
|
"github.com/hanzoai/commerce/datastore"
|
|
)
|
|
|
|
var kind = "tokentransaction"
|
|
|
|
func (t Transaction) Kind() string {
|
|
return kind
|
|
}
|
|
|
|
func (t *Transaction) Init(db *datastore.Datastore) {
|
|
t.BaseModel.Init(db, t)
|
|
}
|
|
|
|
func (t *Transaction) Defaults() {
|
|
}
|
|
|
|
func New(db *datastore.Datastore) *Transaction {
|
|
t := new(Transaction)
|
|
t.Init(db)
|
|
t.Defaults()
|
|
return t
|
|
}
|
|
|
|
func Query(db *datastore.Datastore) datastore.Query {
|
|
return db.Query(kind)
|
|
}
|