| | | 1 | | namespace RoleRadar.Application.Reading.Models; |
| | | 2 | | |
| | | 3 | | public sealed class ApplicationReadModel |
| | | 4 | | { |
| | 211828 | 5 | | public Guid Id { get; init; } |
| | 9614 | 6 | | public Guid PostingId { get; init; } |
| | 9614 | 7 | | public Guid CompanyId { get; init; } |
| | 215536 | 8 | | public string PostingTitle { get; init; } = string.Empty; |
| | 215560 | 9 | | public string CompanyName { get; init; } = string.Empty; |
| | 215950 | 10 | | public string Status { get; init; } = string.Empty; |
| | 818326 | 11 | | public DateTimeOffset AppliedAt { get; init; } |
| | 9614 | 12 | | public bool HasInterview { get; init; } |
| | 410056 | 13 | | public DateTimeOffset? FirstResponseAt { get; init; } |
| | 9614 | 14 | | public DateTimeOffset? LastEventAt { get; init; } |
| | | 15 | | |
| | | 16 | | /// <summary>Any offer event. Derived at the repository choke point (ADR 0031).</summary> |
| | 6524 | 17 | | public bool HasOffer { get; init; } |
| | | 18 | | |
| | | 19 | | /// <summary>Any rejected event. Derived at the repository choke point (ADR 0031).</summary> |
| | 6524 | 20 | | public bool HasRejection { get; init; } |
| | | 21 | | |
| | | 22 | | /// <summary>A rejection with no interview dated strictly before it; false without a rejection (ADR 0031).</summary> |
| | 6524 | 23 | | public bool RejectedBeforeInterview { get; init; } |
| | | 24 | | public int AgeInDays |
| | | 25 | | { |
| | 4122 | 26 | | get => AppliedAt == default ? 0 : Math.Max(0, (int)(DateTimeOffset.UtcNow.Date - AppliedAt.UtcDateTime.Date).Tot |
| | 0 | 27 | | init { } |
| | | 28 | | } |
| | | 29 | | |
| | 211828 | 30 | | internal string OwnerId { get; init; } = string.Empty; |
| | 5906 | 31 | | internal bool HasFirstResponse { get; init; } |
| | 5906 | 32 | | internal bool HasLastEvent { get; init; } |
| | | 33 | | } |