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

47 lines
1.2 KiB

  1. namespace SafeCampus.Application.Services.Business.BuildingService;
  2. public class BuildingInfoDto
  3. {
  4. /// <summary>
  5. /// ID
  6. /// </summary>
  7. public long? Id { get; set; }
  8. /// <summary>
  9. /// 宿舍楼名称
  10. /// </summary>
  11. public string Name { get; set; }
  12. /// <summary>
  13. /// 男寝还是女寝
  14. /// </summary>
  15. public bool Gender { get; set; }
  16. /// <summary>
  17. /// 创建时间
  18. /// </summary>
  19. public DateTime CreateTime { get; set; }
  20. /// <summary>
  21. /// 进入摄像头id
  22. /// </summary>
  23. public string InsCameraId { get; set; }
  24. /// <summary>
  25. /// 摄像头名称
  26. /// </summary>
  27. public string InsCameraName { get; set;}
  28. /// <summary>
  29. /// 出去摄像头id
  30. /// </summary>
  31. public string OutCameraId { get; set; }
  32. /// <summary>
  33. /// 出去摄像头名称
  34. /// </summary>
  35. public string OutCameraName { get; set;}
  36. }
  37. public class BuildingInfoDtoMapper : IRegister
  38. {
  39. public void Register(TypeAdapterConfig config)
  40. {
  41. config.ForType<BuildingInfo, BuildingInfoDto>()
  42. .Map(x => x.InsCameraName, x => x.InsCameraInfoItem.SensorName)
  43. .Map(x => x.OutCameraName, x => x.OutCameraInfoItem.SensorName);
  44. }
  45. }