Init commit

add security encryption and hashing: WIP
add endpoints: register user, get and save resources
add db main operations, User entity
This commit is contained in:
Alex Bezdieniezhnykh
2024-11-09 00:37:43 +02:00
commit 121052a3ef
26 changed files with 605 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
namespace Azaion.Common.Entities;
public enum ResourceEnum
{
AnnotatorDll = 10,
AIModelRKNN = 20,
AIModelONNX = 20,
}
+9
View File
@@ -0,0 +1,9 @@
namespace Azaion.Common;
public enum RoleEnum
{
Operator,
Validator,
CompanionPC,
Admin
}
+12
View File
@@ -0,0 +1,12 @@
namespace Azaion.Common.Entities;
public class User
{
public string Id { get; set; } = null!;
public string Username { get; set; } = null!;
public string PasswordHash { get; set; } = null!;
public string HardwareId { get; set; } = null!;
public RoleEnum Role { get; set; }
public string UniqueKey => $"Azaion#{Username}#{PasswordHash}#{HardwareId}";
}