-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrequirements.js
55 lines (41 loc) · 1.3 KB
/
requirements.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//Requirement for our project
//We are a book management company
//BOOKS
//ISBN, title, pub date, language, num page, author[], category[]
//AUTHORS
//id, name, books[]
//PUBLICATIONS
//id, name, books[]
//We have to design and code an API over this .
//1. BOOKS
//We need an API :-
//To get all the books - DONE
//To get specific book - DONE
//To get a list of books based on category - DONE
//To get a list of books based on languages - UR TASK
//2. AUTHORS
//We need an API :-
//To get all the authors - DONE
//To get a specific author based on id- YOUR TASK
//To get a list of authors based on books - DONE
//3. PUBLICATIONS
//We need an API :-
//To get all the publications
//To get a specific publication - YOUR TASK
//To get a list of publications based on a book - YOUR TASK
//POST REQUEST
//1. ADD NEW BOOK - DONE
//2.ADD NEW PUBLICATION -
//3.ADD NEW AUTHOR
/**********PUT***********/
//Update book details if author is changed. - DONE
/*****DELETE****/
//1. Delete a book - DONE
//2. Delete author from book - UR TASK
//3. Delete author from book and related book from author -
//Schema - Blueprint of how data has to be constructed
//MongoDB is schemaless
//mongoose has schema
//mongoose - validation , relationship with other data.
//model -> document model of MongoDB
//Schema -> Model -> use them .