mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 07:13:12 +00:00
59 lines
2 KiB
C#
59 lines
2 KiB
C#
using Data.SeaHavenIndustries.Enums;
|
|
|
|
namespace SeaHaven.Services.DTOs;
|
|
|
|
public sealed record CreateTeamMemberRequestDTO
|
|
{
|
|
public string? Name { get; init; }
|
|
public string? Role { get; init; }
|
|
public string? Color { get; init; }
|
|
public string? Email { get; init; }
|
|
public string? Phone { get; init; }
|
|
public IReadOnlyList<string>? ServiceAreas { get; init; }
|
|
public IReadOnlyDictionary<string, UserPermissionState>? PermissionOverrides { get; init; }
|
|
}
|
|
|
|
public class TeamMemberCreatedDTO
|
|
{
|
|
public required string Id { get; init; }
|
|
public required string Name { get; init; }
|
|
public required string Role { get; init; }
|
|
public required string Color { get; init; }
|
|
public string? Email { get; init; }
|
|
public string? Phone { get; init; }
|
|
public required IReadOnlyList<string> ServiceAreas { get; init; }
|
|
public bool PendingRegistration { get; init; }
|
|
}
|
|
|
|
public sealed class TeamMemberDetailDTO : TeamMemberCreatedDTO
|
|
{
|
|
public string Status { get; init; } = "Active";
|
|
public bool IsAccountOwner { get; init; }
|
|
public IReadOnlyList<TeamPermissionValueDTO> Permissions { get; init; } = Array.Empty<TeamPermissionValueDTO>();
|
|
}
|
|
|
|
public sealed record UpdateTeamMemberRequestDTO
|
|
{
|
|
public string? Name { get; init; }
|
|
public string? Role { get; init; }
|
|
public string? Color { get; init; }
|
|
public string? Email { get; init; }
|
|
public string? Phone { get; init; }
|
|
public IReadOnlyList<string>? ServiceAreas { get; init; }
|
|
public IReadOnlyDictionary<string, UserPermissionState>? PermissionOverrides { get; init; }
|
|
public bool IsActive { get; init; } = true;
|
|
}
|
|
|
|
public sealed class TeamMemberOperationOutcomeDTO
|
|
{
|
|
public bool Success { get; init; }
|
|
public string? Error { get; init; }
|
|
public TeamMemberDetailDTO? Member { get; init; }
|
|
}
|
|
|
|
public sealed class CreateTeamMemberOutcomeDTO
|
|
{
|
|
public bool Success { get; init; }
|
|
public string? Error { get; init; }
|
|
public TeamMemberCreatedDTO? Member { get; init; }
|
|
}
|