refactor: make exporting consistent

This commit is contained in:
Gary Sharp
2025-02-06 19:14:36 +11:00
parent f946f3250c
commit 67f1c2a5d1
69 changed files with 908 additions and 921 deletions
@@ -4,10 +4,13 @@ using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Disco.Models.Services.Jobs.Exporting
namespace Disco.Models.Services.Jobs
{
public class JobExportOptions : IExportOptions
{
public int Version { get; set; } = 1;
public ExportFormat Format { get; set; }
[DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, HtmlEncode = false)]
public DateTime FilterStartDate { get; set; }
[DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, HtmlEncode = false)]
@@ -17,11 +20,6 @@ namespace Disco.Models.Services.Jobs.Exporting
public List<string> FilterJobSubTypeIds { get; set; }
public int? FilterJobQueueId { get; set; }
public ExportFormat Format { get; set; }
public string FilenamePrefix { get; } = "DiscoJobExport";
public string ExcelWorksheetName { get; } = "JobExport";
public string ExcelTableName { get; } = "Jobs";
// Job
[Display(ShortName = "Job", Name = "Identifier", Description = "The identifier of the job")]
public bool JobId { get; set; }
@@ -3,7 +3,7 @@ using Disco.Models.Repository;
using System;
using System.Collections.Generic;
namespace Disco.Models.Services.Jobs.Exporting
namespace Disco.Models.Services.Jobs
{
public class JobExportRecord : IExportRecord
{