Add JsonPropertyName attributes to DTO properties for serialization

This commit is contained in:
2025-11-13 16:19:14 +00:00
parent 10017850f8
commit 0bbf821489
59 changed files with 915 additions and 397 deletions

View File

@@ -23,16 +23,26 @@
// Copyright © 2003-2021 Natalia Portillo
*******************************************************************************/
using System.Text.Json.Serialization;
namespace Marechai.Data.Dtos;
public class MagazineIssueDto : BaseDto<long>
{
public long MagazineId { get; set; }
public string MagazineTitle { get; set; }
public string Caption { get; set; }
public string NativeCaption { get; set; }
public DateTime? Published { get; set; }
public string ProductCode { get; set; }
public short? Pages { get; set; }
public uint? IssueNumber { get; set; }
[JsonPropertyName("magazine_id")]
public long MagazineId { get; set; }
[JsonPropertyName("magazine_title")]
public string MagazineTitle { get; set; }
[JsonPropertyName("caption")]
public string Caption { get; set; }
[JsonPropertyName("native_caption")]
public string NativeCaption { get; set; }
[JsonPropertyName("published")]
public DateTime? Published { get; set; }
[JsonPropertyName("product_code")]
public string ProductCode { get; set; }
[JsonPropertyName("pages")]
public short? Pages { get; set; }
[JsonPropertyName("issue_number")]
public uint? IssueNumber { get; set; }
}