n39librarian/middleware/queries/checkoutBook.ts

10 lines
333 B
TypeScript
Raw Permalink Normal View History

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}';`;