21 lines
317 B
Go
21 lines
317 B
Go
package model
|
|
|
|
import (
|
|
"time"
|
|
|
|
"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
|
|
Read bool
|
|
WantRead bool
|
|
StartReadDate *time.Time
|
|
EndReadDate *time.Time
|
|
}
|