平安校园
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.

MajorDto.cs 869 B

2 months ago
2 months ago
12345678910111213141516171819202122232425262728293031323334353637
  1. namespace SafeCampus.Application.Services.Business.MajorService;
  2. public class MajorDto
  3. {
  4. public long? Id { get; set; }
  5. /// <summary>
  6. /// 专业名称
  7. /// </summary>
  8. public string Name { get; set; }
  9. /// <summary>
  10. /// 专业编码
  11. /// </summary>
  12. public string Code { get; set; }
  13. /// <summary>
  14. /// 专业简介
  15. /// </summary>
  16. public string Introduce { get; set; }
  17. /// <summary>
  18. /// 院系id
  19. /// </summary>
  20. public long DepId { get; set; }
  21. /// <summary>
  22. /// 排序
  23. /// </summary>
  24. public int Sort { get; set; }
  25. public string DepartmentName { get; set; }
  26. }
  27. public class MajorDtoMapper : IRegister
  28. {
  29. public void Register(TypeAdapterConfig config)
  30. {
  31. config.ForType<MajorInfo, MajorDto>()
  32. .Map(x => x.DepartmentName, x => x.DepartmentInfoItem.Name);
  33. }
  34. }