Extend model with sections & model
This commit is contained in:
parent
6b8cac30ce
commit
f491fdd9f4
4 changed files with 77 additions and 1 deletions
15
models/sections.go
Normal file
15
models/sections.go
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
package models
|
||||
|
||||
import "gorm.io/gorm"
|
||||
|
||||
type ParentSection struct {
|
||||
gorm.Model
|
||||
Name string
|
||||
}
|
||||
|
||||
type Section struct {
|
||||
gorm.Model
|
||||
Name string
|
||||
ParentSectionID uint
|
||||
ParentSection ParentSection
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue