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
+9 -4
View File
@@ -1,7 +1,12 @@
namespace West.TelegramBot.ContentStore.Model;
using System.Text.Json.Serialization;
public class AnimalImage
namespace West.TelegramBot.ContentStore.Model;
public record AnimalImage
{
public string Id { get; set; } = null!;
public string Url { get; set; } = null!;
[JsonPropertyName("id")]
public required string Id { get; set; }
[JsonPropertyName("url")]
public required string Url { get; set; }
}