Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. type MyLink struct {
  2. gorm.Model
  3. Title string
  4. Url string
  5. }
  6.  
  7. // group of links under a single title
  8. type MyLinkSection struct {
  9. gorm.Model
  10. Title string
  11. Links []MyLink
  12. }
  13.  
  14. type MyPage struct {
  15. gorm.Model
  16. PageUrl MyLink
  17. Artists []MyLinkSection
  18. }
  19.  
  20. PageUrl MyLink `gorm:"ForeignKey:PageUrlId"`
  21. PageUrl Id uint
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement