mirror of
https://shylinux.com/x/community
synced 2025-04-25 09:38:06 +08:00
26 lines
645 B
Go
26 lines
645 B
Go
package huodongzuzhi
|
|
|
|
import (
|
|
"shylinux.com/x/ice"
|
|
kit "shylinux.com/x/toolkits"
|
|
|
|
"shylinux.com/x/community/src/huodongzuzhi/model"
|
|
)
|
|
|
|
type activity struct {
|
|
Table
|
|
group group
|
|
userGroup userGroup
|
|
create string `name:"create title* content*" role:"leader"`
|
|
}
|
|
|
|
func (s activity) Create(m *ice.Message, arg ...string) {
|
|
s.Table.Create(m, kit.Simple(arg, m.OptionSimple(model.USER_UID, model.GROUP_UID))...)
|
|
s.RecordEventWithName(m, "")
|
|
}
|
|
func (s activity) List(m *ice.Message, arg ...string) {
|
|
s.TablesWithRole(m, arg, s.userGroup, s.group, s, model.TITLE, model.CONTENT).Display("")
|
|
}
|
|
|
|
func init() { ice.TeamCtxCmd(activity{}) }
|