because I got bored of customising my CV for every job
at main 46 lines 1.1 kB view raw
1import { BaseEntity } from "@cv/system"; 2import { CV } from "@/modules/cv-template/graphql/cv.type"; 3import { Vacancy } from "@/modules/vacancies/vacancy.entity"; 4 5export interface ApplicationStatusRelation { 6 id: string; 7 name: string; 8 description: string | null; 9 createdAt: Date; 10 updatedAt: Date; 11} 12 13export class Application extends BaseEntity { 14 userId: string; 15 vacancy: Vacancy; 16 cv: CV | null; 17 coverLetter?: string; 18 statusId: string; 19 status: ApplicationStatusRelation; 20 appliedAt: Date; 21 22 constructor( 23 id: string, 24 userId: string, 25 vacancy: Vacancy, 26 statusId: string, 27 status: ApplicationStatusRelation, 28 appliedAt: Date, 29 createdAt: Date, 30 updatedAt: Date, 31 cv: CV | null = null, 32 coverLetter?: string, 33 ) { 34 super(id, createdAt, updatedAt); 35 this.userId = userId; 36 this.vacancy = vacancy; 37 this.statusId = statusId; 38 this.status = status; 39 this.appliedAt = appliedAt; 40 this.cv = cv; 41 42 if (coverLetter !== undefined) { 43 this.coverLetter = coverLetter; 44 } 45 } 46}