Compare commits

..

No commits in common. "353e03c4fe1b2420df9d9bd60c040d1420583388" and "7eaa61678b838ef51cf241c344e4923b85a35113" have entirely different histories.

4 changed files with 13 additions and 3 deletions

View File

@ -27,7 +27,7 @@ namespace IRaCIS.Core.Application.ViewModel
public UserTypeEnum? OptUserTypeEnum { get; set; }
public string JsonObj { get; set; }
public UserLogJsonObj JsonObj { get; set; }
public string IPRegion { get; set; }
}

View File

@ -41,7 +41,7 @@ namespace IRaCIS.Core.Application.Triggers.AfterSaveTrigger
}).FirstOrDefaultAsync();
userlog.JsonObj = obj.ToJsonStr();
userlog.JsonObj = obj;
await _identityUserRepository.SaveChangesAsync();
}

View File

@ -27,7 +27,7 @@ public class UserLog : BaseAddAuditEntity
public string ActionUserName { get; set; }
[MaxLength]
public string JsonObj { get; set; }
public UserLogJsonObj JsonObj { get; set; }
[Comment("被操作的对象 admin 修改张三信息 张三是被操作对象")]
@ -66,6 +66,7 @@ public class UserLogJsonObj
public string DepartmentName { get; set; }
[NotMapped]
public List<UserRoleLogObj> UserRoleList { get; set; }
}

View File

@ -63,6 +63,15 @@ public class IRaCISDBContext : DbContext
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<UserLog>(entity =>
{
entity.OwnsOne(x => x.JsonObj, ownedNavigationBuilder =>
{
ownedNavigationBuilder.ToJson();
});
});
modelBuilder.Entity<TestLength>(entity =>
{
// 使用部分加密值转换器,前 2 个字符不加密,方便模糊搜索