|
@@ -1,11 +1,17 @@
|
|
|
package com.qmth.distributed.print.business.entity;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.annotation.FieldFill;
|
|
|
import com.baomidou.mybatisplus.annotation.TableField;
|
|
|
import com.baomidou.mybatisplus.annotation.TableId;
|
|
|
import com.baomidou.mybatisplus.annotation.TableName;
|
|
|
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
|
|
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
|
|
import com.qmth.distributed.print.business.base.BaseEntity;
|
|
|
+import com.qmth.distributed.print.common.contant.SystemConstant;
|
|
|
+import io.swagger.annotations.ApiModelProperty;
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
+import java.math.BigDecimal;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -16,42 +22,95 @@ import java.io.Serializable;
|
|
|
* @since 2021-03-23
|
|
|
*/
|
|
|
@TableName("basic_attachment")
|
|
|
-public class BasicAttachment extends BaseEntity implements Serializable {
|
|
|
+public class BasicAttachment implements Serializable {
|
|
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
|
|
- /**
|
|
|
- * 文件名
|
|
|
- */
|
|
|
+ @ApiModelProperty(value = "主键")
|
|
|
+ @JsonSerialize(using = ToStringSerializer.class)
|
|
|
+ @TableId(value = "id")
|
|
|
+ private Long id;
|
|
|
+
|
|
|
+ @ApiModelProperty(value = "附件名称")
|
|
|
+ @TableField(value = "name")
|
|
|
private String name;
|
|
|
- /**
|
|
|
- * 文件类型
|
|
|
- */
|
|
|
+
|
|
|
+ @ApiModelProperty(value = "路径")
|
|
|
+ @TableField(value = "path")
|
|
|
+ private String path;
|
|
|
+
|
|
|
+ @ApiModelProperty(value = "类型")
|
|
|
+ @TableField(value = "type")
|
|
|
private String type;
|
|
|
- /**
|
|
|
- * 单位(KB)
|
|
|
- */
|
|
|
- private Integer size;
|
|
|
- /**
|
|
|
- * 文件md5值
|
|
|
- */
|
|
|
+
|
|
|
+ @ApiModelProperty(value = "大小")
|
|
|
+ @TableField(value = "size")
|
|
|
+ private BigDecimal size;
|
|
|
+
|
|
|
+ @ApiModelProperty(value = "MD5")
|
|
|
+ @TableField(value = "md5")
|
|
|
private String md5;
|
|
|
- /**
|
|
|
- * H-高,M-中,L-低
|
|
|
- */
|
|
|
- private String level;
|
|
|
- /**
|
|
|
- * LOCAL-本地存储,OSS-阿里OSS
|
|
|
- */
|
|
|
- private String storage;
|
|
|
- /**
|
|
|
- * 存储路径
|
|
|
- */
|
|
|
- private String path;
|
|
|
- /**
|
|
|
- * 备注
|
|
|
- */
|
|
|
- private String remark;
|
|
|
+
|
|
|
+ @ApiModelProperty(value = "创建时间")
|
|
|
+ @TableField(value = "create_time", fill = FieldFill.INSERT)//新增执行
|
|
|
+ private Long createTime;
|
|
|
+
|
|
|
+ @ApiModelProperty(value = "创建人id")
|
|
|
+ @JsonSerialize(using = ToStringSerializer.class)
|
|
|
+ @TableField("create_id")
|
|
|
+ private Long createId;
|
|
|
+
|
|
|
+ @ApiModelProperty(value = "关联业务id")
|
|
|
+ @JsonSerialize(using = ToStringSerializer.class)
|
|
|
+ @TableField("obj_id")
|
|
|
+ private Long objId;
|
|
|
+
|
|
|
+ public BasicAttachment() {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ public BasicAttachment(String path, String name, String type, BigDecimal size, String md5, Long createId) {
|
|
|
+ this.id = SystemConstant.getDbUuid();
|
|
|
+ this.path = path;
|
|
|
+ this.name = name;
|
|
|
+ this.type = type;
|
|
|
+ this.size = size;
|
|
|
+ this.md5 = md5;
|
|
|
+ this.createTime = System.currentTimeMillis();
|
|
|
+ this.createId = createId;
|
|
|
+ }
|
|
|
+
|
|
|
+ public BasicAttachment(String path, String name, String type, BigDecimal size, String md5, Long createId, Long objId) {
|
|
|
+ this.id = SystemConstant.getDbUuid();
|
|
|
+ this.path = path;
|
|
|
+ this.name = name;
|
|
|
+ this.type = type;
|
|
|
+ this.size = size;
|
|
|
+ this.md5 = md5;
|
|
|
+ this.createTime = System.currentTimeMillis();
|
|
|
+ this.createId = createId;
|
|
|
+ this.objId = objId;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Long getObjId() {
|
|
|
+ return objId;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setObjId(Long objId) {
|
|
|
+ this.objId = objId;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static long getSerialVersionUID() {
|
|
|
+ return serialVersionUID;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Long getId() {
|
|
|
+ return id;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setId(Long id) {
|
|
|
+ this.id = id;
|
|
|
+ }
|
|
|
|
|
|
public String getName() {
|
|
|
return name;
|
|
@@ -61,6 +120,14 @@ public class BasicAttachment extends BaseEntity implements Serializable {
|
|
|
this.name = name;
|
|
|
}
|
|
|
|
|
|
+ public String getPath() {
|
|
|
+ return path;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPath(String path) {
|
|
|
+ this.path = path;
|
|
|
+ }
|
|
|
+
|
|
|
public String getType() {
|
|
|
return type;
|
|
|
}
|
|
@@ -69,11 +136,11 @@ public class BasicAttachment extends BaseEntity implements Serializable {
|
|
|
this.type = type;
|
|
|
}
|
|
|
|
|
|
- public Integer getSize() {
|
|
|
+ public BigDecimal getSize() {
|
|
|
return size;
|
|
|
}
|
|
|
|
|
|
- public void setSize(Integer size) {
|
|
|
+ public void setSize(BigDecimal size) {
|
|
|
this.size = size;
|
|
|
}
|
|
|
|
|
@@ -85,36 +152,19 @@ public class BasicAttachment extends BaseEntity implements Serializable {
|
|
|
this.md5 = md5;
|
|
|
}
|
|
|
|
|
|
- public String getLevel() {
|
|
|
- return level;
|
|
|
- }
|
|
|
-
|
|
|
- public void setLevel(String level) {
|
|
|
- this.level = level;
|
|
|
- }
|
|
|
-
|
|
|
- public String getStorage() {
|
|
|
- return storage;
|
|
|
- }
|
|
|
-
|
|
|
- public void setStorage(String storage) {
|
|
|
- this.storage = storage;
|
|
|
+ public Long getCreateTime() {
|
|
|
+ return createTime;
|
|
|
}
|
|
|
|
|
|
- public String getPath() {
|
|
|
- return path;
|
|
|
+ public void setCreateTime(Long createTime) {
|
|
|
+ this.createTime = createTime;
|
|
|
}
|
|
|
|
|
|
- public void setPath(String path) {
|
|
|
- this.path = path;
|
|
|
+ public Long getCreateId() {
|
|
|
+ return createId;
|
|
|
}
|
|
|
|
|
|
- public String getRemark() {
|
|
|
- return remark;
|
|
|
+ public void setCreateId(Long createId) {
|
|
|
+ this.createId = createId;
|
|
|
}
|
|
|
-
|
|
|
- public void setRemark(String remark) {
|
|
|
- this.remark = remark;
|
|
|
- }
|
|
|
-
|
|
|
}
|