using System; using System.Collections.Generic; using System.Linq; using Newtonsoft.Json; namespace Sony.Filtr.AdminAPI.ViewModels.Graph { public class FollowersGraphViewModel : GraphViewModel { public FollowersFilter Filter { get; set; } } public class StreamsGraphViewModel : GraphViewModel { public StreamsFilter Filter { get; set; } } public class StreamsPercentageGraphViewModel : GraphViewModel { public StreamsFilter Filter { get; set; } public double LocalFiltrStreamsPercentageOfAllStreams { get; set; } public double TotalFiltrStreamsPercentageOfAllStreams { get; set; } } public class StreamsPerUserGraphViewModel : GraphViewModel { public StreamsFilter Filter { get; set; } public double TotalStreamsPerUser { get; set; } } public class BrowseGraphViewModel : GraphViewModel { public BrowseFilter Filter { get; set; } } public class GraphViewModel { public GraphViewModel() { Series = new List(); } public List Series { get; set; } } public class StreamsPerUserSeriesViewModel : SeriesViewModel { public string CountryCode { get; set; } public string MarketName { get; set; } } public class StreamsFilter { public DateTime StartDate { get; set; } public DateTime EndDate { get; set; } public string PlaylistUri { get; set; } public string PlaylistId { get; set; } //public string CountryCode { get; set; } } public class BrowseFilter { public DateTime StartDate { get; set; } public DateTime EndDate { get; set; } public string PlaylistUri { get; set; } public string PlaylistId { get; internal set; } //public string CountryCode { get; set; } //public string CategoryId { get; set; } } public class DateFilter { public DateTime StartDate { get; set; } public DateTime EndDate { get; set; } } public class FollowersFilter { public DateTime StartDate { get; set; } public DateTime EndDate { get; set; } [JsonProperty(NullValueHandling=NullValueHandling.Ignore)] public string PlaylistUri { get; set; } [JsonProperty(NullValueHandling=NullValueHandling.Ignore)] public string ArtistId { get; set; } [JsonProperty(NullValueHandling=NullValueHandling.Ignore)] public string UserUri { get; set; } [JsonProperty(NullValueHandling=NullValueHandling.Ignore)] public string PlaylistId { get; set; } } public class SeriesViewModel { public List> Entries { get; set; } } public class FollowerSeriesViewModel : SeriesViewModel { public string FollowerType { get; set; } } public class SpotifyStreamsDataSummaryViewModel { public List Series { get; set; } public DateFilter Filter { get; set; } } public class SpotifyStreamsDataSummarySeriesViewModel : SeriesViewModel { public string CountryCode { get; set; } public string MarketName { get; set; } } public class AppleMusicStreamsDataSummaryViewModel { public List Series { get; set; } public DateFilter Filter { get; set; } } public class AppleMusicDataSummarySeriesViewModel : SeriesViewModel { public string CountryCode { get; set; } public string MarketName { get; set; } } public class SpotifyStreamDataSummaryViewModel { public int TotalStreams { get; set; } public int DeviceDesktopStreams { get; set; } public int DeviceTabletStreams { get; set; } public int DeviceMobileStreams { get; set; } public int OSAndroidStreams { get; set; } [JsonProperty(propertyName: "osiOSStreams")] public int OSiOSStreams { get; set; } public int OSWindowsStreams { get; set; } public int OSMacOSStreams { get; set; } public int OSOtherStreams { get; set; } public int SourcePlaylist { get; set; } public int SourceSearch { get; set; } public int SourceArtist { get; set; } public int SourceAlbum { get; set; } public int SourceCollection { get; set; } public int SourceOther { get; set; } public int UniqueUsers { get; set; } } public class AppleMusicStreamDataSummaryViewModel { public long TotalStreams { get; set; } public long TotalListeners { get; set; } public long SourceSearchStreams { get; set; } public long SourceOtherStreams { get; set; } public long SourceDiscoveryStreams { get; set; } public long SourceLibraryStreams { get; set; } public long ContainerPlaylistStreams { get; set; } public long ContainerRadioStreams { get; set; } public long ContainerAlbumStreams { get; set; } public long ContainerNoneStreams { get; set; } public int ContainerOtherPlaylistsUsers { get; set; } public long ContainerSubTypeArtistPlaylist { get; set; } public long ContainerSubTypeCuratorPlaylist { get; set; } public long ContainerSubTypeEditorialPlaylist { get; set; } public long ContainerSubTypeEditorialStation { get; set; } public long ContainerSubTypeFormatStation { get; set; } public long ContainerSubTypeNonApplicable { get; set; } public long ContainerSubTypePersonalMixPlaylist { get; set; } public long ContainerSubTypePrivateUserPlaylist { get; set; } public long ContainerSubTypeSeeded { get; set; } } public class StreamsSeriesViewModel : SeriesViewModel { public string CountryCode { get; set; } public string MarketName { get; set; } } public class StreamPercentageSeriesViewModel : SeriesViewModel { public string CountryCode { get; set; } public string MarketName { get; set; } } public class StreamPercentage { public double LocalListStreamsOfTotalStreams { get; set; } public double TotalListStreamsOfTotalStreams { get; set; } public double LocalListStreamsOfPlaylistStreams { get; set; } public double TotalListStreamsOfPlaylistStreams { get; set; } public long TotalStreams { get; set; } public long PlaylistSourceStreams { get; set; } public long LocalListStreams { get; set; } public long TotalListStreams { get; set; } } public class BrowseSeriesViewModel : SeriesViewModel { public string CategoryId { get; set; } public string CountryCode { get; set; } public string CategoryName { get; set; } } public class TrackAmountSeriesViewModel : SeriesViewModel { public string CountryCode { get; set; } } public class TrackPercentageSeriesViewModel : SeriesViewModel { public string CountryCode { get; set; } } public class SonyPercentageFilter { public DateTime StartDate { get; set; } public DateTime EndDate { get; set; } public string PlaylistUri { get; set; } public string PlaylistId { get; set; } } public class SonyPercentageGraphViewModel { public SonyPercentageGraphViewModel() { TotalTracksSeries = new List(); SonyTracksSeries = new List(); SonyPercentageSeries = new List(); } public List TotalTracksSeries { get; set; } public List SonyTracksSeries { get; set; } public List SonyPercentageSeries { get; set; } public SonyPercentageFilter Filter { get; set; } } public class GraphEntry { public DateTime Date { get; set; } public T Value { get; set; } } public enum FollowerStatType { Total, DailyChange } }