package gongyinglian import ( "shylinux.com/x/ice" kit "shylinux.com/x/toolkits" "shylinux.com/x/enterprise/src/gongyinglian/model" ) type material struct { Product create string `name:"create warehouse_uid*:select name* info price stock unit" role:"boss"` } func (s material) Create(m *ice.Message, arg ...string) { m.Cmdy(s.Product, s.Create, model.PRODUCT_TYPE, ProductMaterial, arg) } func (s material) List(m *ice.Message, arg ...string) { m.Cmdy(s.Product, arg, kit.Dict(model.PRODUCT_TYPE, kit.Format(ProductMaterial))) m.PushAction(s.SetWarehouse, s.Modify, s.Remove) } func init() { ice.TeamCtxCmd(material{}) }