- 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
48 lines
1.1 KiB
C#
48 lines
1.1 KiB
C#
namespace Fengling.Platform.Domain.AggregatesModel.UserAggregate;
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
public class AuditLog
|
|
{
|
|
[Key]
|
|
public long Id { get; set; }
|
|
|
|
[MaxLength(50)]
|
|
[Required]
|
|
public string Operator { get; set; } = string.Empty;
|
|
|
|
[MaxLength(50)]
|
|
public string? TenantId { get; set; }
|
|
|
|
[MaxLength(20)]
|
|
public string Operation { get; set; } = string.Empty;
|
|
|
|
[MaxLength(20)]
|
|
public string Action { get; set; } = string.Empty;
|
|
|
|
[MaxLength(50)]
|
|
public string? TargetType { get; set; }
|
|
|
|
public long? TargetId { get; set; }
|
|
|
|
[MaxLength(100)]
|
|
public string? TargetName { get; set; }
|
|
|
|
[MaxLength(50)]
|
|
public string IpAddress { get; set; } = string.Empty;
|
|
|
|
[MaxLength(500)]
|
|
public string? Description { get; set; }
|
|
|
|
public string? OldValue { get; set; }
|
|
|
|
public string? NewValue { get; set; }
|
|
|
|
public string? ErrorMessage { get; set; }
|
|
|
|
[MaxLength(20)]
|
|
public string Status { get; set; } = "success";
|
|
|
|
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
|
}
|