Align the Entities to the database
Docker Build and Release Upload / build (push) Failing after 1m1s
Docker Build and Release Upload / build (push) Failing after 1m1s
This commit is contained in:
+5
-3
@@ -14,7 +14,10 @@ CREATE TABLE IF NOT EXISTS `Account` (
|
||||
`CurrentPasswordAttempts` int(11) DEFAULT NULL,
|
||||
`Role` varchar(45) DEFAULT NULL,
|
||||
`EmailToken` varchar(45) DEFAULT NULL,
|
||||
`DataServer` varchar(200) DEFAULT NULL,
|
||||
`ServerRegion` varchar(10) DEFAULT NULL,
|
||||
UNIQUE(`Email`),
|
||||
UNIQUE(`UserName`),
|
||||
PRIMARY KEY (`ID`)
|
||||
) AUTO_INCREMENT=1;
|
||||
|
||||
@@ -22,6 +25,7 @@ CREATE TABLE IF NOT EXISTS `Account` (
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `Resume` (
|
||||
`ID` int NOT NULL AUTO_INCREMENT,
|
||||
`AccountID` int NOT NULL,
|
||||
`Name` varchar(100) NOT NULL,
|
||||
`Field` varchar(100) DEFAULT NULL,
|
||||
`Email` varchar(255) NOT NULL,
|
||||
@@ -31,7 +35,6 @@ CREATE TABLE IF NOT EXISTS `Resume` (
|
||||
`StateOrRegion` varchar(100) NOT NULL,
|
||||
`City` varchar(100) NOT NULL,
|
||||
`IsActive` boolean DEFAULT 0,
|
||||
`AccountID` int NOT NULL,
|
||||
PRIMARY KEY (`ID`),
|
||||
FOREIGN KEY (`AccountID`) REFERENCES `Account`(`ID`) ON DELETE CASCADE
|
||||
) AUTO_INCREMENT=1;
|
||||
@@ -143,7 +146,7 @@ CREATE TABLE IF NOT EXISTS `Company` (
|
||||
`Name` varchar(100) DEFAULT NULL,
|
||||
`Email` varchar(255) DEFAULT NULL,
|
||||
`EmailVerified` boolean DEFAULT 0,
|
||||
`Website` VARCHAR(255) DEFAULT NULL,
|
||||
`WebsiteURL` VARCHAR(255) DEFAULT NULL,
|
||||
`LogoURL` VARCHAR(2048) DEFAULT NULL,
|
||||
`Phone` VARCHAR(20) DEFAULT NULL,
|
||||
`PostalCode` varchar(20) NOT NULL,
|
||||
@@ -166,7 +169,6 @@ CREATE TABLE IF NOT EXISTS `JobListing` (
|
||||
`SalaryMax` int NOT NULL,
|
||||
`JobType` varchar(20) NOT NULL,
|
||||
`Remote` boolean DEFAULT 0,
|
||||
`URL` varchar(2048) DEFAULT NULL,
|
||||
`Description` text NOT NULL,
|
||||
PRIMARY KEY (`ID`),
|
||||
FOREIGN KEY (`CompanyID`) REFERENCES `Company`(`ID`) ON DELETE CASCADE
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
namespace BoredCareers.Entities {
|
||||
public class Account {
|
||||
public int ID { get; set; } // PK
|
||||
public string UserName { get; set; } = "";
|
||||
public string Email { get; set; } = "";
|
||||
public bool EmailVerified { get; set; } = false;
|
||||
public string PasswordHash { get; set; } = "";
|
||||
public bool FailedPasswordLock { get; set; } = false;
|
||||
public int PasswordAttempts { get; set; } = 5;
|
||||
public int CurrentPasswordAttempts { get; set; } = 0;
|
||||
public string Role { get; set; } = "Generic";
|
||||
public string EmailToken { get; set; } = "";
|
||||
public string DataServer { get; set; } = "";
|
||||
public string Error { get; set; } = "";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
namespace BoredCareers.Entities {
|
||||
|
||||
public class Company {
|
||||
public int ID { get; set; } // PK
|
||||
public string Name { get; set; } = "";
|
||||
public string Email { get; set; } = "";
|
||||
public bool EmailVerified { get; set; } = false;
|
||||
public string WebsiteURL { get; set; } = "";
|
||||
public string LogoURL { get; set; } = "";
|
||||
public string Phone { get; set; } = "";
|
||||
public string PostalCode { get; set; } = "";
|
||||
public string Country { get; set; } = ""; // 2 Letter Country Code
|
||||
public string StateOrRegion { get; set; } = "";
|
||||
public string City { get; set; } = "";
|
||||
public string Description { get; set; } = "";
|
||||
}
|
||||
|
||||
public class JobListing {
|
||||
public int ID { get; set; } // PK
|
||||
public int CompanyID { get; set; } // FK
|
||||
public string Title { get; set; } = "";
|
||||
public string PostalCode { get; set; } = "";
|
||||
public string Country { get; set; } = ""; // 2 Letter Country Code
|
||||
public string StateOrRegion { get; set; } = "";
|
||||
public string City { get; set; } = "";
|
||||
public int SalaryMin { get; set; } = 0;
|
||||
public int SalaryMax { get; set; } = 0;
|
||||
public string JobType { get; set; } = "";
|
||||
public bool Remote { get; set; } = false;
|
||||
public string Description { get; set; } = "";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
// Reflections of SQL Database objects
|
||||
|
||||
namespace BoredCareers.Entities {
|
||||
|
||||
public class Account {
|
||||
public int ID { get; set; } // PK
|
||||
public string UserName { get; set; } = "";
|
||||
public string Email { get; set; } = "";
|
||||
public bool EmailVerified { get; set; } = false;
|
||||
public string PasswordHash { get; set; } = "";
|
||||
public bool FailedPasswordLock { get; set; } = false;
|
||||
public int PasswordAttempts { get; set; } = 5;
|
||||
public int CurrentPasswordAttempts { get; set; } = 0;
|
||||
public string Role { get; set; } = "Generic";
|
||||
public string EmailToken { get; set; } = "";
|
||||
public string Error { get; set; } = "";
|
||||
}
|
||||
|
||||
public class Product {
|
||||
public int ID { get; set; } // PK
|
||||
public string Name { get; set; } = "";
|
||||
public string Description { get; set; } = "";
|
||||
public ProductImage[] Images { get; set; } = [];
|
||||
public int Cost { get; set; }
|
||||
public string URL { get; set; } = "";
|
||||
}
|
||||
|
||||
public class ProductImage {
|
||||
public int ImageID { get; set; } // PK
|
||||
public int ProductID { get; set; } // PK
|
||||
public byte[] Image { get; set; } = Array.Empty<byte>();
|
||||
public string Name { get; set; } = "";
|
||||
}
|
||||
|
||||
public class ProductInventory {
|
||||
public int AccountID { get; set; } // PK
|
||||
public int ProductID { get; set; } // PK
|
||||
public string Key { get; set; } = string.Empty; // PK
|
||||
public string Value { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class Cart {
|
||||
public int ID { get; set; } // PK
|
||||
public int AccountID { get; set; }
|
||||
public int ProductID { get; set; }
|
||||
}
|
||||
|
||||
public class Receipt {
|
||||
public int AccountID { get; set; } // PK
|
||||
public int ProductID { get; set; } // PK
|
||||
public string ReceiptID { get; set; } = string.Empty; // PK
|
||||
public int LineItem { get; set; }
|
||||
public DateTime Time { get; set; }
|
||||
public int TaxAmount { get; set; }
|
||||
public int TotalCost { get; set; }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
namespace BoredCareers.Entities {
|
||||
|
||||
public class Resume {
|
||||
public int ID { get; set; } // PK
|
||||
public int AccountID { get; set; } // FK
|
||||
public string Name { get; set; } = "";
|
||||
public string Field { get; set; } = "";
|
||||
public string Email { get; set; } = "";
|
||||
public string PhoneNumber { get; set; } = "";
|
||||
public string PostalCode { get; set; } = "";
|
||||
public string Country { get; set; } = ""; // 2 Letter Country Code
|
||||
public string StateOrRegion { get; set; } = "";
|
||||
public string City { get; set; } = "";
|
||||
public bool IsActive { get; set; } = false;
|
||||
}
|
||||
|
||||
public class ResumeExperience {
|
||||
public int ID { get; set; } // PK
|
||||
public int ResumeID { get; set; } // FK
|
||||
public string JobTitle { get; set; } = "";
|
||||
public string Company { get; set; } = "";
|
||||
public string PostalCode { get; set; } = "";
|
||||
public string Country { get; set; } = ""; // 2 Letter Country Code
|
||||
public string StateOrRegion { get; set; } = "";
|
||||
public string City { get; set; } = "";
|
||||
public DateTime DateStarted { get; set; } = new DateTime();
|
||||
public bool StillEmployed { get; set; } = false;
|
||||
public DateTime DateEnded { get; set; } = new DateTime();
|
||||
}
|
||||
|
||||
public class ResumeExperienceBullet {
|
||||
public int ID { get; set; } // PK
|
||||
public int ResumeExperienceID { get; set; } // FK
|
||||
public string JobFunction { get; set; } = "";
|
||||
}
|
||||
|
||||
public class ResumeMillitary {
|
||||
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; } = "";
|
||||
public DateTime DateStarted { get; set; } = new DateTime();
|
||||
public bool StillServing { get; set; } = false;
|
||||
public DateTime DateEnded { get; set; } = new DateTime();
|
||||
}
|
||||
|
||||
public class ResumeMillitaryBullet {
|
||||
public int ID { get; set; } // PK
|
||||
public int ResumeMillitaryID { get; set; } // FK
|
||||
public string Achevement { get; set; } = "";
|
||||
public string Description { get; set; } = "";
|
||||
}
|
||||
|
||||
public class ResumeEducation {
|
||||
public int ID { get; set; } // PK
|
||||
public int ResumeID { get; set; } // FK
|
||||
public string DegreeType { get; set; } = "";
|
||||
public string DegreeField { get; set; } = "";
|
||||
public string School { get; set; } = "";
|
||||
public string PostalCode { get; set; } = "";
|
||||
public string Country { get; set; } = ""; // 2 Letter Country Code
|
||||
public string StateOrRegion { get; set; } = "";
|
||||
public string City { get; set; } = "";
|
||||
public DateTime DateStarted { get; set; } = new DateTime();
|
||||
public bool StillStudying { get; set; } = false;
|
||||
public DateTime DateEnded { get; set; } = new DateTime();
|
||||
}
|
||||
|
||||
public class ResumeSkill {
|
||||
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 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 ResumeID { get; set; } // FK
|
||||
public string Name { get; set; } = "";
|
||||
public string VerificationURL { get; set; } = "";
|
||||
public string Description { get; set; } = "";
|
||||
}
|
||||
|
||||
public class ResumeProject {
|
||||
public int ID { get; set; } // PK
|
||||
public int ResumeID { get; set; } // FK
|
||||
public string Name { get; set; } = "";
|
||||
public string URL { get; set; } = "";
|
||||
public string Description { get; set; } = "";
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user