From ba5064ac27dfe030ff5e735a304bc854dce6b33e Mon Sep 17 00:00:00 2001 From: Adrienne Date: Sun, 2 Mar 2025 14:30:55 -0500 Subject: [PATCH 1/3] added docs to interview scheduler dao --- backend/src/dao/InterviewSchedulerDao.ts | 29 +++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/backend/src/dao/InterviewSchedulerDao.ts b/backend/src/dao/InterviewSchedulerDao.ts index 2886c3a9e..011d4c10f 100644 --- a/backend/src/dao/InterviewSchedulerDao.ts +++ b/backend/src/dao/InterviewSchedulerDao.ts @@ -3,6 +3,9 @@ import { interviewSchedulerCollection } from '../firebase'; import BaseDao from './BaseDao'; export default class InterviewSchedulerDao extends BaseDao { + /** + * Initializes DAO with the interview scheduler collection. + */ constructor() { super( interviewSchedulerCollection, @@ -10,15 +13,27 @@ export default class InterviewSchedulerDao extends BaseDao interviewScheduler ); } - + /** + * Gets all instances of Interview Scheduler + * @returns a promise that resolves to an array of Interview Scheduler objects + */ async getAllInstances(): Promise { return this.getDocuments(); } + /** + * Gets a specific instance of Interview Scheduler with uuid + * @param uuid the uuid of a Interview Scheduler instance + * @returns a promise resolving to a specific instance if found and null otherwise + */ async getInstance(uuid: string): Promise { return this.getDocument(uuid); } - +/** + * Creates an instance of Interview Scheduler with uuid and assigns one if not provided + * @param instance the Interview Scheduler instance to create + * @returns uuid of created instance + */ async createInstance(instance: InterviewScheduler): Promise { const instanceWithUUID = { ...instance, @@ -28,10 +43,18 @@ export default class InterviewSchedulerDao extends BaseDao { return this.updateDocument(instance.uuid, instance); } - + /** + * Deletes an instance of Interview Scheduler + * @param uuid the uuid of the instance to delete + */ async deleteInstance(uuid: string): Promise { this.deleteDocument(uuid); } From 93cea0786c9b35457e5e4267942acf49958530f5 Mon Sep 17 00:00:00 2001 From: Adrienne Date: Sun, 2 Mar 2025 14:31:55 -0500 Subject: [PATCH 2/3] spacing fix --- backend/src/dao/InterviewSchedulerDao.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/backend/src/dao/InterviewSchedulerDao.ts b/backend/src/dao/InterviewSchedulerDao.ts index 011d4c10f..7d182fa03 100644 --- a/backend/src/dao/InterviewSchedulerDao.ts +++ b/backend/src/dao/InterviewSchedulerDao.ts @@ -13,6 +13,7 @@ export default class InterviewSchedulerDao extends BaseDao interviewScheduler ); } + /** * Gets all instances of Interview Scheduler * @returns a promise that resolves to an array of Interview Scheduler objects @@ -29,11 +30,12 @@ export default class InterviewSchedulerDao extends BaseDao { return this.getDocument(uuid); } -/** - * Creates an instance of Interview Scheduler with uuid and assigns one if not provided - * @param instance the Interview Scheduler instance to create - * @returns uuid of created instance - */ + + /** + * Creates an instance of Interview Scheduler with uuid and assigns one if not provided + * @param instance the Interview Scheduler instance to create + * @returns uuid of created instance + */ async createInstance(instance: InterviewScheduler): Promise { const instanceWithUUID = { ...instance, @@ -51,6 +53,7 @@ export default class InterviewSchedulerDao extends BaseDao { return this.updateDocument(instance.uuid, instance); } + /** * Deletes an instance of Interview Scheduler * @param uuid the uuid of the instance to delete From 64a55967cc43a664c01cf1546c6533f663867ac3 Mon Sep 17 00:00:00 2001 From: Adrienne Date: Sun, 2 Mar 2025 14:46:08 -0500 Subject: [PATCH 3/3] build check format fix --- backend/src/dao/InterviewSchedulerDao.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/dao/InterviewSchedulerDao.ts b/backend/src/dao/InterviewSchedulerDao.ts index 7d182fa03..f829683b2 100644 --- a/backend/src/dao/InterviewSchedulerDao.ts +++ b/backend/src/dao/InterviewSchedulerDao.ts @@ -25,7 +25,7 @@ export default class InterviewSchedulerDao extends BaseDao { return this.getDocument(uuid); @@ -53,7 +53,7 @@ export default class InterviewSchedulerDao extends BaseDao { return this.updateDocument(instance.uuid, instance); } - + /** * Deletes an instance of Interview Scheduler * @param uuid the uuid of the instance to delete