- new table userbook linking users and book - moved rating to users book - updated demo data and tests - updated front to hide routes from non connected users
13 lines
183 B
Go
13 lines
183 B
Go
package model
|
|
|
|
import "gorm.io/gorm"
|
|
|
|
// describes the relationship between a user and a book.
|
|
type UserBook struct {
|
|
gorm.Model
|
|
UserID uint
|
|
BookID uint
|
|
Book Book
|
|
Rating int
|
|
}
|