mirror of
https://shylinux.com/x/icebergs
synced 2025-05-08 14:08:10 +08:00
19 lines
470 B
Go
19 lines
470 B
Go
package mall
|
|
|
|
import (
|
|
ice "shylinux.com/x/icebergs"
|
|
"shylinux.com/x/icebergs/base/mdb"
|
|
)
|
|
const GOODS = "goods"
|
|
|
|
func init() {
|
|
Index.MergeCommands(ice.Commands{
|
|
GOODS: {Name: "goods hash auto", Help: "商品", Actions: ice.MergeActions(ice.Actions{
|
|
|
|
}, mdb.HashAction(mdb.FIELD, "time,hash,type,name,text")), Hand: func(m *ice.Message, arg ...string) {
|
|
if mdb.HashSelect(m, arg...); len(arg) == 0 || arg[0] == "" {
|
|
m.Action(mdb.CREATE)
|
|
}
|
|
}},
|
|
})
|
|
} |