Functional

This commit is contained in:
kdeng00
2021-12-23 21:10:13 -05:00
parent 8600d9b6bc
commit edaea68296
33 changed files with 362 additions and 298 deletions
+3 -2
View File
@@ -8,8 +8,8 @@ namespace Icarus.Models
{
public class Album
{
[JsonProperty("id")]
public int AlbumId { get; set; }
[JsonProperty("album_id")]
public int AlbumID { get; set; }
[JsonProperty("title")]
public string Title { get; set; }
[JsonProperty("album_artist")]
@@ -19,6 +19,7 @@ namespace Icarus.Models
public int SongCount { get; set; }
[JsonIgnore]
[NotMapped]
public List<Song> Songs { get; set; }
}
}
+3 -2
View File
@@ -8,8 +8,8 @@ namespace Icarus.Models
{
public class Artist
{
[JsonProperty("id")]
public int ArtistId { get; set; }
[JsonProperty("artist_id")]
public int ArtistID { get; set; }
[JsonProperty("name")]
public string Name { get; set; }
[JsonProperty("song_count")]
@@ -17,6 +17,7 @@ namespace Icarus.Models
public int SongCount { get; set; }
[JsonIgnore]
[NotMapped]
public List<Song> Songs { get; set; }
}
}
+4 -2
View File
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
using Newtonsoft.Json;
@@ -8,8 +9,8 @@ namespace Icarus.Models
{
public class CoverArt
{
[JsonProperty("id")]
public int CoverArtId { get; set; }
[JsonProperty("cover_art_id")]
public int CoverArtID { get; set; }
[JsonProperty("title")]
public string SongTitle { get; set; }
[JsonIgnore]
@@ -17,6 +18,7 @@ namespace Icarus.Models
[JsonProperty("song_id")]
public int SongId { get; set; }
[JsonIgnore]
[NotMapped]
public List<Song> Songs { get; set; }
}
}
+3 -2
View File
@@ -8,8 +8,8 @@ namespace Icarus.Models
{
public class Genre
{
[JsonProperty("id")]
public int GenreId { get; set; }
[JsonProperty("genre_id")]
public int GenreID { get; set; }
[JsonProperty("genre")]
public string GenreName { get; set; }
[JsonProperty("song_count")]
@@ -17,6 +17,7 @@ namespace Icarus.Models
public int SongCount { get; set; }
[JsonIgnore]
[NotMapped]
public List<Song> Songs { get; set; }
}
}
+2 -2
View File
@@ -6,8 +6,8 @@ namespace Icarus.Models
{
public class LoginResult : BaseResult
{
[JsonProperty("id")]
public int UserId { get; set; }
[JsonProperty("user_id")]
public int UserID { get; set; }
[JsonProperty("username")]
public string Username { get; set; }
[JsonProperty("token")]
+18 -11
View File
@@ -26,29 +26,36 @@ namespace Icarus.Models
[JsonProperty("song_path")]
public string SongPath { get; set; }
// [JsonIgnore]
// public Album Album { get; set; }
[JsonIgnore]
public Album Album { get; set; }
[JsonIgnore]
public int? AlbumId { get; set; }
public int? AlbumID { get; set; }
/**
[JsonIgnore]
public Artist SongArtist { get; set; }
*/
[JsonIgnore]
public int? ArtistId { get; set; }
public int? ArtistID { get; set; }
/**
[JsonIgnore]
public Genre SongGenre { get; set; }
*/
[JsonIgnore]
public int? GenreId { get; set; }
public int? GenreID { get; set; }
[JsonIgnore]
public Year SongYear { get; set; }
[JsonIgnore]
public int? YearId { get; set; }
// [JsonIgnore]
// public Year SongYear { get; set; }
// [JsonIgnore]
// public int? YearId { get; set; }
/**
[JsonIgnore]
public CoverArt SongCoverArt { get; set; }
*/
[JsonIgnore]
public int? CoverArtId { get; set; }
public int? CoverArtID { get; set; }
[JsonProperty("date_created")]
public DateTime DateCreated { get; set; }
}
}
+2 -2
View File
@@ -5,8 +5,8 @@ namespace Icarus.Models
{
public class SongData
{
public int Id { get; set; }
public int ID { get; set; }
public byte[] Data { get; set; }
public int SongId { get; set; }
public int SongID { get; set; }
}
}
+2
View File
@@ -31,6 +31,8 @@ namespace Icarus.Models
public bool EmailVerified { get; set; }
[JsonProperty("date_created")]
public DateTime DateCreated { get; set; }
[JsonProperty("status")]
public string Status { get; set; }
[JsonProperty("last_login")]
public DateTime? LastLogin { get; set; }
}