|
- 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; }
- /// <summary>
- /// 班主任id
- /// </summary>
- public long TeacherId { get; set; }
- public string PushUserId { get; set; }
- public string UserName { get; set; }
- public string MajorName { get; set; }
- public string DepartmentName { get; set; }
- public SysUser SysUserItem { get; set; }
- }
-
- public class PersonSetInfoDtoMapper : IRegister
- {
- public void Register(TypeAdapterConfig config)
- {
- config.ForType<PersonSetInfo, PersonSetInfoDto>()
- .Map(x=>x.TeacherId,x=>x.ClassTeacherItem.Id)
- .Map(x => x.PushUserId, x => x.ClassTeacherItem.UserId)
- .Map(x => x.UserName, x => x.ClassTeacherItem.SysUserItem.Name)
- .Map(x => x.SysUserItem, x => x.ClassTeacherItem.SysUserItem)
- .Map(x=>x.DepartmentName,x=>x.MajorInfoItem.DepartmentInfoItem.Name)
- .Map(x=>x.MajorName,x=>x.MajorInfoItem.Name);
- }
- }
|