#[Points]
- i need to built a middleware indicating to differentiate between a student and teacher(Admin)
#[APIs [ Input and about ]]
-
addCourse/updateCourse - POST method input - course name, coach name, description
-
getCourseByName - GET method input - couse name
-
getAllCourse - GET method input - none
-
addSession/updateSession - POST method input - coach , title, agenda. link, start_time, end_time
-
getCourseSessions (paginated api) - GET method input - none
-
deleteSession- DELETE method input - session name/id
#[Models/Tables]
-
course course_id, coach_id, course name, coach name, description,
-
coach/user (optional) coach_id, coach_name, about, mail, password
-
session session_id, coach , title, agenda. link, start_time, end_time
#[TestCase]
- addCourse/ updateCourse
- course name unique - search in db - same name - error [same course exist]
- getCourseByName
- search course - not available [course not available]
- getAllCourse
- query - not course available (add course to show)
- addSession/ updateSession
- if same session exist at time slot - error ( try choosing any other time slot )
- getCourseSessions (paginated api)
- search session by course - not available [course not available]
- query - error (session not available)
- deleteSession
- get the session id - not available session - error (session not found)
Notes:
- [paginated API: means divide the result of a query into multiple parts just like Flipkart here 20 products is listed at a time then we can use next page to see next 20 products ]
- two-session should not collide
Postman screenshot Diagram 1 : Add a Course
Diagram 3 : Get All the Course
Diagram 4 : Get Course by Name
Diagram 6 : Trying to Add session when their is collision with another session
Diagram 7 : Update Session using Id
Diagram 8 : Trying to update a existing session that is colliding with another session
Diagram 9 : Display session for a particular course - paginated api (course 1)