- Convert Tenant to anemia model with long Id (no strong-typed ID) - Add ApplicationUser, ApplicationRole to Platform.Domain (inherit Identity) - Add TenantInfo value object for user-tenant redundancy - Implement TenantManager/TenantStore in Platform.Infrastructure - Update PlatformDbContext to inherit IdentityDbContext - Migrate AuthService and Console to use Platform entities - Remove old TenantRepository (replaced by TenantManager) - Update AGENTS.md documentation
44 lines
955 B
C#
44 lines
955 B
C#
namespace Fengling.Platform.Domain.AggregatesModel.UserAggregate;
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
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;
|
|
}
|