mirror of
https://shylinux.com/x/education
synced 2025-04-25 01:58:05 +08:00
add some
This commit is contained in:
parent
262e8eb910
commit
f9296dc896
@ -50,3 +50,5 @@ func (s Table) recordEventWithName(m *ice.Message, info string) {
|
||||
type Tables struct{ Table }
|
||||
|
||||
func (s Tables) BeforeMigrate(m *ice.Message, arg ...string) {}
|
||||
|
||||
func newTable() Table { return Table{Table: gonganxitong.NewTable(userClass{}, class{}, school{})} }
|
||||
|
@ -24,14 +24,14 @@ type UserClass struct {
|
||||
db.ModelWithUID
|
||||
UserUID string `gorm:"type:char(32);index"`
|
||||
ClassUID string `gorm:"type:char(32);index"`
|
||||
Role uint8
|
||||
Role uint8 `gorm:"default:0"`
|
||||
}
|
||||
type Class struct {
|
||||
db.ModelWithUID
|
||||
SchoolUID string `gorm:"type:char(32);index"`
|
||||
Grade string `gorm:"type:varchar(32)"`
|
||||
Name string `gorm:"type:varchar(64)"`
|
||||
Type uint8
|
||||
Type uint8 `gorm:"default:0"`
|
||||
}
|
||||
type School struct {
|
||||
db.ModelWithUID
|
||||
|
@ -39,7 +39,7 @@ func (s userClass) List(m *ice.Message, arg ...string) {
|
||||
s.SelectJoinCity(m)
|
||||
}
|
||||
|
||||
func init() { ice.TeamCtxCmd(userClass{}) }
|
||||
func init() { ice.TeamCtxCmd(userClass{Table: newTable()}) }
|
||||
|
||||
type UserClassRole int
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user