fix: add json property names, class -> record

This commit is contained in:
Andriy
2025-02-09 19:15:27 +02:00
parent 0649359c12
commit 1436911d2d
2 changed files with 22 additions and 6 deletions
+13 -2
View File
@@ -1,10 +1,21 @@
namespace West.TelegramBot.ContentStore.Model;
using System.Text.Json.Serialization;
public class OBoobsItem
namespace West.TelegramBot.ContentStore.Model;
public record OBoobsItem
{
[JsonPropertyName("id")]
public int Id { get; set; }
[JsonPropertyName("rank")]
public int Rank { get; set; }
[JsonPropertyName("author")]
public string? Author { get; set; }
[JsonPropertyName("model")]
public string? Model { get; set; }
[JsonPropertyName("rank")]
public string Preview { get; set; } = string.Empty;
}