feat: add database connections, initial migration and early CLI tooling
All checks were successful
Update changelog / changelog (push) Successful in 25s
All checks were successful
Update changelog / changelog (push) Successful in 25s
This commit is contained in:
18
Entities/User.cs
Normal file
18
Entities/User.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
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;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user