27 lines
601 B
C#
27 lines
601 B
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace SharedProject.models;
|
|
|
|
public class SongPlayData
|
|
{
|
|
public string Title { get; set; } = string.Empty;
|
|
|
|
public string Artist { get; set; } = string.Empty;
|
|
|
|
public int MusicId { get; set; }
|
|
|
|
public SongPlayDetailData[] SongPlaySubDataList { get; set; } = new SongPlayDetailData[4];
|
|
|
|
public bool IsFavorite { get; set; }
|
|
|
|
public bool ShowDetails { get; set; }
|
|
|
|
[JsonIgnore]
|
|
public int TotalPlayCount
|
|
{
|
|
get
|
|
{
|
|
return SongPlaySubDataList.Sum(data => data.PlayCount);
|
|
}
|
|
}
|
|
} |