working #18

Merged
derek merged 19 commits from working into main 2025-08-04 21:16:01 -07:00
4 changed files with 13 additions and 2 deletions
Showing only changes of commit ca21bd6c5b - Show all commits
+1
View File
@@ -186,6 +186,7 @@ CREATE TABLE IF NOT EXISTS `JobApplication` (
`AccountID` int NOT NULL, `AccountID` int NOT NULL,
`ResumeID` int NOT NULL, `ResumeID` int NOT NULL,
`JobListingID` int NOT NULL, `JobListingID` int NOT NULL,
`ResponseEmail` varchar(255) DEFAULT NULL,
`DateApplied` datetime DEFAULT NULL, `DateApplied` datetime DEFAULT NULL,
`ResponseStatus` varchar(50) NOT NULL DEFAULT 'Pending', `ResponseStatus` varchar(50) NOT NULL DEFAULT 'Pending',
`HasBeenViewed` boolean DEFAULT 0, `HasBeenViewed` boolean DEFAULT 0,
+1
View File
@@ -3,6 +3,7 @@ export class Application {
public accountID: number = 0; public accountID: number = 0;
public resumeID: number = 0; public resumeID: number = 0;
public jobListingID: number = 0; public jobListingID: number = 0;
public responseEmail: string = "";
public dateApplied: Date = new Date(); public dateApplied: Date = new Date();
public responseStatus: string = ""; public responseStatus: string = "";
public hasBeenViewed: boolean = false; public hasBeenViewed: boolean = false;
+1
View File
@@ -4,6 +4,7 @@ namespace BoredCareers.Entities {
public int AccountID { get; set; } // FK public int AccountID { get; set; } // FK
public int ResumeID { get; set; } // FK public int ResumeID { get; set; } // FK
public int JobListingID { get; set; } // FK public int JobListingID { get; set; } // FK
public string ResponseEmail { get; set; } = "";
public DateTime DateApplied { get; set; } public DateTime DateApplied { get; set; }
public string ResponseStatus { get; set; } = ""; public string ResponseStatus { get; set; } = "";
public bool HasBeenViewed { get; set; } = false; public bool HasBeenViewed { get; set; } = false;
@@ -25,6 +25,7 @@ namespace BoredCareers.Services.DatabaseService {
int _accountid = reader.GetInt32("AccountID"); int _accountid = reader.GetInt32("AccountID");
int _resumeid = reader.GetInt32("ResumeID"); int _resumeid = reader.GetInt32("ResumeID");
int _joblistingid = reader.GetInt32("JobListingID"); int _joblistingid = reader.GetInt32("JobListingID");
string _responseemail = reader.GetString("ResponseEmail");
DateTime _dateapplied = reader.GetDateTime("DateApplied"); DateTime _dateapplied = reader.GetDateTime("DateApplied");
string _responsestatus = reader.GetString("ResponseStatus"); string _responsestatus = reader.GetString("ResponseStatus");
bool _hasbeenviewed = reader.GetBoolean("HasBeenViewed"); bool _hasbeenviewed = reader.GetBoolean("HasBeenViewed");
@@ -36,6 +37,7 @@ namespace BoredCareers.Services.DatabaseService {
AccountID = _accountid, AccountID = _accountid,
ResumeID = _resumeid, ResumeID = _resumeid,
JobListingID = _joblistingid, JobListingID = _joblistingid,
ResponseEmail = _responseemail,
DateApplied = _dateapplied, DateApplied = _dateapplied,
ResponseStatus = _responsestatus, ResponseStatus = _responsestatus,
HasBeenViewed = _hasbeenviewed, HasBeenViewed = _hasbeenviewed,
@@ -67,6 +69,7 @@ namespace BoredCareers.Services.DatabaseService {
int _accountid = reader.GetInt32("AccountID"); int _accountid = reader.GetInt32("AccountID");
int _resumeid = reader.GetInt32("ResumeID"); int _resumeid = reader.GetInt32("ResumeID");
int _joblistingid = reader.GetInt32("JobListingID"); int _joblistingid = reader.GetInt32("JobListingID");
string _responseemail = reader.GetString("ResponseEmail");
DateTime _dateapplied = reader.GetDateTime("DateApplied"); DateTime _dateapplied = reader.GetDateTime("DateApplied");
string _responsestatus = reader.GetString("ResponseStatus"); string _responsestatus = reader.GetString("ResponseStatus");
bool _hasbeenviewed = reader.GetBoolean("HasBeenViewed"); bool _hasbeenviewed = reader.GetBoolean("HasBeenViewed");
@@ -78,6 +81,7 @@ namespace BoredCareers.Services.DatabaseService {
AccountID = _accountid, AccountID = _accountid,
ResumeID = _resumeid, ResumeID = _resumeid,
JobListingID = _joblistingid, JobListingID = _joblistingid,
ResponseEmail = _responseemail,
DateApplied = _dateapplied, DateApplied = _dateapplied,
ResponseStatus = _responsestatus, ResponseStatus = _responsestatus,
HasBeenViewed = _hasbeenviewed, HasBeenViewed = _hasbeenviewed,
@@ -109,6 +113,7 @@ namespace BoredCareers.Services.DatabaseService {
int _accountid = reader.GetInt32("AccountID"); int _accountid = reader.GetInt32("AccountID");
int _resumeid = reader.GetInt32("ResumeID"); int _resumeid = reader.GetInt32("ResumeID");
int _joblistingid = reader.GetInt32("JobListingID"); int _joblistingid = reader.GetInt32("JobListingID");
string _responseemail = reader.GetString("ResponseEmail");
DateTime _dateapplied = reader.GetDateTime("DateApplied"); DateTime _dateapplied = reader.GetDateTime("DateApplied");
string _responsestatus = reader.GetString("ResponseStatus"); string _responsestatus = reader.GetString("ResponseStatus");
bool _hasbeenviewed = reader.GetBoolean("HasBeenViewed"); bool _hasbeenviewed = reader.GetBoolean("HasBeenViewed");
@@ -120,6 +125,7 @@ namespace BoredCareers.Services.DatabaseService {
AccountID = _accountid, AccountID = _accountid,
ResumeID = _resumeid, ResumeID = _resumeid,
JobListingID = _joblistingid, JobListingID = _joblistingid,
ResponseEmail = _responseemail,
DateApplied = _dateapplied, DateApplied = _dateapplied,
ResponseStatus = _responsestatus, ResponseStatus = _responsestatus,
HasBeenViewed = _hasbeenviewed, HasBeenViewed = _hasbeenviewed,
@@ -140,13 +146,14 @@ namespace BoredCareers.Services.DatabaseService {
await connection.OpenAsync(); await connection.OpenAsync();
string command = @" string command = @"
INSERT INTO JobApplication INSERT INTO JobApplication
(ID,AccountID,ResumeID,JobListingID,DateApplied,ResponseStatus,HasBeenViewed,Rating,Notes) (ID,AccountID,ResumeID,JobListingID,ResponseEmail,DateApplied,ResponseStatus,HasBeenViewed,Rating,Notes)
VALUES VALUES
(@ID,@AccountID,@ResumeID,@JobListingID,@DateApplied,@ResponseStatus,@HasBeenViewed,@Rating,@Notes) (@ID,@AccountID,@ResumeID,@JobListingID,@ResponseEmail,@DateApplied,@ResponseStatus,@HasBeenViewed,@Rating,@Notes)
ON DUPLICATE KEY UPDATE ON DUPLICATE KEY UPDATE
AccountID = @AccountID, AccountID = @AccountID,
ResumeID = @ResumeID, ResumeID = @ResumeID,
JobListingID = @JobListingID, JobListingID = @JobListingID,
ResponseEmail = @ResponseEmail,
ResponseStatus = @ResponseStatus, ResponseStatus = @ResponseStatus,
HasBeenViewed = @HasBeenViewed, HasBeenViewed = @HasBeenViewed,
Rating = @Rating, Rating = @Rating,
@@ -158,6 +165,7 @@ namespace BoredCareers.Services.DatabaseService {
cmd.Parameters.AddWithValue("@AccountID", application.AccountID); cmd.Parameters.AddWithValue("@AccountID", application.AccountID);
cmd.Parameters.AddWithValue("@ResumeID", application.ResumeID); cmd.Parameters.AddWithValue("@ResumeID", application.ResumeID);
cmd.Parameters.AddWithValue("@JobListingID", application.JobListingID); cmd.Parameters.AddWithValue("@JobListingID", application.JobListingID);
cmd.Parameters.AddWithValue("@ResponseEmail", application.ResponseEmail);
cmd.Parameters.AddWithValue("@DateApplied", DateTime.UtcNow); cmd.Parameters.AddWithValue("@DateApplied", DateTime.UtcNow);
cmd.Parameters.AddWithValue("@ResponseStatus", application.ResponseStatus); cmd.Parameters.AddWithValue("@ResponseStatus", application.ResponseStatus);
cmd.Parameters.AddWithValue("@HasBeenViewed", application.HasBeenViewed); cmd.Parameters.AddWithValue("@HasBeenViewed", application.HasBeenViewed);