using Newtonsoft.Json.Linq;
namespace SafeCampus.Application.Services.Business.Warn.Dto;
public class WarnInfoDto
{
public long? ID { get; set; }
///
/// 租户id
///
public string TenantCode { get; set; }
///
/// 门店id
///
public string PoiId { 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 DateTime Tick { get; set; }
///
/// 摄像头快照,原链接有效期为2小时,获取到数据后下载到本地
///
public string SnapshotUrl { get; set; }
///
/// 预警关联视频(有些报警有,有些没有)
///
public string VideoUrl { get; set; }
///
/// 目标在快照中的位置
///
public string Rects { get; set; }
///
/// 人员名称
///
public string PersonName { get; set; }
///
/// 性别
///
public string Gender { get; set; }
///
/// 班级id
///
public string PersonSetId { get; set; }
///
/// 班级名称
///
public string PersonSetName { get; set; }
///
/// 人员id
///
public string PersonId { get; set; }
///
/// 人脸相似度
///
public float? FaceSimilarity { get; set; }
///
/// 人员跟踪id,同一个id表示是同一个人
///
public string TrackId { get; set; }
///
/// 服装库id
///
public string ClothsSetId { get; set; }
///
/// 服装id
///
public string ClothId { get; set; }
///
/// 服装相似度
///
public float? ClothSimilarity { get; set; }
///
/// 奔跑速度
///
public string SpeedLevel { get; set; }
///
/// 奔跑时周围人数
///
public int? MaxAroundTracks { get; set; }
///
/// 人群数量
///
public int? Count { get; set; }
///
/// 持续时长
///
public int? Duration { get; set; }
///
/// 人员类型
///
public string PersonType { get; set; }
///
///场景标签
///
public string Tags { get; set; }
///
/// 额外数据,每个预警类型不同
///
public string Extend { get; set; }
///
/// 预警处理状态
///
public int WarnHand { get; set; }
///
/// 处理意见
///
public string Remark { get; set; }
///
/// 处理时间
///
public DateTime? HandTime { get; set; }
}
public class WarnInfoDtoMapper : IRegister
{
public void Register(TypeAdapterConfig config)
{
config.ForType()
//.Map(dest => dest.CameraName, src => src.CameraId.GetDescriptionByEnum());
.Map(x => x.PersonSetName,x=>x.PersonSetInfoItem.PersonSetName)
.Map(x => x.PersonName,x=>x.PersonInfoItem.Name)
.Map(dest => dest.CameraName, src => src.CameraInfoItem.SensorName);
}
}