mirror of
https://shylinux.com/x/enterprise
synced 2025-04-25 09:08:06 +08:00
24 lines
687 B
Go
24 lines
687 B
Go
package gongyinglian
|
|
|
|
import (
|
|
"shylinux.com/x/ice"
|
|
kit "shylinux.com/x/toolkits"
|
|
|
|
"shylinux.com/x/enterprise/src/gongyinglian/model"
|
|
)
|
|
|
|
type goods struct {
|
|
Product
|
|
create string `name:"create shop_uid*:select name* info price stock unit" role:"boss"`
|
|
}
|
|
|
|
func (s goods) Create(m *ice.Message, arg ...string) {
|
|
s.Product.Create(m, kit.Simple(model.PRODUCT_TYPE, ProductGoods, arg)...)
|
|
}
|
|
func (s goods) List(m *ice.Message, arg ...string) {
|
|
s.Product.List(m.Options(model.PRODUCT_TYPE, kit.Format(ProductGoods)), arg...)
|
|
kit.If(s.checkListRole(m, arg...), func() { m.PushAction(s.SetShop, s.SetBrand, s.SetQuality, s.Modify, s.Remove) })
|
|
}
|
|
|
|
func init() { ice.TeamCtxCmd(goods{}) }
|