Skip to content

Commit 023ac57

Browse files
add selected for interview
1 parent af7a365 commit 023ac57

File tree

4 files changed

+21
-2
lines changed

4 files changed

+21
-2
lines changed

backend/typescript/migrations/2025.06.21T15.30.15.create-applicant-record.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ export const up: Migration = async ({ context: sequelize }) => {
5757
type: DataType.STRING,
5858
allowNull: true,
5959
},
60+
selectedForInterview: {
61+
type: DataType.BOOLEAN,
62+
allowNull: false,
63+
defaultValue: false,
64+
},
6065
extraInfo: {
6166
type: DataType.JSONB,
6267
allowNull: true,

backend/typescript/models/applicant.model.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ import { Column, DataType, Model, Table } from "sequelize-typescript";
44

55
@Table({ tableName: "applicantresponse" })
66
export default class Applicant extends Model {
7-
@Column({ type: DataType.STRING, primaryKey: true })
7+
@Column({
8+
type: DataType.INTEGER,
9+
primaryKey: true,
10+
unique: true,
11+
autoIncrement: true,
12+
})
813
id!: string;
914

1015
@Column({ type: DataType.STRING })

backend/typescript/models/applicantRecord.model.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@ import Position from "./position.model";
1717

1818
@Table({ tableName: "applicantresponse" })
1919
export default class ApplicantRecord extends Model {
20-
@Column({ type: DataType.STRING, primaryKey: true })
20+
@Column({
21+
type: DataType.INTEGER,
22+
primaryKey: true,
23+
unique: true,
24+
autoIncrement: true,
25+
})
2126
id!: string;
2227

2328
@ForeignKey(() => Applicant)
@@ -40,6 +45,9 @@ export default class ApplicantRecord extends Model {
4045
@Column({ type: DataType.STRING, allowNull: true })
4146
skillCategory!: SkillCategory;
4247

48+
@Column({ type: DataType.BOOLEAN })
49+
selectedForInterview!: boolean;
50+
4351
@Column({ type: DataType.JSONB, allowNull: true })
4452
extraInfo!: ApplicantRecordExtraInfo;
4553
}

backend/typescript/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ export type ApplicantRecordDTO = {
102102
roleSpecificQuestions: string[];
103103
choice: number;
104104
status: ApplicationStatus;
105+
selectedForInterview: boolean;
105106
skillCategory?: SkillCategory;
106107
};
107108

0 commit comments

Comments
 (0)