Cleaning up code convention inconsistencies

This commit is contained in:
amazing-username
2019-07-04 15:57:43 -04:00
parent bc209c2363
commit ada8fa79d3
21 changed files with 396 additions and 426 deletions
+14 -14
View File
@@ -6,19 +6,19 @@ using Newtonsoft.Json;
namespace Icarus.Models
{
public class Album
{
[JsonProperty("id")]
public int AlbumId { get; set; }
[JsonProperty("title")]
public string Title { get; set; }
[JsonProperty("album_artist")]
public string AlbumArtist { get; set; }
[JsonProperty("song_count")]
[NotMapped]
public int SongCount { get; set; }
public class Album
{
[JsonProperty("id")]
public int AlbumId { get; set; }
[JsonProperty("title")]
public string Title { get; set; }
[JsonProperty("album_artist")]
public string AlbumArtist { get; set; }
[JsonProperty("song_count")]
[NotMapped]
public int SongCount { get; set; }
[JsonIgnore]
public List<Song> Songs { get; set; }
}
[JsonIgnore]
public List<Song> Songs { get; set; }
}
}
+12 -12
View File
@@ -6,17 +6,17 @@ using Newtonsoft.Json;
namespace Icarus.Models
{
public class Artist
{
[JsonProperty("id")]
public int ArtistId { get; set; }
[JsonProperty("name")]
public string Name { get; set; }
[JsonProperty("song_count")]
[NotMapped]
public int SongCount { get; set; }
public class Artist
{
[JsonProperty("id")]
public int ArtistId { get; set; }
[JsonProperty("name")]
public string Name { get; set; }
[JsonProperty("song_count")]
[NotMapped]
public int SongCount { get; set; }
[JsonIgnore]
public List<Song> Songs { get; set; }
}
[JsonIgnore]
public List<Song> Songs { get; set; }
}
}
+5 -5
View File
@@ -4,9 +4,9 @@ using Newtonsoft.Json;
namespace Icarus.Models
{
public class BaseResult
{
[JsonProperty("message")]
public string Message { get; set; }
}
public class BaseResult
{
[JsonProperty("message")]
public string Message { get; set; }
}
}
+12 -12
View File
@@ -6,17 +6,17 @@ using Newtonsoft.Json;
namespace Icarus.Models
{
public class Genre
{
[JsonProperty("id")]
public int GenreId { get; set; }
[JsonProperty("genre")]
public string GenreName { get; set; }
[JsonProperty("song_count")]
[NotMapped]
public int SongCount { get; set; }
public class Genre
{
[JsonProperty("id")]
public int GenreId { get; set; }
[JsonProperty("genre")]
public string GenreName { get; set; }
[JsonProperty("song_count")]
[NotMapped]
public int SongCount { get; set; }
[JsonIgnore]
public List<Song> Songs { get; set; }
}
[JsonIgnore]
public List<Song> Songs { get; set; }
}
}
+13 -13
View File
@@ -4,17 +4,17 @@ using Newtonsoft.Json;
namespace Icarus.Models
{
public class LoginResult : BaseResult
{
[JsonProperty("id")]
public int UserId { get; set; }
[JsonProperty("username")]
public string Username { get; set; }
[JsonProperty("token")]
public string Token { get; set; }
[JsonProperty("token_type")]
public string TokenType { get; set; }
[JsonProperty("expiration")]
public int Expiration { get; set; }
}
public class LoginResult : BaseResult
{
[JsonProperty("id")]
public int UserId { get; set; }
[JsonProperty("username")]
public string Username { get; set; }
[JsonProperty("token")]
public string Token { get; set; }
[JsonProperty("token_type")]
public string TokenType { get; set; }
[JsonProperty("expiration")]
public int Expiration { get; set; }
}
}
+7 -7
View File
@@ -4,11 +4,11 @@ using Newtonsoft.Json;
namespace Icarus.Models
{
public class RegisterResult : BaseResult
{
[JsonProperty("username")]
public string Username { get; set; }
[JsonProperty("successfully_registered")]
public bool SuccessfullyRegistered { get; set; }
}
public class RegisterResult : BaseResult
{
[JsonProperty("username")]
public string Username { get; set; }
[JsonProperty("successfully_registered")]
public bool SuccessfullyRegistered { get; set; }
}
}
+37 -37
View File
@@ -5,45 +5,45 @@ using Newtonsoft.Json;
namespace Icarus.Models
{
public class Song
{
[JsonProperty("id")]
public int Id { get; set; }
[JsonProperty("title")]
public string Title { get; set; }
[JsonProperty("album")]
public string AlbumTitle { get; set; }
[JsonProperty("artist")]
public string Artist { get; set; }
[JsonProperty("year")]
public int? Year { get; set; }
[JsonProperty("genre")]
public string Genre { get; set; }
[JsonProperty("duration")]
public int Duration { get; set; }
[JsonProperty("filename")]
public string Filename { get; set; }
[JsonProperty("song_path")]
public string SongPath { get; set; }
public class Song
{
[JsonProperty("id")]
public int Id { get; set; }
[JsonProperty("title")]
public string Title { get; set; }
[JsonProperty("album")]
public string AlbumTitle { get; set; }
[JsonProperty("artist")]
public string Artist { get; set; }
[JsonProperty("year")]
public int? Year { get; set; }
[JsonProperty("genre")]
public string Genre { get; set; }
[JsonProperty("duration")]
public int Duration { get; set; }
[JsonProperty("filename")]
public string Filename { get; set; }
[JsonProperty("song_path")]
public string SongPath { get; set; }
[JsonIgnore]
public Album Album { get; set; }
[JsonIgnore]
public int? AlbumId { get; set; }
[JsonIgnore]
public Album Album { get; set; }
[JsonIgnore]
public int? AlbumId { get; set; }
[JsonIgnore]
public Artist SongArtist { get; set; }
[JsonIgnore]
public int? ArtistId { get; set; }
[JsonIgnore]
public Artist SongArtist { get; set; }
[JsonIgnore]
public int? ArtistId { get; set; }
[JsonIgnore]
public Genre SongGenre { get; set; }
[JsonIgnore]
public int? GenreId { get; set; }
[JsonIgnore]
public Genre SongGenre { get; set; }
[JsonIgnore]
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; }
}
}
+6 -6
View File
@@ -3,10 +3,10 @@ using System.Text;
namespace Icarus.Models
{
public class SongData
{
public int Id { get; set; }
public byte[] Data { get; set; }
public int SongId { get; set; }
}
public class SongData
{
public int Id { get; set; }
public byte[] Data { get; set; }
public int SongId { get; set; }
}
}
+7 -7
View File
@@ -4,11 +4,11 @@ using Newtonsoft.Json;
namespace Icarus.Models
{
public class SongResult
{
[JsonProperty("message")]
public string Message { get; set; }
[JsonProperty("song_title")]
public string SongTitle { get; set; }
}
public class SongResult
{
[JsonProperty("message")]
public string Message { get; set; }
[JsonProperty("song_title")]
public string SongTitle { get; set; }
}
}
+25 -25
View File
@@ -4,29 +4,29 @@ using Newtonsoft.Json;
namespace Icarus.Models
{
public class User
{
[JsonProperty("id")]
public int Id { get; set; }
[JsonProperty("username")]
public string Username { get; set; }
[JsonProperty("nickname")]
public string Nickname { get; set; }
[JsonProperty("password")]
public string Password { get; set; }
[JsonProperty("email")]
public string Email { get; set; }
[JsonProperty("phone_number")]
public string PhoneNumber { get; set; }
[JsonProperty("first_name")]
public string Firstname { get; set; }
[JsonProperty("last_name")]
public string Lastname { get; set; }
[JsonProperty("email_verified")]
public bool EmailVerified { get; set; }
[JsonProperty("date_created")]
public DateTime DateCreated { get; set; }
[JsonProperty("last_login")]
public DateTime? LastLogin { get; set; }
}
public class User
{
[JsonProperty("id")]
public int Id { get; set; }
[JsonProperty("username")]
public string Username { get; set; }
[JsonProperty("nickname")]
public string Nickname { get; set; }
[JsonProperty("password")]
public string Password { get; set; }
[JsonProperty("email")]
public string Email { get; set; }
[JsonProperty("phone_number")]
public string PhoneNumber { get; set; }
[JsonProperty("first_name")]
public string Firstname { get; set; }
[JsonProperty("last_name")]
public string Lastname { get; set; }
[JsonProperty("email_verified")]
public bool EmailVerified { get; set; }
[JsonProperty("date_created")]
public DateTime DateCreated { get; set; }
[JsonProperty("last_login")]
public DateTime? LastLogin { get; set; }
}
}
+12 -12
View File
@@ -6,17 +6,17 @@ using Newtonsoft.Json;
namespace Icarus.Models
{
public class Year
{
[JsonProperty("id")]
public int YearId { get; set; }
[JsonProperty("year")]
public int YearValue { get; set; }
[JsonProperty("song_count")]
[NotMapped]
public int SongCount { get; set; }
public class Year
{
[JsonProperty("id")]
public int YearId { get; set; }
[JsonProperty("year")]
public int YearValue { get; set; }
[JsonProperty("song_count")]
[NotMapped]
public int SongCount { get; set; }
[JsonIgnore]
public List<Song> Songs { get; set; }
}
[JsonIgnore]
public List<Song> Songs { get; set; }
}
}