This commit is contained in:
kdeng00
2021-12-22 21:33:12 -05:00
parent 922e527819
commit 8600d9b6bc
31 changed files with 495 additions and 1000 deletions
+10 -10
View File
@@ -9,16 +9,16 @@ 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 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; }
}
}
+8 -8
View File
@@ -9,14 +9,14 @@ 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 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; }
}
}
+1 -1
View File
@@ -7,6 +7,6 @@ namespace Icarus.Models
public class BaseResult
{
[JsonProperty("message")]
public string Message { get; set; }
public string Message { get; set; }
}
}
+8 -8
View File
@@ -9,14 +9,14 @@ 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 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; }
}
}
+9 -9
View File
@@ -7,14 +7,14 @@ 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 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; }
}
}
+3 -3
View File
@@ -7,8 +7,8 @@ namespace Icarus.Models
public class RegisterResult : BaseResult
{
[JsonProperty("username")]
public string Username { get; set; }
[JsonProperty("successfully_registered")]
public bool SuccessfullyRegistered { get; set; }
public string Username { get; set; }
[JsonProperty("successfully_registered")]
public bool SuccessfullyRegistered { get; set; }
}
}
+38 -38
View File
@@ -7,48 +7,48 @@ 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; }
[JsonProperty("song_id")]
public int SongID { 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; }
[JsonIgnore]
public CoverArt SongCoverArt { get; set; }
[JsonIgnore]
public int? CoverArtId { get; set; }
[JsonIgnore]
public CoverArt SongCoverArt { get; set; }
[JsonIgnore]
public int? CoverArtId { get; set; }
}
}
+2 -2
View File
@@ -6,7 +6,7 @@ namespace Icarus.Models
public class SongData
{
public int Id { get; set; }
public byte[] Data { get; set; }
public int SongId { get; set; }
public byte[] Data { get; set; }
public int SongId { get; set; }
}
}
+3 -3
View File
@@ -7,8 +7,8 @@ namespace Icarus.Models
public class SongResult
{
[JsonProperty("message")]
public string Message { get; set; }
[JsonProperty("song_title")]
public string SongTitle { get; set; }
public string Message { get; set; }
[JsonProperty("song_title")]
public string SongTitle { get; set; }
}
}
+5 -6
View File
@@ -9,26 +9,25 @@ namespace Icarus.Models
[Table("User")]
public class User
{
[JsonProperty("id")]
[Column("UserId")]
[JsonProperty("user_id")]
[Column("UserID")]
[Key]
public int Id { get; set; }
public int UserID { 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")]
[Column("Phone")]
public string PhoneNumber { get; set; }
public string Phone { get; set; }
[JsonProperty("first_name")]
public string Firstname { get; set; }
[JsonProperty("last_name")]
public string Lastname { get; set; }
[JsonProperty("email_verified")]
[NotMapped]
public bool EmailVerified { get; set; }
[JsonProperty("date_created")]
public DateTime DateCreated { get; set; }
-22
View File
@@ -1,22 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
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; }
[JsonIgnore]
public List<Song> Songs { get; set; }
}
}