Make DB id's nullable
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
export class Account {
|
||||
public id: number = -1;
|
||||
public id: number | null = null;
|
||||
public userName: string = "";
|
||||
public email: string = "";
|
||||
public emailVerified: boolean = false;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export class Company {
|
||||
public id: number = -1;
|
||||
public id: number | null = null;
|
||||
public name: string = "";
|
||||
public email: string = "";
|
||||
public emailVerified: boolean = false;
|
||||
@@ -14,7 +14,7 @@ export class Company {
|
||||
}
|
||||
|
||||
export class Employee {
|
||||
public id: number = -1;
|
||||
public id: number | null = null;
|
||||
public accountID: number = 0;
|
||||
public company: Company = new Company;
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
export class JobListing {
|
||||
public id: number = -1;
|
||||
public id: number | null = null;
|
||||
public companyID: number = 0;
|
||||
public title: string = "";
|
||||
public postalCode: string = "";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export class Resume {
|
||||
public id: number = -1;
|
||||
public id: number | null = null;
|
||||
public accountID: number = 0;
|
||||
public name: string = "";
|
||||
public field: string = "";
|
||||
@@ -20,7 +20,7 @@ export class Resume {
|
||||
}
|
||||
|
||||
export class ResumeExperience {
|
||||
id: number = -1;
|
||||
public id: number | null = null;
|
||||
resumeID: number = 0;
|
||||
jobTitle: string = "";
|
||||
company: string = "";
|
||||
@@ -35,14 +35,14 @@ export class ResumeExperience {
|
||||
}
|
||||
|
||||
export class ResumeExperienceBullet {
|
||||
id: number = -1;
|
||||
public id: number | null = null;
|
||||
resumeID: number = 0;
|
||||
resumeExperienceID: number = 0;
|
||||
jobFunction: string = "";
|
||||
}
|
||||
|
||||
export class ResumeMilitary {
|
||||
id: number = -1;
|
||||
public id: number | null = null;
|
||||
resumeID: number = 0;
|
||||
country: string = "";
|
||||
rank: string = "";
|
||||
@@ -53,7 +53,7 @@ export class ResumeMilitary {
|
||||
}
|
||||
|
||||
export class ResumeMilitaryBullet {
|
||||
id: number = -1;
|
||||
public id: number | null = null;
|
||||
resumeID: number = 0;
|
||||
resumeMilitaryID: number = 0;
|
||||
achievement: string = "";
|
||||
@@ -61,7 +61,7 @@ export class ResumeMilitaryBullet {
|
||||
}
|
||||
|
||||
export class ResumeEducation {
|
||||
id: number = -1;
|
||||
public id: number | null = null;
|
||||
resumeID: number = 0;
|
||||
degreeType: string = "";
|
||||
degreeField: string = "";
|
||||
@@ -76,21 +76,21 @@ export class ResumeEducation {
|
||||
}
|
||||
|
||||
export class ResumeSkill {
|
||||
id: number = -1;
|
||||
public id: number | null = null;
|
||||
resumeID: number = 0;
|
||||
name: string = "";
|
||||
description: string = "";
|
||||
}
|
||||
|
||||
export class ResumeLanguage {
|
||||
id: number = -1;
|
||||
public id: number | null = null;
|
||||
resumeID: number = 0;
|
||||
language: string = "";
|
||||
proficiency: string = "";
|
||||
}
|
||||
|
||||
export class ResumeCertification {
|
||||
id: number = -1;
|
||||
public id: number | null = null;
|
||||
resumeID: number = 0;
|
||||
name: string = "";
|
||||
verificationURL: string = "";
|
||||
@@ -98,7 +98,7 @@ export class ResumeCertification {
|
||||
}
|
||||
|
||||
export class ResumeProject {
|
||||
id: number = -1;
|
||||
public id: number | null = null;
|
||||
resumeID: number = 0;
|
||||
name: string = "";
|
||||
url: string = "";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace BoredCareers.Entities {
|
||||
public class Account {
|
||||
public int ID { get; set; } // PK
|
||||
public int? ID { get; set; } // PK
|
||||
public string UserName { get; set; } = "";
|
||||
public string Email { get; set; } = "";
|
||||
public string Role { get; set; } = "Generic";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace BoredCareers.Entities {
|
||||
|
||||
public class Company {
|
||||
public int ID { get; set; } // PK
|
||||
public int? ID { get; set; } // PK
|
||||
public string Name { get; set; } = "";
|
||||
public string Email { get; set; } = "";
|
||||
public bool EmailVerified { get; set; } = false;
|
||||
@@ -16,7 +16,7 @@ namespace BoredCareers.Entities {
|
||||
}
|
||||
|
||||
public class Employee {
|
||||
public int ID { get; set; } // PK
|
||||
public int? ID { get; set; } // PK
|
||||
public int AccountID { get; set; } // FK
|
||||
public Company Company { get; set; } = new Company(); // FK
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace BoredCareers.Entities {
|
||||
|
||||
public class JobListing {
|
||||
public int ID { get; set; } // PK
|
||||
public int? ID { get; set; } // PK
|
||||
public int CompanyID { get; set; } // FK
|
||||
public string Title { get; set; } = "";
|
||||
public string PostalCode { get; set; } = "";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace BoredCareers.Entities {
|
||||
|
||||
public class Resume {
|
||||
public int ID { get; set; } // PK
|
||||
public int? ID { get; set; } // PK
|
||||
public int AccountID { get; set; } // FK
|
||||
public string Name { get; set; } = "";
|
||||
public string Field { get; set; } = "";
|
||||
@@ -22,7 +22,7 @@ namespace BoredCareers.Entities {
|
||||
}
|
||||
|
||||
public class ResumeExperience {
|
||||
public int ID { get; set; } // PK
|
||||
public int? ID { get; set; } // PK
|
||||
public int ResumeID { get; set; } // FK
|
||||
public string JobTitle { get; set; } = "";
|
||||
public string Company { get; set; } = "";
|
||||
@@ -37,14 +37,14 @@ namespace BoredCareers.Entities {
|
||||
}
|
||||
|
||||
public class ResumeExperienceBullet {
|
||||
public int ID { get; set; } // PK
|
||||
public int? ID { get; set; } // PK
|
||||
public int ResumeID { get; set; } // FK
|
||||
public int ResumeExperienceID { get; set; } // FK
|
||||
public string JobFunction { get; set; } = "";
|
||||
}
|
||||
|
||||
public class ResumeMilitary {
|
||||
public int ID { get; set; } // PK
|
||||
public int? ID { get; set; } // PK
|
||||
public int ResumeID { get; set; } // FK
|
||||
public string Country { get; set; } = ""; // 2 Letter Country Code
|
||||
public string Rank { get; set; } = "";
|
||||
@@ -55,7 +55,7 @@ namespace BoredCareers.Entities {
|
||||
}
|
||||
|
||||
public class ResumeMilitaryBullet {
|
||||
public int ID { get; set; } // PK
|
||||
public int? ID { get; set; } // PK
|
||||
public int ResumeID { get; set; } // FK
|
||||
public int ResumeMilitaryID { get; set; } // FK
|
||||
public string Achievement { get; set; } = "";
|
||||
@@ -63,7 +63,7 @@ namespace BoredCareers.Entities {
|
||||
}
|
||||
|
||||
public class ResumeEducation {
|
||||
public int ID { get; set; } // PK
|
||||
public int? ID { get; set; } // PK
|
||||
public int ResumeID { get; set; } // FK
|
||||
public string DegreeType { get; set; } = "";
|
||||
public string DegreeField { get; set; } = "";
|
||||
@@ -78,21 +78,21 @@ namespace BoredCareers.Entities {
|
||||
}
|
||||
|
||||
public class ResumeSkill {
|
||||
public int ID { get; set; } // PK
|
||||
public int? ID { get; set; } // PK
|
||||
public int ResumeID { get; set; } // FK
|
||||
public string Name { get; set; } = "";
|
||||
public string Description { get; set; } = "";
|
||||
}
|
||||
|
||||
public class ResumeLanguage {
|
||||
public int ID { get; set; } // PK
|
||||
public int? ID { get; set; } // PK
|
||||
public int ResumeID { get; set; } // FK
|
||||
public string Language { get; set; } = "";
|
||||
public string Proficiency { get; set; } = "";
|
||||
}
|
||||
|
||||
public class ResumeCertification {
|
||||
public int ID { get; set; } // PK
|
||||
public int? ID { get; set; } // PK
|
||||
public int ResumeID { get; set; } // FK
|
||||
public string Name { get; set; } = "";
|
||||
public string VerificationURL { get; set; } = "";
|
||||
@@ -100,7 +100,7 @@ namespace BoredCareers.Entities {
|
||||
}
|
||||
|
||||
public class ResumeProject {
|
||||
public int ID { get; set; } // PK
|
||||
public int? ID { get; set; } // PK
|
||||
public int ResumeID { get; set; } // FK
|
||||
public string Name { get; set; } = "";
|
||||
public string URL { get; set; } = "";
|
||||
|
||||
Reference in New Issue
Block a user