k.e.book.ddh.entity.CcVersionDO Maven / Gradle / Ivy
package k.e.book.ddh.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.beans.BeanUtils;
import java.io.Serializable;
import java.util.Date;
/**
* @author kk
* @date 2023-05-21 11:01
*/
@EqualsAndHashCode(callSuper = false)
@Data
@TableName("cc_version")
@ApiModel(value="CcVersionDO", description="CcVersion")
public class CcVersionDO extends Model {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 旧版本号
*/
@TableField("oldversion")
private String oldversion;
/**
* 新版本号
*/
@TableField("newversion")
private String newversion;
/**
* 包大小
*/
@TableField("packagesize")
private String packagesize;
/**
* 升级内容
*/
@TableField("content")
private String content;
/**
* 下载地址
*/
@TableField("downloadurl")
private String downloadurl;
/**
* downloadurlios
*/
@TableField("downloadurlios")
private String downloadurlios;
/**
* 强制更新
*/
@TableField("enforce")
private Integer enforce;
/**
* 更新类型:1=全量,2=增量,3=补丁
*/
@TableField("version_type")
private Integer versionType;
/**
* 补丁更新:0=否,1=是
*/
@TableField("patch_update")
private Integer patchUpdate;
/**
* 创建时间
*/
@TableField("createtime")
private Integer createtime;
/**
* 更新时间
*/
@TableField("updatetime")
private Integer updatetime;
/**
* 权重
*/
@TableField("weigh")
private Integer weigh;
/**
* 状态:normal=正常,hidden=隐藏
*/
@TableField("status")
private String status;
public static CcVersionVO toVO(CcVersionDO ccVersionDO) {
if(ccVersionDO == null){
return null;
}
CcVersionVO ccVersionVO = new CcVersionVO();
BeanUtils.copyProperties(ccVersionDO, ccVersionVO);
return ccVersionVO;
}
public static CcVersionDO toDO(CcVersionAddDTO ccVersionAddDTO) {
if (ccVersionAddDTO == null) {
return null;
}
CcVersionDO ccVersionDO = new CcVersionDO();
BeanUtils.copyProperties(ccVersionAddDTO, ccVersionDO);
return ccVersionDO;
}
}