|
@@ -0,0 +1,135 @@
|
|
|
|
+package org.jetlinks.pro.device.entity;
|
|
|
|
+
|
|
|
|
+import io.swagger.v3.oas.annotations.media.Schema;
|
|
|
|
+import lombok.Getter;
|
|
|
|
+import lombok.Setter;
|
|
|
|
+import org.hswebframework.ezorm.rdb.mapping.annotation.ColumnType;
|
|
|
|
+import org.hswebframework.ezorm.rdb.mapping.annotation.Comment;
|
|
|
|
+import org.hswebframework.ezorm.rdb.mapping.annotation.DefaultValue;
|
|
|
|
+import org.hswebframework.web.api.crud.entity.GenericEntity;
|
|
|
|
+import org.hswebframework.web.api.crud.entity.RecordCreationEntity;
|
|
|
|
+import org.hswebframework.web.api.crud.entity.RecordModifierEntity;
|
|
|
|
+import org.hswebframework.web.crud.annotation.EnableEntityEvent;
|
|
|
|
+import org.hswebframework.web.crud.generator.Generators;
|
|
|
|
+import org.hswebframework.web.validator.CreateGroup;
|
|
|
|
+
|
|
|
|
+import javax.persistence.Column;
|
|
|
|
+import javax.persistence.Table;
|
|
|
|
+import javax.validation.constraints.NotBlank;
|
|
|
|
+import java.sql.JDBCType;
|
|
|
|
+
|
|
|
|
+@Getter
|
|
|
|
+@Setter
|
|
|
|
+@Table(name = "dev_device_analog_quantity_type")
|
|
|
|
+@Comment("98号协议模拟量类型表")
|
|
|
|
+@EnableEntityEvent
|
|
|
|
+public class DeviceAnalogQuantityTypeEntity extends GenericEntity<String> implements
|
|
|
|
+ RecordCreationEntity, RecordModifierEntity {
|
|
|
|
+
|
|
|
|
+ @Column(length = 64,nullable = false)
|
|
|
|
+ @NotBlank(message = "模拟量类型值不能为空", groups = CreateGroup.class)
|
|
|
|
+ @Schema(description = "模拟量类型值")
|
|
|
|
+ private String value;
|
|
|
|
+
|
|
|
|
+ @Column(length = 64,nullable = false)
|
|
|
|
+ @NotBlank(message = "模拟量类型值说明不能为空", groups = CreateGroup.class)
|
|
|
|
+ @Schema(description = "模拟量类型值说明")
|
|
|
|
+ private String name;
|
|
|
|
+
|
|
|
|
+ @Column(length = 64)
|
|
|
|
+ @Schema(description = "单位")
|
|
|
|
+ @ColumnType(jdbcType = JDBCType.CLOB, javaType = String.class)
|
|
|
|
+ private String unit;
|
|
|
|
+
|
|
|
|
+ @Column(length = 64)
|
|
|
|
+ @Schema(description = "有效范围值")
|
|
|
|
+ private String validValue;
|
|
|
|
+
|
|
|
|
+ @Column(length = 64)
|
|
|
|
+ @Schema(description = "最小计量单元")
|
|
|
|
+ private String minMeteringUnit;
|
|
|
|
+
|
|
|
|
+ @Column(name = "creator_id", updatable = false)
|
|
|
|
+ @Schema(
|
|
|
|
+ description = "创建者ID(只读)"
|
|
|
|
+ , accessMode = Schema.AccessMode.READ_ONLY
|
|
|
|
+ )
|
|
|
|
+ private String creatorId;
|
|
|
|
+
|
|
|
|
+ @Column(name = "creator_name", updatable = false)
|
|
|
|
+ @Schema(
|
|
|
|
+ description = "创建者名称(只读)"
|
|
|
|
+ , accessMode = Schema.AccessMode.READ_ONLY
|
|
|
|
+ )
|
|
|
|
+ private String creatorName;
|
|
|
|
+
|
|
|
|
+ @Column(name = "create_time", updatable = false)
|
|
|
|
+ @DefaultValue(generator = Generators.CURRENT_TIME)
|
|
|
|
+ @Schema(
|
|
|
|
+ description = "创建时间(只读)"
|
|
|
|
+ , accessMode = Schema.AccessMode.READ_ONLY
|
|
|
|
+ )
|
|
|
|
+ private Long createTime;
|
|
|
|
+
|
|
|
|
+ @Column
|
|
|
|
+ @DefaultValue(generator = Generators.CURRENT_TIME)
|
|
|
|
+ @Schema(
|
|
|
|
+ description = "修改时间"
|
|
|
|
+ , accessMode = Schema.AccessMode.READ_ONLY
|
|
|
|
+ )
|
|
|
|
+ private Long modifyTime;
|
|
|
|
+
|
|
|
|
+ @Column(length = 64)
|
|
|
|
+ @Schema(
|
|
|
|
+ description = "修改人ID"
|
|
|
|
+ , accessMode = Schema.AccessMode.READ_ONLY
|
|
|
|
+ )
|
|
|
|
+ private String modifierId;
|
|
|
|
+
|
|
|
|
+ @Column(length = 64)
|
|
|
|
+ @Schema(
|
|
|
|
+ description = "修改人名称"
|
|
|
|
+ , accessMode = Schema.AccessMode.READ_ONLY
|
|
|
|
+ )
|
|
|
|
+ private String modifierName;
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public String getCreatorId() {
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void setCreatorId(String s) {
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public Long getCreateTime() {
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void setCreateTime(Long aLong) {
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public String getModifierId() {
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void setModifierId(String s) {
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public Long getModifyTime() {
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void setModifyTime(Long aLong) {
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+}
|