n39librarian/middleware/queries/checkoutBook.ts

9 lines
333 B
TypeScript

import { Book } from "../types/Book";
export const checkoutBook = ({
checkoutBy,
uuid,
contact,
lastCheckoutDate,
}: Pick<Book, "uuid" | "lastCheckoutDate" | "checkoutBy" | "contact">) =>
`UPDATE bookData SET lastCheckoutDate='${lastCheckoutDate}', checkoutBy='${checkoutBy}', contact='${contact}' WHERE uuid='${uuid}';`;