/***************************************************************************** * * 作 者 : 夏松 * 创建时间 : 2020/5/11 9:46:23 * * *****************************************************************************/ import {DetectArgList} from './detectArgList.domain'; /** * 摄像头预置点 */ export class PresetPoint { ID: string; // 预置点标识 DeviceSn: string; // 设备唯一标识 Name: string; // 监控点名称 Rotation: number; // 水平旋转角度 Pitch: number; // 俯仰角 FocalLength: number; // 焦距 DetectArgs: DetectArgList; // 业务区域 BizType: string; // 业务类型 ImgUrl: string; // 图片图像 presetPointIndex: string; // 预设点序号 constructor(options: { ID?: string; DeviceSn?: string; Name?: string; Rotation?: number; Pitch?: number; FocalLength?: number; DetectArgs?: DetectArgList; BizType?: string; ImgUrl?: string; presetPointIndex?: string; } = {}) { this.ID = options.ID || ''; this.DeviceSn = options.DeviceSn || ''; this.Name = options.Name || ''; this.Rotation = !options.Rotation ? 0 : Number.parseFloat(options.Rotation.toString()); this.Pitch = !options.Pitch ? 0 : Number.parseFloat(options.Pitch.toString()); this.FocalLength = !options.FocalLength ? 0 : Number.parseFloat(options.FocalLength.toString()); this.DetectArgs = options.DetectArgs ? new DetectArgList(options.DetectArgs) : new DetectArgList(); this.BizType = options.BizType || ''; this.ImgUrl = options.ImgUrl || ''; this.presetPointIndex = options.DeviceSn || ''; } }