Developed an Online Bookshelf where the huge quantity of books is registered and sold. The book model contains following details like title, description, image_url, price and discount price, listed in detailed manner, and performed validation mechanism on the book model like title, description, and image_url are the required attributes, which cannot be blank. Title of a book should be unique and the book should not be free, i.e., the original price of the book has to be great than or equal to 1 cent. After the discount, the book can be free. In addition, the discount price has to be less than the original price. The discount price is optional.