using System.ComponentModel.DataAnnotations; using PlotLine.Models; namespace PlotLine.ViewModels; public sealed class FeatureRequestIndexViewModel { public IReadOnlyList Requests { get; set; } = []; } public sealed class FeatureRequestCreateViewModel { [Required(ErrorMessage = "Enter a title.")] [StringLength(200, ErrorMessage = "Title must be 200 characters or fewer.")] public string Title { get; set; } = string.Empty; [Required(ErrorMessage = "Describe the problem or suggestion.")] [Display(Name = "Description / Problem")] public string Description { get; set; } = string.Empty; [StringLength(100, ErrorMessage = "App area must be 100 characters or fewer.")] [Display(Name = "App Area")] public string? AppArea { get; set; } [StringLength(50, ErrorMessage = "Importance must be 50 characters or fewer.")] public string? Importance { get; set; } public IReadOnlyList AppAreas { get; set; } = FeatureRequestOptions.AppAreas; public IReadOnlyList ImportanceOptions { get; set; } = FeatureRequestOptions.ImportanceOptions; } public sealed class FeatureRequestDetailsViewModel { public FeatureRequest Request { get; set; } = new(); public IReadOnlyList Messages { get; set; } = []; public FeatureRequestReplyViewModel Reply { get; set; } = new(); public bool IsAdminView { get; set; } public IReadOnlyList StatusOptions { get; set; } = FeatureRequestStatuses.All; } public sealed class FeatureRequestReplyViewModel { public int FeatureRequestID { get; set; } [Required(ErrorMessage = "Enter a message.")] public string MessageBody { get; set; } = string.Empty; } public sealed class AdminFeatureRequestIndexViewModel { public IReadOnlyList Requests { get; set; } = []; public string? Status { get; set; } public string? AppArea { get; set; } public string? Importance { get; set; } public string? Search { get; set; } public string Sort { get; set; } = FeatureRequestSortOptions.LatestActivity; public IReadOnlyList StatusOptions { get; set; } = FeatureRequestStatuses.All; public IReadOnlyList AppAreas { get; set; } = FeatureRequestOptions.AppAreas; public IReadOnlyList ImportanceOptions { get; set; } = FeatureRequestOptions.ImportanceOptions; public IReadOnlyList<(string Value, string Label)> SortOptions { get; set; } = FeatureRequestSortOptions.All; } public sealed class AdminFeatureRequestUpdateViewModel { public int FeatureRequestID { get; set; } public string Status { get; set; } = FeatureRequestStatuses.New; public bool IsPublicCandidate { get; set; } public string? AdminNotes { get; set; } } public sealed class AdminDashboardViewModel { public FeatureRequestAdminSummary FeatureRequestSummary { get; set; } = new(); } public sealed class AdminFeatureRequestFilter { public string? Status { get; set; } public string? AppArea { get; set; } public string? Importance { get; set; } public string? Search { get; set; } public string Sort { get; set; } = FeatureRequestSortOptions.LatestActivity; }