Skip to content

Commit 5d57af3

Browse files
author
Maggie Chen
committed
change applicant id from int to string
1 parent daecb44 commit 5d57af3

File tree

5 files changed

+7
-9
lines changed

5 files changed

+7
-9
lines changed

backend/typescript/graphql/types/reviewPageType.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { gql } from "apollo-server-express";
22

33
const reviewPageType = gql`
44
type ApplicationDTO {
5-
id: Int!
5+
id: String!
66
academicOrCoop: String!
77
academicYear: String!
88
email: String!

backend/typescript/models/applicant.model.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@ import ApplicantRecord from "./applicantRecord.model";
77
@Table({ tableName: "applicants" })
88
export default class Applicant extends Model {
99
@Column({
10-
type: DataType.INTEGER,
10+
type: DataType.UUIDV4,
1111
primaryKey: true,
1212
unique: true,
13-
autoIncrement: true,
1413
})
15-
id!: number;
14+
id!: string;
1615

1716
@Column({ type: DataType.STRING })
1817
academicOrCoop!: string;

backend/typescript/models/applicantRecord.model.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ export default class ApplicantRecord extends Model {
3030
id!: string;
3131

3232
@ForeignKey(() => Applicant)
33-
@Column({ type: DataType.INTEGER })
34-
applicantId!: number;
33+
@Column({ type: DataType.UUIDV4 })
34+
applicantId!: string;
3535

3636
@ForeignKey(() => Position)
3737
@Column({ type: DataType.STRING })

backend/typescript/services/implementations/reviewPageService.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import IReviewPageService from "../interfaces/IReviewPageService";
33
import { getErrorMessage } from "../../utilities/errorUtils";
44
import logger from "../../utilities/logger";
55
import ApplicantRecord from "../../models/applicantRecord.model";
6-
import ReviewedApplicantRecord from "../../models/reviewedApplicantRecord.model";
76
import Applicant from "../../models/applicant.model";
87

98
const Logger = logger(__filename);

backend/typescript/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export type UserDTO = {
3434
};
3535

3636
export type ApplicationDTO = {
37-
id: number;
37+
id: string;
3838
academicOrCoop: string;
3939
academicYear: string;
4040
email: string;
@@ -58,7 +58,7 @@ export type ApplicationDTO = {
5858
};
5959

6060
export type ApplicantDTO = {
61-
id: number;
61+
id: string;
6262
academicOrCoop: string;
6363
academicYear: string; // MAYBE CHANGE WITH ENUM
6464
email: string;

0 commit comments

Comments
 (0)