Files
qbtmud/Lantean.QBitTorrentClient/Models/Category.cs
2025-10-22 14:05:13 +01:00

30 lines
763 B
C#

using Lantean.QBitTorrentClient.Converters;
using System.Text.Json.Serialization;
namespace Lantean.QBitTorrentClient.Models
{
public record Category
{
[JsonConstructor]
public Category(
string name,
string? savePath,
DownloadPathOption? downloadPath)
{
Name = name;
SavePath = savePath;
DownloadPath = downloadPath;
}
[JsonPropertyName("name")]
public string Name { get; }
[JsonPropertyName("savePath")]
public string? SavePath { get; }
[JsonPropertyName("download_path")]
[JsonConverter(typeof(DownloadPathOptionJsonConverter))]
public DownloadPathOption? DownloadPath { get; }
}
}