网站首页 网站源码
website
站点相关全部源代码,隐藏了一些关于服务器的信息
using System;
using System.Collections.Generic;
using Dpz.Core.Infrastructure;
using Dpz.Core.Public.Entity;

namespace Dpz.Core.Public.ViewModel.Response;

/// <summary>
/// 用户信息变更记录
/// </summary>
public class UserHistoryResponse : IMapFrom<UserHistory>
{
    public string Id { get; set; }

    /// <summary>
    /// 账号
    /// </summary>
    public string Account { get; set; }

    /// <summary>
    /// 变更时间
    /// </summary>
    public DateTime ChangeTime { get; set; }

    /// <summary>
    /// 变更详情
    /// </summary>
    private List<ChangeDetail> _changes;
    public List<ChangeDetail> Changes
    {
        get => _changes;
        set
        {
            (value ?? []).ForEach(x =>
            {
                if (x.Field == nameof(User.Password))
                {
                    x.NewValue = "******";
                    x.OldValue = "******";
                }
            });
            _changes = (value ?? []);
        }
    }
}
loading