mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 16:33:12 +00:00
36 lines
1.4 KiB
C#
36 lines
1.4 KiB
C#
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; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Replaces the confirmation code on an open invite when the resend cooldown has
|
|
/// elapsed and the send limit has not been reached.
|
|
/// </summary>
|
|
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; }
|
|
|
|
/// <summary>A code may be replaced only when the previous one was sent at or before this instant.</summary>
|
|
public required DateTime LastSentNoLaterThan { get; init; }
|
|
|
|
public required int MaxSends { get; init; }
|
|
}
|
|
}
|