feat: add DTOs for basic endpoints
This commit is contained in:
51
DTOs/AlbumViewShortDTO.cs
Normal file
51
DTOs/AlbumViewShortDTO.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace Shadow.DTOs;
|
||||
|
||||
public class AlbumViewShortDTO
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
public string id { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("name")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public string? name { get; set; } = null;
|
||||
|
||||
[JsonPropertyName("artist")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public string? artist { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("artistId")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public string? artistId { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("coverArt")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public string? coverArt { get; set; } = "default.png";
|
||||
|
||||
[JsonPropertyName("songCount")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public int? songCount { get; set; } = null;
|
||||
|
||||
[JsonPropertyName("duration")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public int? duration { get; set; } = 0;
|
||||
|
||||
[JsonPropertyName("playCount")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public int? playCount { get; set; } = 0;
|
||||
|
||||
[JsonPropertyName("year")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public int? year { get; set; } = null;
|
||||
|
||||
[JsonPropertyName("genre")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public string? genre { get; set; } = null;
|
||||
|
||||
[JsonPropertyName("played")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public string? played { get; set; } = null;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user