| | 1 | | // Copyright (c) 2020-2024 dotBunny Inc. |
| | 2 | | // dotBunny licenses this file to you under the BSL-1.0 license. |
| | 3 | | // See the LICENSE file in the project root for more information. |
| | 4 | |
|
| | 5 | | namespace GDX.DataTables |
| | 6 | | { |
| | 7 | | /// <summary> |
| | 8 | | /// A description of a column in a <see cref="DataTableBase" />. |
| | 9 | | /// </summary> |
| | 10 | | public struct ColumnDescription |
| | 11 | | { |
| | 12 | | /// <summary> |
| | 13 | | /// The given name of the column. |
| | 14 | | /// </summary> |
| | 15 | | public string Name; |
| | 16 | |
|
| | 17 | | /// <summary> |
| | 18 | | /// The unique identifier for the column. |
| | 19 | | /// </summary> |
| | 20 | | public int Identifier; |
| | 21 | |
|
| | 22 | | /// <summary> |
| | 23 | | /// The type of data stored in the column. |
| | 24 | | /// </summary> |
| | 25 | | public Serializable.SerializableTypes Type; |
| | 26 | |
|
| | 27 | | /// <summary> |
| | 28 | | /// The current sort order. |
| | 29 | | /// </summary> |
| | 30 | | public int SortOrder; |
| | 31 | |
|
| | 32 | | /// <summary> |
| | 33 | | /// Generates a custom string based on the column. |
| | 34 | | /// </summary> |
| | 35 | | /// <returns>A user-friendly string representation of the <see cref="ColumnDescription" />.</returns> |
| | 36 | | public override string ToString() |
| 0 | 37 | | { |
| 0 | 38 | | return $"{Name} [{Serializable.GetLabelFromTypeValue((int)Type)}]"; |
| 0 | 39 | | } |
| | 40 | | } |
| | 41 | | } |