| | | 1 | | namespace ArturRios.Data.Export.Attributes; |
| | | 2 | | |
| | | 3 | | /// <summary>Overrides the column header and/or ordinal position for a property in columnar exports (CSV, Excel).</summa |
| | | 4 | | [AttributeUsage(AttributeTargets.Property)] |
| | | 5 | | public sealed class ExportColumnAttribute : Attribute |
| | | 6 | | { |
| | | 7 | | /// <summary>Header text. When null, the property name is used.</summary> |
| | 4 | 8 | | public string? Name { get; init; } |
| | | 9 | | |
| | | 10 | | /// <summary> |
| | | 11 | | /// Ordinal position (ascending). Unset columns sort last, in declaration order, and only two |
| | | 12 | | /// properties declared in different types fall back to sorting by name. |
| | | 13 | | /// </summary> |
| | 6 | 14 | | public int Order { get; init; } = int.MaxValue; |
| | | 15 | | } |