mirror of
https://github.com/claunia/marechai.git
synced 2026-07-08 17:57:08 +00:00
- Implemented InvitationCodesService for admin management of invitation codes, including listing, creating, and revoking codes. - Updated AuthService to handle email confirmation during login and added methods for user registration and email confirmation. - Enhanced Italian resource files with new strings for user registration and invitation code management. - Added new navigation links for invitation codes in admin menus across multiple languages. - Introduced JavaScript utility for downloading user data as a blob, improving GDPR compliance.
31 lines
934 B
C#
31 lines
934 B
C#
using System;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace Marechai.Data.Models;
|
|
|
|
/// <summary>
|
|
/// Server-side projection of an <c>InvitationCode</c> row, returned by the admin
|
|
/// <c>GET /invitation-codes</c> endpoint. <see cref="IsUsed" /> is computed from <see cref="UsedOn" /> and is
|
|
/// surfaced separately so the client doesn't need to perform date-null checks.
|
|
/// </summary>
|
|
public sealed record InvitationCodeDto
|
|
{
|
|
[JsonPropertyName("code")]
|
|
public string Code { get; set; } = null!;
|
|
|
|
[JsonPropertyName("createdOn")]
|
|
public DateTime CreatedOn { get; set; }
|
|
|
|
[JsonPropertyName("createdByUserName")]
|
|
public string? CreatedByUserName { get; set; }
|
|
|
|
[JsonPropertyName("usedOn")]
|
|
public DateTime? UsedOn { get; set; }
|
|
|
|
[JsonPropertyName("usedByUserName")]
|
|
public string? UsedByUserName { get; set; }
|
|
|
|
[JsonPropertyName("isUsed")]
|
|
public bool IsUsed { get; set; }
|
|
}
|