package models import "time" // Book represents a book product in the database type Book struct { BookCode string `json:"book_code" db:"book_code"` BookName string `json:"book_name" db:"book_name"` Cost float64 `json:"cost" db:"cost"` Price float64 `json:"price" db:"price"` Discount float64 `json:"discount" db:"discount"` Quantity int `json:"quantity" db:"quantity"` PublisherAuthor string `json:"publisher_author" db:"publisher_author"` Category string `json:"category" db:"category"` Description string `json:"description" db:"description"` ImageURL string `json:"image_url" db:"image_url"` Slug string `json:"slug" db:"slug"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedAt time.Time `json:"updated_at" db:"updated_at"` } // BookCreateRequest represents the data needed to create a new book type BookCreateRequest struct { BookName string `json:"book_name"` Cost float64 `json:"cost"` Price float64 `json:"price"` Discount float64 `json:"discount"` Quantity int `json:"quantity"` PublisherAuthor string `json:"publisher_author"` Category string `json:"category"` Description string `json:"description"` ImageURL string `json:"image_url"` }