Create models and Clean Arch boilerplate

This commit is contained in:
danial23 2025-05-19 16:13:58 -04:00
parent 3926db5446
commit 872dc1e263
Signed by: danial23
SSH key fingerprint: SHA256:IJ8VP0j2WMUVweTYnzUUnEjNgPnGx+mAt+RhqWZ01bU
21 changed files with 576 additions and 27 deletions

View file

@ -0,0 +1,17 @@
namespace CSR.Infrastructure.Persistence;
public class User
{
public int Id { get; set; }
public required string Username { get; set; }
public required string Email { get; set; }
public required string PasswordHash { get; set; }
public required int RoleId { get; set; }
// Navigation property
public Role Role { get; set; } = null!;
// prevent direct instantiation
// use UserService to create a new user
internal User() { }
}