namespace JobTrackerApi.Models; // The Career Workspace's durable source of truth. Bounded to one row per user for now // (see career-workspace-implementation-roadmap.md Phase F1) -- ProfileJson mirrors // ApplicationUser.ProfileCvStructureJson during the dual-write window and will become // authoritative once every read path is migrated (F5). public sealed class CareerProfile { public int Id { get; set; } public string OwnerUserId { get; set; } = string.Empty; public string ProfileJson { get; set; } = string.Empty; public int Version { get; set; } public DateTimeOffset CreatedAtUtc { get; set; } = DateTimeOffset.UtcNow; public DateTimeOffset UpdatedAtUtc { get; set; } = DateTimeOffset.UtcNow; } // Append-only history: one row per save, so profile edits are never silently lost. public sealed class CareerProfileVersion { public int Id { get; set; } public string OwnerUserId { get; set; } = string.Empty; public int CareerProfileId { get; set; } public CareerProfile? CareerProfile { get; set; } public int Version { get; set; } public string ProfileJson { get; set; } = string.Empty; // Where this version came from: "upload" | "rebuild" | "improve" | "reprocess" | "parse" | "manual". public string Source { get; set; } = string.Empty; public DateTimeOffset CreatedAtUtc { get; set; } = DateTimeOffset.UtcNow; }