Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
11a9355
commit 6f83e89
Showing
22 changed files
with
889 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
PORT= | ||
CLIENT_PORT= | ||
CLIENT_PORT= | ||
DB_NAME= | ||
DB_USER= | ||
DB_PASS= | ||
DB_HOST= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm"; | ||
import { EmployeesProfiles } from "./EmployeesProfiles"; | ||
|
||
@Index("assignment_employee_id_fk_idx", ["employeeId"], {}) | ||
@Entity("assignment", { schema: "hackathon" }) | ||
export class Assignment { | ||
@Column("int", { primary: true, name: "assignment_id" }) | ||
assignmentId: number; | ||
|
||
@Column("varchar", { name: "employee_id", length: 36 }) | ||
employeeId: string; | ||
|
||
@Column("varchar", { name: "workgroup", length: 128 }) | ||
workgroup: string; | ||
|
||
@Column("varchar", { name: "cost_center", length: 128 }) | ||
costCenter: string; | ||
|
||
@Column("varchar", { name: "sdm_reporting_manager", length: 256 }) | ||
sdmReportingManager: string; | ||
|
||
@Column("int", { name: "allocation_percentage" }) | ||
allocationPercentage: number; | ||
|
||
@Column("date", { name: "start_date" }) | ||
startDate: string; | ||
|
||
@Column("date", { name: "release_date", nullable: true }) | ||
releaseDate: string | null; | ||
|
||
@ManyToOne( | ||
() => EmployeesProfiles, | ||
(employeesProfiles) => employeesProfiles.assignments, | ||
{ onDelete: "NO ACTION", onUpdate: "NO ACTION" } | ||
) | ||
@JoinColumn([{ name: "employee_id", referencedColumnName: "id" }]) | ||
employee: EmployeesProfiles; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Column, Entity, OneToMany } from "typeorm"; | ||
import { Certifications } from "./Certifications"; | ||
|
||
@Entity("certification_providers", { schema: "hackathon" }) | ||
export class CertificationProviders { | ||
@Column("int", { primary: true, name: "certificatoin_provider_id" }) | ||
certificatoinProviderId: number; | ||
|
||
@Column("varchar", { name: "certification_provider_name", length: 128 }) | ||
certificationProviderName: string; | ||
|
||
@OneToMany( | ||
() => Certifications, | ||
(certifications) => certifications.certificationProvider | ||
) | ||
certifications: Certifications[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { | ||
Column, | ||
Entity, | ||
Index, | ||
JoinColumn, | ||
ManyToOne, | ||
OneToMany, | ||
} from "typeorm"; | ||
import { CertificationProviders } from "./CertificationProviders"; | ||
import { EmployeeCertifications } from "./EmployeeCertifications"; | ||
|
||
@Index("certifications_provider_id_fk_idx", ["certificationProviderId"], {}) | ||
@Entity("certifications", { schema: "hackathon" }) | ||
export class Certifications { | ||
@Column("int", { primary: true, name: "certification_id" }) | ||
certificationId: number; | ||
|
||
@Column("int", { name: "certification_provider_id" }) | ||
certificationProviderId: number; | ||
|
||
@Column("varchar", { name: "certification_name", length: 128 }) | ||
certificationName: string; | ||
|
||
@ManyToOne( | ||
() => CertificationProviders, | ||
(certificationProviders) => certificationProviders.certifications, | ||
{ onDelete: "NO ACTION", onUpdate: "NO ACTION" } | ||
) | ||
@JoinColumn([ | ||
{ | ||
name: "certification_provider_id", | ||
referencedColumnName: "certificatoinProviderId", | ||
}, | ||
]) | ||
certificationProvider: CertificationProviders; | ||
|
||
@OneToMany( | ||
() => EmployeeCertifications, | ||
(employeeCertifications) => employeeCertifications.certification | ||
) | ||
employeeCertifications: EmployeeCertifications[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm"; | ||
import { Certifications } from "./Certifications"; | ||
import { EmployeesProfiles } from "./EmployeesProfiles"; | ||
|
||
@Index("employee_certification_employee_id_fk_idx", ["employeeId"], {}) | ||
@Index( | ||
"employee_certification_certification_id_fk_idx", | ||
["certificationId"], | ||
{} | ||
) | ||
@Entity("employee_certifications", { schema: "hackathon" }) | ||
export class EmployeeCertifications { | ||
@Column("varchar", { primary: true, name: "employee_id", length: 36 }) | ||
employeeId: string; | ||
|
||
@Column("int", { primary: true, name: "certification_id" }) | ||
certificationId: number; | ||
|
||
@Column("date", { name: "expiration_date", nullable: true }) | ||
expirationDate: string | null; | ||
|
||
@ManyToOne( | ||
() => Certifications, | ||
(certifications) => certifications.employeeCertifications, | ||
{ onDelete: "NO ACTION", onUpdate: "NO ACTION" } | ||
) | ||
@JoinColumn([ | ||
{ name: "certification_id", referencedColumnName: "certificationId" }, | ||
]) | ||
certification: Certifications; | ||
|
||
@ManyToOne( | ||
() => EmployeesProfiles, | ||
(employeesProfiles) => employeesProfiles.employeeCertifications, | ||
{ onDelete: "NO ACTION", onUpdate: "NO ACTION" } | ||
) | ||
@JoinColumn([{ name: "employee_id", referencedColumnName: "id" }]) | ||
employee: EmployeesProfiles; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm"; | ||
import { Skills } from "./Skills"; | ||
import { EmployeesProfiles } from "./EmployeesProfiles"; | ||
|
||
@Index("Employee_ID_idx", ["employeeId"], {}) | ||
@Index("Skill_ID_idx", ["skillId"], {}) | ||
@Entity("employee_skills", { schema: "hackathon" }) | ||
export class EmployeeSkills { | ||
@Column("varchar", { primary: true, name: "employee_id", length: 36 }) | ||
employeeId: string; | ||
|
||
@Column("int", { primary: true, name: "skill_id" }) | ||
skillId: number; | ||
|
||
@Column("varchar", { name: "experience_level", length: 32 }) | ||
experienceLevel: string; | ||
|
||
@Column("date", { name: "last_used_date" }) | ||
lastUsedDate: string; | ||
|
||
@ManyToOne(() => Skills, (skills) => skills.employeeSkills, { | ||
onDelete: "NO ACTION", | ||
onUpdate: "NO ACTION", | ||
}) | ||
@JoinColumn([{ name: "skill_id", referencedColumnName: "skillId" }]) | ||
skill: Skills; | ||
|
||
@ManyToOne( | ||
() => EmployeesProfiles, | ||
(employeesProfiles) => employeesProfiles.employeeSkills, | ||
{ onDelete: "NO ACTION", onUpdate: "NO ACTION" } | ||
) | ||
@JoinColumn([{ name: "employee_id", referencedColumnName: "id" }]) | ||
employee: EmployeesProfiles; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm"; | ||
import { EmployeesProfiles } from "./EmployeesProfiles"; | ||
import { Skills } from "./Skills"; | ||
|
||
@Index("employee_skill_history_employee_id_fk_idx", ["employeeId"], {}) | ||
@Index("employee_skills_history_skill_id_fk_idx", ["skillId"], {}) | ||
@Entity("employee_skills_history", { schema: "hackathon" }) | ||
export class EmployeeSkillsHistory { | ||
@Column("varchar", { primary: true, name: "employee_id", length: 36 }) | ||
employeeId: string; | ||
|
||
@Column("int", { primary: true, name: "skill_id" }) | ||
skillId: number; | ||
|
||
@Column("varchar", { name: "experience_level", length: 32 }) | ||
experienceLevel: string; | ||
|
||
@Column("date", { name: "last_used_date" }) | ||
lastUsedDate: string; | ||
|
||
@Column("date", { name: "created_on" }) | ||
createdOn: string; | ||
|
||
@Column("varchar", { name: "manager_name", length: 256 }) | ||
managerName: string; | ||
|
||
@Column("varchar", { name: "title", length: 128 }) | ||
title: string; | ||
|
||
@Column("varchar", { name: "function", length: 128 }) | ||
function: string; | ||
|
||
@ManyToOne( | ||
() => EmployeesProfiles, | ||
(employeesProfiles) => employeesProfiles.employeeSkillsHistories, | ||
{ onDelete: "NO ACTION", onUpdate: "NO ACTION" } | ||
) | ||
@JoinColumn([{ name: "employee_id", referencedColumnName: "id" }]) | ||
employee: EmployeesProfiles; | ||
|
||
@ManyToOne(() => Skills, (skills) => skills.employeeSkillsHistories, { | ||
onDelete: "NO ACTION", | ||
onUpdate: "NO ACTION", | ||
}) | ||
@JoinColumn([{ name: "skill_id", referencedColumnName: "skillId" }]) | ||
skill: Skills; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm"; | ||
import { EmployeesProfiles } from "./EmployeesProfiles"; | ||
|
||
@Index("employee_id_idx", ["employeeId"], {}) | ||
@Entity("employee_training", { schema: "hackathon" }) | ||
export class EmployeeTraining { | ||
@Column("varchar", { primary: true, name: "employee_id", length: 36 }) | ||
employeeId: string; | ||
|
||
@Column("varchar", { | ||
primary: true, | ||
name: "training_activity_name", | ||
length: 256, | ||
}) | ||
trainingActivityName: string; | ||
|
||
@Column("varchar", { name: "training_event_name", length: 256 }) | ||
trainingEventName: string; | ||
|
||
@Column("date", { name: "event_from_date" }) | ||
eventFromDate: string; | ||
|
||
@Column("date", { name: "event_to_date" }) | ||
eventToDate: string; | ||
|
||
@Column("int", { name: "total_training_hours" }) | ||
totalTrainingHours: number; | ||
|
||
@ManyToOne( | ||
() => EmployeesProfiles, | ||
(employeesProfiles) => employeesProfiles.employeeTrainings, | ||
{ onDelete: "NO ACTION", onUpdate: "NO ACTION" } | ||
) | ||
@JoinColumn([{ name: "employee_id", referencedColumnName: "id" }]) | ||
employee: EmployeesProfiles; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
import { | ||
Column, | ||
Entity, | ||
Index, | ||
JoinColumn, | ||
ManyToOne, | ||
OneToMany, | ||
} from "typeorm"; | ||
import { Assignment } from "./Assignment"; | ||
import { EmployeeCertifications } from "./EmployeeCertifications"; | ||
import { EmployeeSkills } from "./EmployeeSkills"; | ||
import { EmployeeSkillsHistory } from "./EmployeeSkillsHistory"; | ||
import { EmployeeTraining } from "./EmployeeTraining"; | ||
import { Managers } from "./Managers"; | ||
import { ReleaseRequests } from "./ReleaseRequests"; | ||
|
||
@Index("manager_id_fk_idx", ["directManager"], {}) | ||
@Entity("employees_profiles", { schema: "hackathon" }) | ||
export class EmployeesProfiles { | ||
@Column("varchar", { primary: true, name: "id", length: 36 }) | ||
id: string; | ||
|
||
@Column("varchar", { name: "name", length: 256 }) | ||
name: string; | ||
|
||
@Column("varchar", { name: "title", length: 128 }) | ||
title: string; | ||
|
||
@Column("date", { name: "hiring_date" }) | ||
hiringDate: string; | ||
|
||
@Column("varchar", { name: "function", length: 128 }) | ||
function: string; | ||
|
||
@Column("varchar", { name: "direct_manager", length: 36 }) | ||
directManager: string; | ||
|
||
@Column("varchar", { name: "workgroup", length: 128 }) | ||
workgroup: string; | ||
|
||
@Column("varchar", { name: "employment_type", length: 64 }) | ||
employmentType: string; | ||
|
||
@Column("int", { name: "allocation_percentage" }) | ||
allocationPercentage: number; | ||
|
||
@Column("date", { name: "skills_last_update_date", nullable: true }) | ||
skillsLastUpdateDate: string | null; | ||
|
||
@Column("varchar", { name: "employee_email", length: 320 }) | ||
employeeEmail: string; | ||
|
||
@Column("varchar", { | ||
name: "employee_profile_picture", | ||
nullable: true, | ||
length: 45, | ||
}) | ||
employeeProfilePicture: string | null; | ||
|
||
@Column("varchar", { name: "mobile_number", length: 20 }) | ||
mobileNumber: string; | ||
|
||
@Column("varchar", { name: "cost_center", length: 128 }) | ||
costCenter: string; | ||
|
||
@OneToMany(() => Assignment, (assignment) => assignment.employee) | ||
assignments: Assignment[]; | ||
|
||
@OneToMany( | ||
() => EmployeeCertifications, | ||
(employeeCertifications) => employeeCertifications.employee | ||
) | ||
employeeCertifications: EmployeeCertifications[]; | ||
|
||
@OneToMany(() => EmployeeSkills, (employeeSkills) => employeeSkills.employee) | ||
employeeSkills: EmployeeSkills[]; | ||
|
||
@OneToMany( | ||
() => EmployeeSkillsHistory, | ||
(employeeSkillsHistory) => employeeSkillsHistory.employee | ||
) | ||
employeeSkillsHistories: EmployeeSkillsHistory[]; | ||
|
||
@OneToMany( | ||
() => EmployeeTraining, | ||
(employeeTraining) => employeeTraining.employee | ||
) | ||
employeeTrainings: EmployeeTraining[]; | ||
|
||
@ManyToOne(() => Managers, (managers) => managers.employeesProfiles, { | ||
onDelete: "NO ACTION", | ||
onUpdate: "NO ACTION", | ||
}) | ||
@JoinColumn([{ name: "direct_manager", referencedColumnName: "id" }]) | ||
directManager2: Managers; | ||
|
||
@OneToMany( | ||
() => ReleaseRequests, | ||
(releaseRequests) => releaseRequests.employee | ||
) | ||
releaseRequests: ReleaseRequests[]; | ||
} |
Oops, something went wrong.