using System.ComponentModel; namespace IRaCIS.Core.Domain.Models; [Table("UserLog")] public class UserLog : BaseAddAuditEntity { #region 导航属性 [JsonIgnore] public User LoginUser { get; set; } [JsonIgnore] public User OptUser { get; set; } #endregion public string IP { get; set; } = string.Empty; public string LoginFaildName { get; set; } = string.Empty; public UserOptType OptType { get; set; } public string LoginPassword { get; set; } = string.Empty; public Guid? LoginUserId { get; set; } public Guid? OptUserId { get; set; } public string IPRegion { get; set; } = string.Empty; } [Description("登录或者登出 锁定类型")] public enum UserOptType { [Description("用户登录")] Login = 1, [Description("用户登出")] LoginOut = 2, [Description("账号或者密码错误")] AccountOrPasswordError = 3, [Description("账号锁定")] AccountLocked = 4, //账号启用 AccountEnable = 5, //登录锁定账户 LoginLockedAccount = 6, //修改密码 LoginModifyPassword = 7, UnloginModifyPasswoed = 8, //admin 重置密码 ResetPassword = 9, DeleteUser = 10, UpdateUser = 11, MFALogin = 12, MFALoginFail = 13, }