平安校园
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

PersonSetInfoDto.cs 1.3 KiB

3 months ago
1 month ago
1 month ago
1 month ago
1 month ago
3 months ago
12345678910111213141516171819202122232425262728293031323334353637383940
  1. namespace SafeCampus.Application.Services.Business.PersonSetInfoService;
  2. public class PersonSetInfoDto
  3. {
  4. /// <summary>
  5. /// 班级id
  6. /// </summary>
  7. public string PersonSetId { get; set; }
  8. /// <summary>
  9. /// 班级名称
  10. /// </summary>
  11. public string PersonSetName { get; set; }
  12. /// <summary>
  13. /// 专业id
  14. /// </summary>
  15. public long MajorId { get; set; }
  16. /// <summary>
  17. /// 班主任id
  18. /// </summary>
  19. public long TeacherId { get; set; }
  20. public string PushUserId { get; set; }
  21. public string UserName { get; set; }
  22. public string MajorName { get; set; }
  23. public string DepartmentName { get; set; }
  24. public SysUser SysUserItem { get; set; }
  25. }
  26. public class PersonSetInfoDtoMapper : IRegister
  27. {
  28. public void Register(TypeAdapterConfig config)
  29. {
  30. config.ForType<PersonSetInfo, PersonSetInfoDto>()
  31. .Map(x=>x.TeacherId,x=>x.ClassTeacherItem.Id)
  32. .Map(x => x.PushUserId, x => x.ClassTeacherItem.UserId)
  33. .Map(x => x.UserName, x => x.ClassTeacherItem.SysUserItem.Name)
  34. .Map(x => x.SysUserItem, x => x.ClassTeacherItem.SysUserItem)
  35. .Map(x=>x.DepartmentName,x=>x.MajorInfoItem.DepartmentInfoItem.Name)
  36. .Map(x=>x.MajorName,x=>x.MajorInfoItem.Name);
  37. }
  38. }