mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
fix: add json property names, class -> record
This commit is contained in:
@@ -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!;
|
[JsonPropertyName("id")]
|
||||||
public string Url { get; set; } = null!;
|
public required string Id { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("url")]
|
||||||
|
public required string Url { get; set; }
|
||||||
}
|
}
|
||||||
@@ -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; }
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("rank")]
|
||||||
public int Rank { get; set; }
|
public int Rank { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("author")]
|
||||||
public string? Author { get; set; }
|
public string? Author { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("model")]
|
||||||
public string? Model { get; set; }
|
public string? Model { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("rank")]
|
||||||
public string Preview { get; set; } = string.Empty;
|
public string Preview { get; set; } = string.Empty;
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user