Files
Extrudex/backend/API/DTOs/PrintJobs/PrintJobQueryDtos.cs
cubecraft-agents[bot] 230c3b295d initial commit
2026-04-25 18:51:05 +00:00

30 lines
1.2 KiB
C#

using System.ComponentModel.DataAnnotations;
namespace Extrudex.API.DTOs.PrintJobs;
/// <summary>
/// Query parameters for filtering and paginating the print job list endpoint.
/// All parameters are optional — defaults are applied when not provided.
/// </summary>
public class PrintJobQueryParameters
{
/// <summary>Page number (1-based). Defaults to 1.</summary>
[Range(1, int.MaxValue, ErrorMessage = "PageNumber must be at least 1.")]
public int PageNumber { get; set; } = 1;
/// <summary>Number of items per page. Defaults to 20, max 100.</summary>
[Range(1, 100, ErrorMessage = "PageSize must be between 1 and 100.")]
public int PageSize { get; set; } = 20;
/// <summary>Optional filter by printer ID. Only returns jobs for this printer.</summary>
public Guid? PrinterId { get; set; }
/// <summary>Optional filter by spool ID. Only returns jobs that used this spool.</summary>
public Guid? SpoolId { get; set; }
/// <summary>
/// Optional filter by job status. Must be a valid JobStatus value
/// (Queued, Printing, Completed, Cancelled, Failed). Case-insensitive.
/// </summary>
public string? Status { get; set; }
}