- 配置AuthService使用OpenIddict reference tokens - 添加fengling-api客户端用于introspection验证 - 配置Console API通过OpenIddict验证reference tokens - 实现Tenant/Users/Roles/OAuthClients CRUD API - 添加GatewayController服务注册API - 重构Repository和Service层支持多租户 BREAKING CHANGE: API认证现在使用OpenIddict reference tokens
44 lines
933 B
C#
44 lines
933 B
C#
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace Fengling.Console.Models.Entities;
|
|
|
|
public class AccessLog
|
|
{
|
|
[Key]
|
|
public long Id { get; set; }
|
|
|
|
[MaxLength(50)]
|
|
public string? UserName { get; set; }
|
|
|
|
[MaxLength(50)]
|
|
public string? TenantId { get; set; }
|
|
|
|
[MaxLength(20)]
|
|
public string Action { get; set; } = string.Empty;
|
|
|
|
[MaxLength(200)]
|
|
public string? Resource { get; set; }
|
|
|
|
[MaxLength(10)]
|
|
public string? Method { get; set; }
|
|
|
|
[MaxLength(50)]
|
|
public string? IpAddress { get; set; }
|
|
|
|
[MaxLength(500)]
|
|
public string? UserAgent { get; set; }
|
|
|
|
[MaxLength(20)]
|
|
public string Status { get; set; } = "success";
|
|
|
|
public int Duration { get; set; }
|
|
|
|
public string? RequestData { get; set; }
|
|
|
|
public string? ResponseData { get; set; }
|
|
|
|
public string? ErrorMessage { get; set; }
|
|
|
|
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
|
}
|