Files
Shadow/Entities/User.cs
sherl f648a73cb2
All checks were successful
Update changelog / changelog (push) Successful in 25s
feat: add database connections, initial migration and early CLI tooling
2025-12-09 01:46:05 +01:00

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;
}