|
@@ -0,0 +1,43 @@
|
|
|
|
|
+package cn.iocoder.yudao.module.pms.config;
|
|
|
|
|
+
|
|
|
|
|
+import lombok.Data;
|
|
|
|
|
+import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
|
|
|
+import org.springframework.context.annotation.Configuration;
|
|
|
|
|
+
|
|
|
|
|
+import java.util.List;
|
|
|
|
|
+
|
|
|
|
|
+@Configuration
|
|
|
|
|
+@ConfigurationProperties(prefix = "hikvision.superbrain")
|
|
|
|
|
+@Data
|
|
|
|
|
+public class HikvisionConfig {
|
|
|
|
|
+ private String ip;
|
|
|
|
|
+ private Integer port = 80;
|
|
|
|
|
+ private String username;
|
|
|
|
|
+ private String password;
|
|
|
|
|
+
|
|
|
|
|
+ private AlarmConfig alarm;
|
|
|
|
|
+
|
|
|
|
|
+ @Data
|
|
|
|
|
+ public static class AlarmConfig {
|
|
|
|
|
+ private SubscribeConfig subscribe;
|
|
|
|
|
+ private HandlerConfig handler;
|
|
|
|
|
+
|
|
|
|
|
+ @Data
|
|
|
|
|
+ public static class SubscribeConfig {
|
|
|
|
|
+ private Boolean enabled = true;
|
|
|
|
|
+ private String localIp;
|
|
|
|
|
+ private Integer localPort;
|
|
|
|
|
+ private String protocol = "HTTP";
|
|
|
|
|
+ private String format = "JSON"; // JSON或XML,默认JSON
|
|
|
|
|
+ private Integer subscribeDuration = 3600;
|
|
|
|
|
+ private List<String> alarmTypes;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Data
|
|
|
|
|
+ public static class HandlerConfig {
|
|
|
|
|
+ private Boolean saveToDb = true;
|
|
|
|
|
+ private Boolean sendNotification = false;
|
|
|
|
|
+ private List<String> notificationTypes;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+}
|