mirror of
https://shylinux.com/x/community
synced 2025-05-03 12:47:01 +08:00
33 lines
760 B
Go
33 lines
760 B
Go
package gonganxitong
|
|
|
|
import (
|
|
"shylinux.com/x/ice"
|
|
|
|
"shylinux.com/x/community/src/gonganxitong/model"
|
|
)
|
|
|
|
type event struct {
|
|
Table
|
|
order string `data:"504"`
|
|
role string `data:"leader"`
|
|
}
|
|
|
|
func (s event) List(m *ice.Message, arg ...string) {
|
|
s.FieldsWithCreatedAT(m, s, model.USER_UID, model.INFO)
|
|
if len(arg) == 1 {
|
|
s.Select(m, model.PLACE_UID, arg[0]).Action()
|
|
} else if len(arg) == 2 {
|
|
s.SelectDetail(m, model.PLACE_UID, arg[0], model.UID, arg[1])
|
|
} else {
|
|
return
|
|
}
|
|
s.SelectJoinUser(m)
|
|
s.DisplayBase(m, "")
|
|
}
|
|
|
|
func init() { ice.TeamCtxCmd(event{Table: newTable()}) }
|
|
|
|
func (s event) Record(m *ice.Message, info string, arg ...string) {
|
|
m.Cmd(s.Prefix(m, s), s.Insert, m.OptionSimple(model.PLACE_UID, model.USER_UID), model.INFO, info)
|
|
}
|