diff --git a/server/src/composition/composition.types.ts b/server/src/composition/composition.types.ts index 54ab603..4a0acf7 100644 --- a/server/src/composition/composition.types.ts +++ b/server/src/composition/composition.types.ts @@ -10,6 +10,12 @@ export const TYPES = { TeacherService: Symbol.for("TeacherService"), TeacherQuery: Symbol.for("TeacherQuery"), TeacherController: Symbol.for("TeacherController"), + + //appointment + AppointmentRepository: Symbol.for("AppointmentRepository"), + AppointmentService: Symbol.for("AppointmentService"), + AppointmentController: Symbol.for("AppointmentController"), + //jwt JwtService: Symbol.for("JwtService"), //middlewares diff --git a/server/src/composition/compositionRoot.ts b/server/src/composition/compositionRoot.ts index 25347c7..e547925 100644 --- a/server/src/composition/compositionRoot.ts +++ b/server/src/composition/compositionRoot.ts @@ -15,6 +15,9 @@ import { AuthMiddleware } from "../middlewares/authMiddlewareWithBearer.js"; import { AuthService } from "../services/auth/auth.service.js"; import { RefreshSessionRepository } from "../repositories/commandRepositories/refreshSession.repository.js"; import { RefreshTokenMiddleware } from "../middlewares/refreshToken.middleware.js"; +import { AppointmentRepository } from "../repositories/appointment.repository.js"; +import { AppointmentService } from "../services/appointment/appointment.service.js"; +import { AppointmentController } from "../controllers/appointment.controller.js"; export const container = new Container(); @@ -48,3 +51,14 @@ container.bind(TYPES.TeacherService).to(TeacherService); container .bind(TYPES.TeacherController) .to(TeacherController); + +// appointment +container + .bind(TYPES.AppointmentRepository) + .to(AppointmentRepository); +container + .bind(TYPES.AppointmentService) + .to(AppointmentService); +container + .bind(TYPES.AppointmentController) + .to(AppointmentController); diff --git a/server/src/types/appointment/appointment.types.ts b/server/src/types/appointment/appointment.types.ts new file mode 100644 index 0000000..34cdfda --- /dev/null +++ b/server/src/types/appointment/appointment.types.ts @@ -0,0 +1,12 @@ +export interface CreateAppointmentType { + studentId: string; + teacherId: string; + lesson: string; + price: string; + date: string; + time: string; +} + +export interface UpdateAppointmentStatusType { + status: "approved" | "rejected"; +}