namespace SafeCampus.Application.Services.Business.PersonSetInfoService;

public class PersonSetInfoDto
{
    /// <summary>
    /// 班级id
    /// </summary>
    public string PersonSetId { get; set; }
    /// <summary>
    /// 班级名称
    /// </summary>
    public string PersonSetName { get; set; }
    /// <summary>
    /// 专业id
    /// </summary>
    public long MajorId { get; set; }

    public string UserId { get; set; }
    public string UserName { get; set; }
    public string MajorName { get; set; }
    public string DepartmentName { get; set; }
}

public class PersonSetInfoDtoMapper : IRegister
{
    public void Register(TypeAdapterConfig config)
    {
        config.ForType<PersonSetInfo, PersonSetInfoDto>()
            .Map(x => x.UserId, x => x.ClassTeacherItem.UserId)
            .Map(x => x.UserName, x => x.ClassTeacherItem.SysUserItem.Name)
            .Map(x=>x.DepartmentName,x=>x.MajorInfoItem.DepartmentInfoItem.Name)
            .Map(x=>x.MajorName,x=>x.MajorInfoItem.Name);
    }
}