namespace SeaHaven.DataServices.Dto { public sealed class TeamMemberInviteData { public required int Id { get; init; } public required string UserId { get; init; } public DateTime ExpiresAt { get; init; } public DateTime? UsedAt { get; init; } public DateTime? RevokedAt { get; init; } public string? CodeHash { get; init; } public string? CodeSalt { get; init; } public DateTime? CodeExpiresAt { get; init; } public int CodeFailedAttempts { get; init; } public DateTime? CodeSentAt { get; init; } public int CodeSendCount { get; init; } public DateTime? EmailConfirmedAt { get; init; } } /// /// Replaces the confirmation code on an open invite when the resend cooldown has /// elapsed and the send limit has not been reached. /// public sealed class StartTeamMemberInviteCodeCommand { public required int InviteId { get; init; } public required string CodeHash { get; init; } public required string CodeSalt { get; init; } public required DateTime Now { get; init; } public required DateTime CodeExpiresAt { get; init; } /// A code may be replaced only when the previous one was sent at or before this instant. public required DateTime LastSentNoLaterThan { get; init; } public required int MaxSends { get; init; } } }