fix: remove required from entities' id
also adds "Global" entity for storing global configuration
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
namespace Shadow.Entities;
|
||||
public class Album
|
||||
{
|
||||
required public int Id { get; set; }
|
||||
public int Id { get; set; }
|
||||
public required string Name { get; set; }
|
||||
public required string Uri { get; set; }
|
||||
public int State { get; set; } = 0;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace Shadow.Entities;
|
||||
public class AlbumInteraction
|
||||
{
|
||||
required public int Id { get; set; }
|
||||
public int Id { get; set; }
|
||||
required public int AlbumId { get; set; }
|
||||
required public int UserId { get; set; }
|
||||
public DateTime? PlayDate { get; set; } = null;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace Shadow.Entities;
|
||||
public class Artist
|
||||
{
|
||||
required public int Id { get; set; }
|
||||
public int Id { get; set; }
|
||||
required public string Name { get; set; }
|
||||
required public string NormalizedName { get; set; }
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace Shadow.Entities;
|
||||
public class Genre
|
||||
{
|
||||
required public int Id { get; set; }
|
||||
public int Id { get; set; }
|
||||
required public string Name { get; set; }
|
||||
required public string NormalizedName { get; set; }
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ namespace Shadow.Entities;
|
||||
public class GenreSong
|
||||
{
|
||||
// Composite keys
|
||||
required public int GenreId { get; set; }
|
||||
public int GenreId { get; set; }
|
||||
required public int SongId { get; set; }
|
||||
|
||||
required public Genre Genre { get; set; }
|
||||
|
||||
7
Entities/Global.cs
Normal file
7
Entities/Global.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace Shadow.Entities;
|
||||
public class Global
|
||||
{
|
||||
public int Id { get; set; }
|
||||
required public string Key { get; set; }
|
||||
public string? Value { get; set; } = null;
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
namespace Shadow.Entities;
|
||||
public class Image
|
||||
{
|
||||
required public int Id { get; set; }
|
||||
public int Id { get; set; }
|
||||
required public string Uri { get; set; }
|
||||
required public string Filetype { get; set; }
|
||||
public int State { get; set; }
|
||||
public int? SongId { get; set; } = null;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace Shadow.Entities;
|
||||
public class Playlist
|
||||
{
|
||||
required public int Id { get; set; }
|
||||
public int Id { get; set; }
|
||||
required public string Name { get; set; }
|
||||
required public string Uri { get; set; }
|
||||
required public string Description { get; set; }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace Shadow.Entities;
|
||||
public class Radio
|
||||
{
|
||||
required public int Id { get; set; }
|
||||
public int Id { get; set; }
|
||||
required public string Name { get; set; }
|
||||
required public string NormalizedName { get; set; }
|
||||
public string? Homepage { get; set; } = null;
|
||||
|
||||
Reference in New Issue
Block a user