@@ -0,0 +1,9 @@
+package orm
+
+import "github.com/jinzhu/gorm"
+type Group struct {
+ gorm.Model
+ Name string
+}
@@ -21,6 +21,8 @@ type Teacher struct {
Activities []*Activity
Departments []*Department
+ Groups []*Group `gorm:many2may:teacher_groups`
SubjectsByClass map[uint][]*Subject `gorm:"-"`
Hours int