package book

import "time"

type BookFavoriteRecord struct {
	HardDeleteModel
	MemberUserID uint      `json:"memberUserId" form:"memberUserId" gorm:"not null;uniqueIndex:uk_book_favorite_record_member_user_id_book_id;index:idx_book_favorite_record_member_user_id_favorited_at;comment:会员用户 ID"`
	BookID       uint      `json:"bookId" form:"bookId" gorm:"not null;uniqueIndex:uk_book_favorite_record_member_user_id_book_id;index;comment:书籍 ID"`
	FavoritedAt  time.Time `json:"favoritedAt" form:"favoritedAt" gorm:"not null;default:CURRENT_TIMESTAMP;index:idx_book_favorite_record_member_user_id_favorited_at;comment:收藏时间"`
}

func (BookFavoriteRecord) TableName() string {
	return "book_favorite_record"
}
