diff --git a/backend/typescript/graphql/types/reviewPageType.ts b/backend/typescript/graphql/types/reviewPageType.ts index 68bd8ce1..cb385c40 100644 --- a/backend/typescript/graphql/types/reviewPageType.ts +++ b/backend/typescript/graphql/types/reviewPageType.ts @@ -2,7 +2,7 @@ import { gql } from "apollo-server-express"; const reviewPageType = gql` type ApplicationDTO { - id: Int! + id: String! academicOrCoop: String! academicYear: String! email: String! diff --git a/backend/typescript/models/applicant.model.ts b/backend/typescript/models/applicant.model.ts index 7cd39032..a4b33741 100644 --- a/backend/typescript/models/applicant.model.ts +++ b/backend/typescript/models/applicant.model.ts @@ -7,12 +7,11 @@ import ApplicantRecord from "./applicantRecord.model"; @Table({ tableName: "applicants" }) export default class Applicant extends Model { @Column({ - type: DataType.INTEGER, + type: DataType.UUIDV4, primaryKey: true, unique: true, - autoIncrement: true, }) - id!: number; + id!: string; @Column({ type: DataType.STRING }) academicOrCoop!: string; diff --git a/backend/typescript/models/applicantRecord.model.ts b/backend/typescript/models/applicantRecord.model.ts index 05b6eb3c..795dae63 100644 --- a/backend/typescript/models/applicantRecord.model.ts +++ b/backend/typescript/models/applicantRecord.model.ts @@ -30,8 +30,8 @@ export default class ApplicantRecord extends Model { id!: string; @ForeignKey(() => Applicant) - @Column({ type: DataType.INTEGER }) - applicantId!: number; + @Column({ type: DataType.UUIDV4 }) + applicantId!: string; @ForeignKey(() => Position) @Column({ type: DataType.STRING }) diff --git a/backend/typescript/services/implementations/reviewPageService.ts b/backend/typescript/services/implementations/reviewPageService.ts index cb977329..ee0f514a 100644 --- a/backend/typescript/services/implementations/reviewPageService.ts +++ b/backend/typescript/services/implementations/reviewPageService.ts @@ -3,7 +3,6 @@ import IReviewPageService from "../interfaces/IReviewPageService"; import { getErrorMessage } from "../../utilities/errorUtils"; import logger from "../../utilities/logger"; import ApplicantRecord from "../../models/applicantRecord.model"; -import ReviewedApplicantRecord from "../../models/reviewedApplicantRecord.model"; import Applicant from "../../models/applicant.model"; const Logger = logger(__filename); diff --git a/backend/typescript/types.ts b/backend/typescript/types.ts index 58254ab2..fbc3ace4 100644 --- a/backend/typescript/types.ts +++ b/backend/typescript/types.ts @@ -34,7 +34,7 @@ export type UserDTO = { }; export type ApplicationDTO = { - id: number; + id: string; academicOrCoop: string; academicYear: string; email: string; @@ -58,7 +58,7 @@ export type ApplicationDTO = { }; export type ApplicantDTO = { - id: number; + id: string; academicOrCoop: string; academicYear: string; // MAYBE CHANGE WITH ENUM email: string;