using System.ComponentModel.DataAnnotations;

namespace MemberCenter.Web.Models.Admin;

public sealed class OAuthClientFormViewModel
{
    public Guid? TenantId { get; set; }

    [Display(Name = "Name")]
    [Required(ErrorMessage = "The {0} field is required.")]
    public string Name { get; set; } = string.Empty;

    [Display(Name = "Type")]
    [Required(ErrorMessage = "The {0} field is required.")]
    public string ClientType { get; set; } = "public";

    [Display(Name = "Usage")]
    [Required(ErrorMessage = "The {0} field is required.")]
    public string Usage { get; set; } = "tenant_api";

    public string RedirectUris { get; set; } = string.Empty;
    public IReadOnlyList<MemberCenter.Application.Models.Admin.TenantDto> Tenants { get; set; }
        = Array.Empty<MemberCenter.Application.Models.Admin.TenantDto>();

    public string? ClientId { get; set; }
    public string? ClientSecret { get; set; }
}
