package vo import "vamicro/scene-service/models" type CameraPolygonVo struct { CameraId string `json:"camera_id"` //摄像机id CameraName string `json:"camera_name"` //摄像机名称 SnapshotUrl string `json:"snapshot_url"` //摄像机底图 Line []PolygonS `json:"line"` //画的所有线 Rect []PolygonS `json:"rect"` //矩形 Arrow []PolygonS `json:"arrow"` //箭头 Polygon []PolygonS `json:"polygon"` //多边形 Coords []CoordTrans `json:"coords"` Force bool `json:"force"` //是否强制保存,为true则可以强制删除在使用中的区域 } type CoordTrans struct { X0 int `json:"x0"` Y0 int `json:"y0"` X1 int `json:"x1"` Y1 int `json:"y1"` } type PolygonS struct { Id string `json:"id"` //形状id Name string `json:"name"` //形状名称 Location []Point `json:"location"` //形状坐标 DefenceState int `json:"defence_state"` //默认为0,不启用 } //坐标定义 type Point struct { X float64 `json:"x"` Y float64 `json:"y"` } type SaveRelationVo struct { Id string `json:"id"` GroupId string `json:"groupId" binding:"required"` //分组id SourceCameraId string `json:"source_camera_id" binding:"required"` SourcePolygonId string `json:"source_polygon_id" binding:"required"` SourcePolygon PolygonS `json:"source_polygon"` TargetCameraId string `json:"target_camera_id" binding:"required"` TargetPolygonId string `json:"target_polygon_id" binding:"required"` TargetPolygon PolygonS `json:"target_polygon"` } // saas同步相机场景 type SyncPolygonResult struct { CameraGroup []models.CameraGroup `json:"camera_group"` CameraPolygon []models.CameraPolygon `json:"camera_polygon"` CameraPolygonRelation []models.CameraPolygonRelation `json:"camera_polygon_relation"` CameraRuleGroup []models.CameraRuleGroup `json:"camera_rule_group"` CameraRuleGroupArg []models.CameraRuleGroupArg `json:"camera_rule_group_arg"` CameraTaskLink []models.CameraTaskLink `json:"camera_task_link"` CameraTimerule []models.CameraTimerule `json:"camera_timerule"` }