namespace SafeCampus.Application.Services.Business.Warn.Dto;
public class WarnInfoList
{
public long ID { get; set; }
///
/// 预警id
///
public string AlarmId { get; set; }
///
/// 预警类型
///
public string AlarmType { get; set; }
///
/// 预警类型名称
///
public string AlarmTypeDesc { get; set; }
///
/// 摄像头id
///
public string CameraId { get; set; }
///
/// 摄像头名称
///
public string CameraName { get; set; }
///
/// 摄像头所属分组
///
public string CameraGroup { get; set; }
///
/// 事件发生时间
///
public DateTime Tick { get; set; }
///
/// 摄像头快照,原链接有效期为2小时,获取到数据后下载到本地
///
public string SnapshotUrl { get; set; }
///
/// 人员id
///
public string PersonId { get; set; }
///
/// 人员名称
///
public string PersonName { get; set; }
///
/// 班级id
///
public string PersonSetId { get; set; }
///
/// 班级名称
///
public string PersonSetName { get; set; }
///
/// 性别
///
public string Gender { get; set; }
///
/// 人员类型
///
public string PersonType { get; set; }
///
/// 预警处理状态
///
public int WarnHand { get; set; }
///
/// 处理时间
///
public DateTime? HandTime { get; set; }
}
public class WarnInfoListMapper : IRegister
{
public void Register(TypeAdapterConfig config)
{
config.ForType()
//.Map(dest => dest.CameraName, src => src.CameraId.GetDescriptionByEnum());
.Map(dest => dest.CameraName, src => src.CameraInfoItem.SensorName)
.Map(x=>x.PersonName,x=>x.PersonInfoItem.Name)
.Map(x=>x.PersonSetName,x=>x.PersonSetInfoItem.PersonSetName)
.Map(dest => dest.CameraGroup, src => src.CameraInfoItem.CameraGroupItem.Name);
}
}