using Newtonsoft.Json; namespace SafeCampus.Application.Services.Business.BuildingService; public class BuildingInfoDto { /// /// ID /// public long? Id { get; set; } /// /// 宿舍楼名称 /// public string Name { get; set; } /// /// 男寝还是女寝 /// public bool Gender { get; set; } /// /// 创建时间 /// public DateTime CreateTime { get; set; } /// /// 进入摄像头id /// [JsonProperty(NullValueHandling = NullValueHandling.Include)] public string InsCameraId { get; set; } /// /// 摄像头名称 /// [JsonProperty(NullValueHandling = NullValueHandling.Include)] public string InsCameraName { get; set;} /// /// 出去摄像头id /// [JsonProperty(NullValueHandling = NullValueHandling.Include)] public string OutCameraId { get; set; } /// /// 出去摄像头名称 /// [JsonProperty(NullValueHandling = NullValueHandling.Include)] public string OutCameraName { get; set;} } public class BuildingInfoDtoMapper : IRegister { public void Register(TypeAdapterConfig config) { config.ForType() .Map(x => x.InsCameraName, x => x.InsCameraInfoItem.SensorName) .Map(x => x.OutCameraName, x => x.OutCameraInfoItem.SensorName); } }