Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions server/src/composition/composition.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 14 additions & 0 deletions server/src/composition/compositionRoot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -48,3 +51,14 @@ container.bind<TeacherService>(TYPES.TeacherService).to(TeacherService);
container
.bind<TeacherController>(TYPES.TeacherController)
.to(TeacherController);

// appointment
container
.bind<AppointmentRepository>(TYPES.AppointmentRepository)
.to(AppointmentRepository);
container
.bind<AppointmentService>(TYPES.AppointmentService)
.to(AppointmentService);
container
.bind<AppointmentController>(TYPES.AppointmentController)
.to(AppointmentController);
12 changes: 12 additions & 0 deletions server/src/types/appointment/appointment.types.ts
Original file line number Diff line number Diff line change
@@ -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";
}
Loading