package entity

import (
	users "campaign-pool-be/app/database/entity/users"
	"time"
)

type EbookWishlists struct {
	ID        uint         `json:"id" gorm:"primaryKey;type:int4;autoIncrement"`
	UserId    uint         `json:"user_id" gorm:"type:int4"`
	User      *users.Users `json:"user" gorm:"foreignKey:UserId;references:ID"`
	EbookId   uint         `json:"ebook_id" gorm:"type:int4"`
	Ebook     *Ebooks      `json:"ebook" gorm:"foreignKey:EbookId;references:ID"`
	CreatedAt time.Time    `json:"created_at" gorm:"default:now()"`
	UpdatedAt time.Time    `json:"updated_at" gorm:"default:now()"`
}
