mirror of
https://shylinux.com/x/community
synced 2025-04-25 17:48:06 +08:00
26 lines
752 B
Go
26 lines
752 B
Go
package {{.Option "name"}}
|
|
|
|
import (
|
|
"shylinux.com/x/ice"
|
|
kit "shylinux.com/x/toolkits"
|
|
|
|
"{{.Option "module"}}/model"
|
|
)
|
|
|
|
type {{.Option "table"}} struct {
|
|
Table
|
|
{{.Option "class"}} {{.Option "class"}}
|
|
user{{.Option "Class"}} user{{.Option "Class"}}
|
|
portal string `data:"true"`
|
|
create string `name:"create content*" role:"void"`
|
|
}
|
|
|
|
func (s {{.Option "table"}}) Create(m *ice.Message, arg ...string) {
|
|
s.Table.Create(m, kit.Simple(arg, m.OptionSimple(model.USER_UID, model.{{.Option "CLASS"}}_UID))...)
|
|
}
|
|
func (s {{.Option "table"}}) List(m *ice.Message, arg ...string) {
|
|
s.TablesWithRole(m, arg, s, s.user{{.Option "Class"}}, s.{{.Option "class"}}, model.CONTENT).Display("")
|
|
}
|
|
|
|
func init() { ice.TeamCtxCmd({{.Option "table"}}{}) }
|