First Commit
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
|
||||
namespace JobTrackerApi.Models;
|
||||
|
||||
public sealed class ApplicationUser : IdentityUser
|
||||
{
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace JobTrackerApi.Models
|
||||
{
|
||||
public class Attachment
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int JobApplicationId { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public JobApplication JobApplication { get; set; } = null!;
|
||||
public string FileName { get; set; } = "";
|
||||
public string FilePath { get; set; } = "";
|
||||
public DateTime UploadDate { get; set; } = DateTime.Now;
|
||||
public string FileType { get; set; } = ""; // e.g., PDF, DOCX
|
||||
public long FileSize { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace JobTrackerApi.Models
|
||||
{
|
||||
public class Company
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string? OwnerUserId { get; set; }
|
||||
public string Name { get; set; } = "";
|
||||
public string? Location { get; set; }
|
||||
public string? Source { get; set; } // e.g., Finn.no, LinkedIn
|
||||
|
||||
// Lightweight CRM fields
|
||||
public string? RecruiterName { get; set; }
|
||||
public string? RecruiterEmail { get; set; }
|
||||
public string? RecruiterLinkedIn { get; set; }
|
||||
public DateTime? LastContactedAt { get; set; }
|
||||
public DateTime? NextContactAt { get; set; }
|
||||
public string? PipelineStage { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public List<JobApplication> Jobs { get; set; } = new();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace JobTrackerApi.Models
|
||||
{
|
||||
public class Correspondence
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int JobApplicationId { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public JobApplication JobApplication { get; set; } = null!;
|
||||
public string From { get; set; } = ""; // "Me" or "Company"
|
||||
public string? Subject { get; set; }
|
||||
public string? Channel { get; set; } // e.g. Email, Call, Note
|
||||
public string Content { get; set; } = "";
|
||||
public DateTime Date { get; set; } = DateTime.Now;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
using System;
|
||||
|
||||
namespace JobTrackerApi.Models
|
||||
{
|
||||
public class JobApplication
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string? OwnerUserId { get; set; }
|
||||
public string JobTitle { get; set; } = "";
|
||||
public int CompanyId { get; set; }
|
||||
public Company Company { get; set; } = null!;
|
||||
public string Status { get; set; } = "Applied";
|
||||
public DateTime DateApplied { get; set; } = DateTime.UtcNow;
|
||||
public string? Location { get; set; }
|
||||
public string? Salary { get; set; }
|
||||
public string? NextAction { get; set; }
|
||||
public DateTime? FollowUpAt { get; set; }
|
||||
public DateTime? FeedbackRequestedAt { get; set; }
|
||||
|
||||
// Attachment checklist
|
||||
public bool HasResume { get; set; } = false;
|
||||
public bool HasCoverLetter { get; set; } = false;
|
||||
public bool HasPortfolio { get; set; } = false;
|
||||
public bool HasOtherAttachment { get; set; } = false;
|
||||
|
||||
// Soft delete: hide from default queries without losing history.
|
||||
public bool IsDeleted { get; set; } = false;
|
||||
public DateTime? DeletedAt { get; set; }
|
||||
|
||||
public bool ResponseReceived { get; set; } = false;
|
||||
public DateTime? ResponseDate { get; set; }
|
||||
public string? Notes { get; set; }
|
||||
public string? CoverLetterText { get; set; }
|
||||
public string? JobUrl { get; set; }
|
||||
|
||||
// Imported job content
|
||||
public string? Description { get; set; }
|
||||
public string? TranslatedDescription { get; set; }
|
||||
public string? DescriptionLanguage { get; set; } // "en", "no", ...
|
||||
public string? Tags { get; set; } // JSON array string, e.g. ["Azure","Docker"]
|
||||
public DateTime? Deadline { get; set; }
|
||||
// Short summary generated at creation time and persisted to avoid repeated model calls.
|
||||
public string? ShortSummary { get; set; }
|
||||
|
||||
public List<Correspondence> Messages { get; set; } = new();
|
||||
public List<Attachment> Attachments { get; set; } = new();
|
||||
public List<JobEvent> Events { get; set; } = new();
|
||||
|
||||
public int DaysSince => ((ResponseReceived ? (ResponseDate ?? DateTime.UtcNow) : DateTime.UtcNow) - DateApplied.ToUniversalTime()).Days;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace JobTrackerApi.Models
|
||||
{
|
||||
public class JobEvent
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int JobApplicationId { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public JobApplication JobApplication { get; set; } = null!;
|
||||
|
||||
public string Type { get; set; } = ""; // Created, StatusChanged, FollowUpSet, Deleted, Restored
|
||||
public string? OldValue { get; set; }
|
||||
public string? NewValue { get; set; }
|
||||
public string? Note { get; set; }
|
||||
public DateTime At { get; set; } = DateTime.Now;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
namespace JobTrackerApi.Models
|
||||
{
|
||||
// Single-row table to store workflow automation thresholds.
|
||||
public class RuleSettings
|
||||
{
|
||||
public int Id { get; set; } = 1;
|
||||
|
||||
// Applied / no response yet
|
||||
public int AppliedFollowUpDays { get; set; } = 14;
|
||||
public int AppliedGhostDays { get; set; } = 30;
|
||||
|
||||
// Offer / accepted waiting on next step
|
||||
public int OfferFollowUpDays { get; set; } = 7;
|
||||
public int OfferGhostDays { get; set; } = 14;
|
||||
|
||||
// Rejected but you requested feedback
|
||||
public int FeedbackFollowUpDays { get; set; } = 7;
|
||||
public int FeedbackGhostDays { get; set; } = 14;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
namespace JobTrackerApi.Models;
|
||||
|
||||
public sealed class UserRuleSettings
|
||||
{
|
||||
public string OwnerUserId { get; set; } = "";
|
||||
|
||||
// Applied / no response yet
|
||||
public int AppliedFollowUpDays { get; set; } = 14;
|
||||
public int AppliedGhostDays { get; set; } = 30;
|
||||
|
||||
// Offer / accepted waiting on next step
|
||||
public int OfferFollowUpDays { get; set; } = 7;
|
||||
public int OfferGhostDays { get; set; } = 14;
|
||||
|
||||
// Rejected but you requested feedback
|
||||
public int FeedbackFollowUpDays { get; set; } = 7;
|
||||
public int FeedbackGhostDays { get; set; } = 14;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user