14401440 * }
14411441 */
14421442
1443+ // ------------------------------------------------------------------------------------------
1444+ // Faculty
1445+ // ------------------------------------------------------------------------------------------
1446+ /**
1447+ * @api {post } /faculty/add Add Faculty
1448+ * @apiName AddFaculty
1449+ * @apiGroup Faculty
1450+ * @apiDescription Add a new faculty member.
1451+ *
1452+ * @apiBody {String} ERPID Employee ID of the faculty.
1453+ * @apiBody {Date} dateOfJoining Date of joining the institution.
1454+ * @apiBody {Date} dateOfLeaving Date of leaving the institution.
1455+ * @apiBody {String} profileLink Link to faculty member's profile.
1456+ * @apiBody {String[]} qualifications List of qualifications.
1457+ * @apiBody {Number} totalExperience Total years of experience.
1458+ * @apiBody {String[]} achievements List of achievements.
1459+ * @apiBody {String[]} areaOfSpecialization List of areas of specialization.
1460+ * @apiBody {Number} papersPublishedPG Number of papers published at the PG level.
1461+ * @apiBody {Number} papersPublishedUG Number of papers published at the UG level.
1462+ * @apiBody {ObjectId} department ID of the department (ObjectId).
1463+ * @apiBody {ObjectId[]} preferredSubjects List of preferred subjects (ObjectId).
1464+ * @apiBody {String[]} designation Faculty member's designation (one of the possible values: "HOD", "Assistant Professor", "Associate Professor", "Activity Head").
1465+ * @apiBody {String} natureOfAssociation Nature of association with the institution (one of the possible values: "Regular", "Contract", "Adjunct").
1466+ * @apiBody {String} additionalResponsibilities Additional responsibilities of the faculty.
1467+ *
1468+ * @apiSuccess {String} res Response message.
1469+ * @apiError (Error 500) DatabaseError Err message if there is an error inserting into the database.
1470+ *
1471+ * @apiSuccessExample Success-Response:
1472+ * HTTP/1.1 200 OK
1473+ * {
1474+ * "res": "Added faculty"
1475+ * }
1476+ *
1477+ * @apiErrorExample Error-Response:
1478+ * HTTP/1.1 500 Internal Server Error
1479+ * {
1480+ * "err": "Error while inserting in DB"
1481+ * }
1482+ */
1483+
14431484/**
14441485 * @api {delete } /topic/delete/:topicId Delete Topic
14451486 * @apiName DeleteTopic
14521493 * @apiError (Error 500) DatabaseError Error message if there was an error during the deletion.
14531494 */
14541495
1496+ /**
1497+ * @api {delete } /faculty/delete/:facultyId Delete Faculty
1498+ * @apiName DeleteFaculty
1499+ * @apiGroup Faculty
1500+ *
1501+ * @apiParam {String} facultyId The ID of the faculty member to delete.
1502+ *
1503+ * @apiSuccess {String} res Success message indicating the deletion.
1504+ *
1505+ * @apiError (Error 500) DatabaseError Error message if there was an error during the deletion.
1506+ */
1507+
14551508/**
14561509 * @api {post } /topic/update/:id Update Topic
14571510 * @apiName UpdateTopic
14631516 * @apiSuccess {String} res Topic updated.
14641517 * @apiError (Error 500) DatabaseError Error in updating the database.
14651518 */
1519+ /**
1520+ * @api {post } /faculty/update/:id Update Faculty
1521+ * @apiName UpdateFaculty
1522+ * @apiGroup Faculty
1523+ * @apiDescription Update existing faculty member's data.
1524+ *
1525+ * @apiParam {String} id The faculty member's document to update.
1526+ * @apiBody {String} id ID of the faculty member to be updated.
1527+ * @apiBody {String} ERPID Employee ID of the faculty.
1528+ * @apiBody {Date} dateOfJoining Date of joining the institution.
1529+ * @apiBody {Date} dateOfLeaving Date of leaving the institution.
1530+ * @apiBody {String} profileLink Link to faculty member's profile.
1531+ * @apiBody {String[]} qualifications List of qualifications.
1532+ * @apiBody {Number} totalExperience Total years of experience.
1533+ * @apiBody {String[]} achievements List of achievements.
1534+ * @apiBody {String[]} areaOfSpecialization List of areas of specialization.
1535+ * @apiBody {Number} papersPublishedPG Number of papers published at the PG level.
1536+ * @apiBody {Number} papersPublishedUG Number of papers published at the UG level.
1537+ * @apiBody {ObjectId} department ID of the department (ObjectId).
1538+ * @apiBody {ObjectId[]} preferredSubjects List of preferred subjects (ObjectId).
1539+ * @apiBody {String[]} designation Faculty member's designation (one of the possible values: "HOD", "Assistant Professor", "Associate Professor", "Activity Head").
1540+ * @apiBody {String} natureOfAssociation Nature of association with the institution (one of the possible values: "Regular", "Contract", "Adjunct").
1541+ * @apiBody {String} additionalResponsibilities Additional responsibilities of the faculty.
1542+ *
1543+ * @apiSuccess {String} res Faculty member's data updated.
1544+ * @apiError (Error 500) DatabaseError Error in updating the database.
1545+ */
14661546
14671547/**
14681548 * @api {get } /topic/list Get Topic List
14731553 *
14741554 * @apiSuccess {Topic[]} res Array of filtered topic documents.
14751555 * @apiSuccess {String} topic._id ID of the topic document given by the database.
1476- */
1556+ */
1557+
1558+ /**
1559+ * @api {get } /faculty/list Get Faculty List
1560+ * @apiName GetFacultyList
1561+ * @apiGroup Faculty
1562+ *
1563+ * @apiQuery {String} ERPID Employee ID of the faculty.
1564+ * @apiQuery {Date} dateOfJoining Date of joining the institution.
1565+ * @apiQuery {Date} dateOfLeaving Date of leaving the institution.
1566+ * @apiQuery {String} profileLink Link to faculty member's profile.
1567+ * @apiQuery {String[]} qualifications List of qualifications.
1568+ * @apiQuery {Number} totalExperience Total years of experience.
1569+ * @apiQuery {String[]} achievements List of achievements.
1570+ * @apiQuery {String[]} areaOfSpecialization List of areas of specialization.
1571+ * @apiQuery {Number} papersPublishedPG Number of papers published at the PG level.
1572+ * @apiQuery {Number} papersPublishedUG Number of papers published at the UG level.
1573+ * @apiQuery {ObjectId} department ID of the department (ObjectId).
1574+ * @apiQuery {ObjectId[]} preferredSubjects List of preferred subjects (ObjectId).
1575+ * @apiQuery {String[]} designation Faculty member's designation (one of the possible values: "HOD", "Assistant Professor", "Associate Professor", "Activity Head").
1576+ * @apiQuery {String} natureOfAssociation Nature of association with the institution (one of the possible values: "Regular", "Contract", "Adjunct").
1577+ * @apiQuery {String} additionalResponsibilities Additional responsibilities of the faculty.
1578+ *
1579+ * @apiSuccess {Faculty[]} res Array of filtered faculty member documents.
1580+ * @apiSuccess {String} faculty._id ID of the faculty member document given by the database.
1581+ * @apiSuccess {String} faculty.ERPID Employee ID of the faculty.
1582+ * @apiSuccess {Date} faculty.dateOfJoining Date of joining the institution.
1583+ * @apiSuccess {Date} faculty.dateOfLeaving Date of leaving the institution.
1584+ * @apiSuccess {String} faculty.profileLink Link to faculty member's profile.
1585+ * @apiSuccess {String[]} faculty.qualifications List of qualifications.
1586+ * @apiSuccess {Number} faculty.totalExperience Total years of experience.
1587+ * @apiSuccess {String[]} faculty.achievements List of achievements.
1588+ * @apiSuccess {String[]} faculty.areaOfSpecialization List of areas of specialization.
1589+ * @apiSuccess {Number} faculty.papersPublishedPG Number of papers published at the PG level.
1590+ * @apiSuccess {Number} faculty.papersPublishedUG Number of papers published at the UG level.
1591+ * @apiSuccess {ObjectId} faculty.department ID of the department.
1592+ * @apiSuccess {ObjectId[]} faculty.preferredSubjects List of preferred subjects.
1593+ * @apiSuccess {String[]} faculty.designation Faculty member's designation.
1594+ * @apiSuccess {String} faculty.natureOfAssociation Nature of association with the institution.
1595+ * @apiSuccess {String} faculty.additionalResponsibilities Additional responsibilities of the faculty.
1596+ **/
0 commit comments