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,33 @@
namespace CSR.Domain.Entities;
public record Role
{
public int Id { get; private set; }
public string Name { get; private set; }
private Role(int id, string name)
{
Id = id;
Name = name;
}
internal static Role LoadExisting(int id, string name)
{
return new Role(id, name);
}
public static Role Admin
{
get
{
return new Role(1, "Admin");
}
}
public static Role User
{
get
{
return new Role(2, "User");
}
}
}