Table of Contents

Class InvitationDto

Namespace
Builvero.Application.DTOs.Admin
Assembly
Builvero.Application.dll

Data transfer object representing an invitation code with usage statistics and status.

public class InvitationDto
Inheritance
InvitationDto
Inherited Members

Remarks

This DTO is used for displaying invitations in admin interfaces. The status is calculated based on expiration date, max uses, and current usage count.

Properties

Code

Gets or sets the unique invitation code that users must provide during registration.

public string Code { get; set; }

Property Value

string
Data transfer object representing an invitation code with usage statistics and status.

CreatedAt

Gets or sets the UTC timestamp when this invitation was created.

public DateTime CreatedAt { get; set; }

Property Value

DateTime
Data transfer object representing an invitation code with usage statistics and status.

CreatedByName

Gets or sets the display name of the admin user who created this invitation.

public string CreatedByName { get; set; }

Property Value

string
Data transfer object representing an invitation code with usage statistics and status.

Remarks

Uses the creator's profile full name if available, otherwise falls back to email, or "Unknown" if neither is available.

ExpiresAt

Gets or sets the UTC timestamp when this invitation expires.

public DateTime? ExpiresAt { get; set; }

Property Value

DateTime?
Data transfer object representing an invitation code with usage statistics and status.

Remarks

May be null if the invitation never expires.

Id

Gets or sets the unique identifier of the invitation.

public Guid Id { get; set; }

Property Value

Guid
Data transfer object representing an invitation code with usage statistics and status.

Gets or sets the full invitation link URL for user registration.

public string InvitationLink { get; set; }

Property Value

string
Data transfer object representing an invitation code with usage statistics and status.

This is constructed by the controller as: {frontendBaseUrl}/auth/signup.html?invite={code} The link is set by the controller, not the service layer.

Label

Gets or sets an optional label or description for this invitation.

public string? Label { get; set; }

Property Value

string
Data transfer object representing an invitation code with usage statistics and status.

Remarks

Used for administrative tracking and organization of invitations.

MaxUses

Gets or sets the maximum number of times this invitation can be used for registration.

public int MaxUses { get; set; }

Property Value

int
Data transfer object representing an invitation code with usage statistics and status.

Status

Gets or sets the current status of the invitation as a string (e.g., "Active", "Exhausted", "Expired").

public string Status { get; set; }

Property Value

string
Data transfer object representing an invitation code with usage statistics and status.

Remarks

Status is calculated based on:

  • "Active": Invitation has not exceeded max uses and has not expired
  • "Exhausted": Invitation has reached its maximum usage count
  • "Expired": Invitation has passed its expiration date

UsedCount

Gets or sets the number of times this invitation has been used for registration.

public int UsedCount { get; set; }

Property Value

int
Data transfer object representing an invitation code with usage statistics and status.