mirror of
https://shylinux.com/x/education
synced 2025-04-25 01:58:05 +08:00
add some
This commit is contained in:
parent
32f49a9d86
commit
755d416101
@ -10,7 +10,7 @@ import (
|
||||
|
||||
type Table struct {
|
||||
jiaowuxitong.Table
|
||||
list string `name:"list issuer_uid uid auto" role:"void"`
|
||||
list string `name:"list library_uid uid auto" role:"void"`
|
||||
}
|
||||
|
||||
func (s Table) Inputs(m *ice.Message, arg ...string) {
|
||||
|
18
src/jiaocaiziliao/content.go
Normal file
18
src/jiaocaiziliao/content.go
Normal file
@ -0,0 +1,18 @@
|
||||
package jiaocaiziliao
|
||||
|
||||
import "shylinux.com/x/ice"
|
||||
|
||||
type content struct {
|
||||
Table
|
||||
order string `data:"1"`
|
||||
fields string `data:"title,user_uid"`
|
||||
create string `name:"create title*" role:"teacher"`
|
||||
remove string `name:"remove" role:"teacher"`
|
||||
}
|
||||
|
||||
func (s content) List(m *ice.Message, arg ...string) {
|
||||
s.ValueList(m, arg)
|
||||
m.Action(s.Create)
|
||||
}
|
||||
|
||||
func init() { ice.TeamCtxCmd(content{}) }
|
@ -36,5 +36,11 @@ type Document struct {
|
||||
Icon string `gorm:"type:varchar(128)"`
|
||||
Link string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
type Content struct {
|
||||
db.ModelWithUID
|
||||
LibraryUID string `gorm:"type:char(32);index"`
|
||||
UserUID string `gorm:"type:char(32)"`
|
||||
Title string `gorm:"type:varchar(64)"`
|
||||
}
|
||||
|
||||
func init() { db.CmdModels("", &UserLibrary{}, &Library{}, &Document{}) }
|
||||
func init() { db.CmdModels("", &UserLibrary{}, &Library{}, &Document{}, &Content{}) }
|
||||
|
@ -2,7 +2,9 @@
|
||||
"portal": "教材资料",
|
||||
"official": "官方网站",
|
||||
"document": "教材资料",
|
||||
"content": "目录索引",
|
||||
"icons": {
|
||||
"content": "https://img.icons8.com/officel/80/activity-grid.png",
|
||||
"official": "https://img.icons8.com/officel/80/activity-grid.png",
|
||||
"document": "https://img.icons8.com/officel/80/activity-grid.png"
|
||||
},
|
||||
|
@ -15,4 +15,4 @@ func main() { print(ice.Run()) }
|
||||
func init() {
|
||||
ice.Info.NodeMain = "web.team.jiaowuxitong.portal"
|
||||
ice.Info.CodeMain = "src/jiaowuxitong/portal.go"
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user