新增注册流程

This commit is contained in:
南浔
2024-11-03 22:01:35 +08:00
36 changed files with 2001 additions and 143 deletions
+18
View File
@@ -0,0 +1,18 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Apimanager_backend.Models
{
[Table("Logs")]
public class Log
{
public int Id { get; set; }
public DateTime Timestamp { get; set; }
public string Message { get; set; }
public string Exception { get; set; }
public string MessageTemplate { get; set; }
public string Properties { get; set; }
public string LogLevel { get; set; }
}
}
+2 -1
View File
@@ -30,7 +30,7 @@ namespace Apimanager_backend.Models
/// <summary>
/// 用户角色
/// </summary>
public UserRole Role { get; set; } // Enum('Admin','User')
//public UserRole Role { get; set; } // Enum('Admin','User')
/// <summary>
/// 是否禁用
@@ -56,5 +56,6 @@ namespace Apimanager_backend.Models
public ICollection<OperationLog> operationLogs { get; set; }
public ICollection<ApiCallLog> CallLogs { get; set; }
public ICollection<Order> Orders { get; set; }
public ICollection<UserRole> Roles { get; set; } = new List<UserRole>();
}
}
+11 -4
View File
@@ -1,8 +1,15 @@
namespace Apimanager_backend.Models
using System.Text.Json.Serialization;
namespace Apimanager_backend.Models
{
public enum UserRole
public class UserRole
{
Admin = 0,
User = 1
public int Id { get; set; }
public int UserId { get; set; }
public string Role { get; set; }
//导航属性
[JsonIgnore]
public User User { get; set; }
}
}