mirror of
https://github.com/azaion/admin.git
synced 2026-04-22 08:46:34 +00:00
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:
@@ -0,0 +1,8 @@
|
||||
namespace Azaion.Common.Entities;
|
||||
|
||||
public enum ResourceEnum
|
||||
{
|
||||
AnnotatorDll = 10,
|
||||
AIModelRKNN = 20,
|
||||
AIModelONNX = 20,
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace Azaion.Common;
|
||||
|
||||
public enum RoleEnum
|
||||
{
|
||||
Operator,
|
||||
Validator,
|
||||
CompanionPC,
|
||||
Admin
|
||||
}
|
||||
@@ -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}";
|
||||
}
|
||||
Reference in New Issue
Block a user