First implementation of fetching collections of book managed by user
This commit is contained in:
11
internal/model/collection.go
Normal file
11
internal/model/collection.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package model
|
||||
|
||||
import "gorm.io/gorm"
|
||||
|
||||
type Collection struct {
|
||||
gorm.Model
|
||||
Name string
|
||||
User User
|
||||
UserID uint
|
||||
Books []Book `gorm:"many2many:collection_books;"`
|
||||
}
|
||||
Reference in New Issue
Block a user