- Go to url https://repl.it/@AhmadFaizal/PES
- Login and open the repo
- Do the Solve below mentioned problem statement and save
- Share the link after you edit (when you edit and save it will create a fork of repo into your directory and hence will have a different url)
- Create Following model structure and add admin
- name - char with max length 25
- address - text
- title - char with max length 100
- description - text
- count - positive integer
- subscription_cost - positive integer
- topic - char with max length 20
- author - array of reference to Author
- user - reference to User table
- address - text
- phone - phone number
- subscriber - reference to Subscriber table
- book - reference to Book table
- borrowed_date - date( date of creaton)
- amount_paid - positive integer
- days - positive integer
- returned - Boolean
- Create Django rest API List, Detailed, create, update, and delete view for all the above Models including User model
- Create following APIs:
- List all books of specific author that are available in the library
- List all books given a topic (match topic case insensitive way)
- List all Subscribers who didn’t return (returned=False) who’s subscription expired (expiry = borrowed_date + days)
- Add attribute due_amount in Subscription detailed view (due_amount=(Book. subscription_cost[ ] Subscription.days) - Subscription.amount_paid)
- Make sure can add subscription only if there is book in library (books in library = Book.count – subscription of book that are not returned)