using System; namespace JobTrackerApi.Models { /// /// A job opportunity — the role as the employer posted it, independent of whether the user /// has applied. Separated from (the user's pursuit of a job) so /// that: /// - a job can be tracked before it is applied to (see JobPipeline's Prospect stages), and /// - applying twice to the same role does not duplicate the whole job description. /// /// Introduced in Phase 0 (2026-07-17). New applications dual-write this opportunity row while /// remains the read source during the incremental cutover. /// /// See docs/decisions/ADR-002-job-application-model.md. /// public class Job { public int Id { get; set; } public string? OwnerUserId { get; set; } public int CompanyId { get; set; } public Company Company { get; set; } = null!; public string JobTitle { get; set; } = ""; public string? Location { 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? ShortSummary { get; set; } public string? Tags { get; set; } // JSON array string, e.g. ["Azure","Docker"] public DateTime? Deadline { get; set; } // Structured salary; the free-text Salary field is kept for display/back-compat. public string? Salary { get; set; } public decimal? SalaryMin { get; set; } public decimal? SalaryMax { get; set; } public string? SalaryCurrency { get; set; } // e.g. "NOK", "GBP", "EUR" public string? SalaryPeriod { get; set; } // "year" | "month" | "hour" // Where this job came from. Market is data, not an assumption: Jobjakt is Norway-first // but must not hardcode Norway, so country travels with the job rather than being // implied by the importer. Null = unknown/manually entered. public string? Source { get; set; } // e.g. "finn", "nav", "linkedin", "manual" public string? CountryCode { get; set; } // ISO 3166-1 alpha-2, e.g. "NO", "GB" /// When the user first captured this opportunity. public DateTime SavedAt { get; set; } = DateTime.UtcNow; public List Applications { get; set; } = new(); } }