it is an Interview question for an interview
- Design and Develop a library API with the following functionalities:
- CRUD Book Categories
- CRUD Books
- Each book must have a category
- When a category is deleted, all books related to that category will have their categories as None.
- Make an ERD(Entity Relationship Diagram) showcasing your models and their relationships (You can use draw.io to achieve this.)
- Books should have the following fields:
- title(str),
- author(str),
- no_of_pages(int),
- description(text),
- category(FK)
- created_at(datetime),
- updated_at(datetime)
- Categories should have the following fields:
- name(str),
- created_at(datetime),
- updated_at(datetime)
- Your DB should be the follow-come sqlite of django.