|
|
@@ -8,6 +8,7 @@ import org.hswebframework.ezorm.rdb.mapping.annotation.DefaultValue;
|
|
|
import org.hswebframework.ezorm.rdb.mapping.annotation.EnumCodec;
|
|
|
import org.hswebframework.web.api.crud.entity.GenericEntity;
|
|
|
import org.jetlinks.community.media.enums.DeviceState;
|
|
|
+import org.jetlinks.community.media.enums.PtzType;
|
|
|
|
|
|
import javax.persistence.Column;
|
|
|
import javax.persistence.Table;
|
|
|
@@ -209,23 +210,19 @@ public class MediaDeviceChannel extends GenericEntity<String> {
|
|
|
)
|
|
|
private String password;
|
|
|
|
|
|
- /**
|
|
|
- * 云台类型
|
|
|
- */
|
|
|
- @Column(name = "PTZ_type")
|
|
|
- @Schema(
|
|
|
- description = "云台类型"
|
|
|
- )
|
|
|
- private int PTZType;
|
|
|
-
|
|
|
/**
|
|
|
* 云台类型描述字符串
|
|
|
*/
|
|
|
- @Column(name = "PTZ_type_text")
|
|
|
+ @Column(name = "ptz_type",length = 16)
|
|
|
+ @EnumCodec
|
|
|
+ @ColumnType(javaType = String.class)
|
|
|
+ @DefaultValue("offline")
|
|
|
@Schema(
|
|
|
- description = "云台类型描述字符串"
|
|
|
+ description = "状态(只读)"
|
|
|
+ ,accessMode = Schema.AccessMode.READ_ONLY
|
|
|
+ , defaultValue = "UNKNOWN"
|
|
|
)
|
|
|
- private String PTZTypeText;
|
|
|
+ private PtzType ptzType;
|
|
|
|
|
|
/**
|
|
|
* 创建时间
|
|
|
@@ -310,27 +307,6 @@ public class MediaDeviceChannel extends GenericEntity<String> {
|
|
|
)
|
|
|
private boolean hasAudio;
|
|
|
|
|
|
- public void setPTZType(int PTZType) {
|
|
|
- this.PTZType = PTZType;
|
|
|
- switch (PTZType) {
|
|
|
- case 0:
|
|
|
- this.PTZTypeText = "未知";
|
|
|
- break;
|
|
|
- case 1:
|
|
|
- this.PTZTypeText = "球机";
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- this.PTZTypeText = "半球";
|
|
|
- break;
|
|
|
- case 3:
|
|
|
- this.PTZTypeText = "固定枪机";
|
|
|
- break;
|
|
|
- case 4:
|
|
|
- this.PTZTypeText = "遥控枪机";
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
@Override
|
|
|
public boolean equals(Object o) {
|
|
|
if (this == o) return true;
|