19 lines
604 B
C#
19 lines
604 B
C#
namespace Shadow.Entities;
|
|
public class User
|
|
{
|
|
public int Id { get; set; }
|
|
required public string Name { get; set; }
|
|
required public string NormalizedName { get; set; }
|
|
// required public string Email { get; set; } // Currently not used
|
|
required public string Password { get; set; }
|
|
public int Role { get; set; } = 1;
|
|
|
|
public List<Playlist> Playlists { get; set; } = [];
|
|
public List<AlbumInteraction> AlbumInteractions { get; set; } = [];
|
|
public List<SongInteraction> SongInteractions { get; set; } = [];
|
|
|
|
public bool IsAdmin() => Role == 0;
|
|
public bool IsUnpriviledgedUser() => Role == 1;
|
|
|
|
}
|