using System.Collections.Generic;
using System.Collections.Immutable;
using Kafe.Data;
using Microsoft.AspNetCore.Http;

namespace Kafe.Api.Transfer;
public record EntityPermissionsDetailDto(
    Hrib Id,
    string? EntityType,
    ImmutableArray<Permission>? GlobalPermissions,
    ImmutableArray<Permission>? UserPermissions,
    ImmutableArray<EntityPermissionsAccountListDto> AccountPermissions
);

public record EntityPermissionsAccountListDto(
    Hrib? Id,
    string? EmailAddress,
    string? Name,
    ImmutableArray<Permission> Permissions
);

public record EntityPermissionsEditDto(
    Hrib Id,
    ImmutableArray<Permission>? GlobalPermissions,
    ImmutableArray<EntityPermissionsAccountEditDto>? AccountPermissions
);

public record EntityPermissionsEditFromCsvDto(
    Hrib Id,
    List<Permission>? Permissions,
    IFormFile CsvFile
);

public record EntityPermissionsAccountEditDto(
    Hrib? Id,
    string? EmailAddress,
    ImmutableArray<Permission> Permissions
);
