This commit is contained in:
mahyargdz
2025-09-14 15:15:03 +03:30
commit be82059172
534 changed files with 51310 additions and 0 deletions
@@ -0,0 +1,14 @@
export enum JobType {
FullTime = "fullTime",
PartTime = "partTime",
Contract = "contract",
}
export interface IJob {
title: string;
description: string;
location: string;
type: JobType;
// salaryRange:string;
// skillsRequired:string[]
}
@@ -0,0 +1,14 @@
import { Types } from "mongoose";
import { StatusEnum } from "../../../../common/enums/status.enum";
export interface IResume {
job: Types.ObjectId;
// applicant: Types.ObjectId;
fullName: string;
fatherName: string;
placeOfBirth: string;
birthday: string;
resumeUrl: string;
status: StatusEnum;
}
+17
View File
@@ -0,0 +1,17 @@
import { Schema, model } from "mongoose";
import { IJob, JobType } from "./Abstraction/IJob";
const JobSchema = new Schema<IJob>(
{
title: { type: String, required: true },
description: { type: String, required: true },
location: { type: String, required: true },
type: { type: String, enum: JobType, required: true },
},
{ timestamps: true, toJSON: { versionKey: false, virtuals: true }, id: false },
);
const JobModel = model<IJob>("Job", JobSchema);
export { JobModel };
+21
View File
@@ -0,0 +1,21 @@
import { Schema, model } from "mongoose";
import { IResume } from "./Abstraction/IResume";
import { StatusEnum } from "../../../common/enums/status.enum";
const ResumeSchema = new Schema<IResume>(
{
job: { type: Schema.Types.ObjectId, ref: "Job", required: true },
fullName: { type: String, ref: "Job", required: true },
fatherName: { type: String, ref: "Job", required: true },
placeOfBirth: { type: String, ref: "Job", required: true },
birthday: { type: String, ref: "Job", required: true },
resumeUrl: { type: String, required: true },
status: { type: String, enum: StatusEnum, default: StatusEnum.Pending },
},
{ timestamps: true, toJSON: { versionKey: false, virtuals: true }, id: false },
);
const ResumeModel = model<IResume>("Resume", ResumeSchema);
export { ResumeModel };