k.e.book.ddh.entity.CcCommandDO 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_command")
@ApiModel(value="CcCommandDO", description="CcCommand")
public class CcCommandDO extends Model {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 类型
*/
@TableField("type")
private String type;
/**
* 参数
*/
@TableField("params")
private String params;
/**
* 命令
*/
@TableField("command")
private String command;
/**
* 返回结果
*/
@TableField("content")
private String content;
/**
* 执行时间
*/
@TableField("executetime")
private Long executetime;
/**
* 创建时间
*/
@TableField("createtime")
private Long createtime;
/**
* 更新时间
*/
@TableField("updatetime")
private Long updatetime;
/**
* 状态
*/
@TableField("status")
private String status;
public static CcCommandVO toVO(CcCommandDO ccCommandDO) {
if(ccCommandDO == null){
return null;
}
CcCommandVO ccCommandVO = new CcCommandVO();
BeanUtils.copyProperties(ccCommandDO, ccCommandVO);
return ccCommandVO;
}
public static CcCommandDO toDO(CcCommandAddDTO ccCommandAddDTO) {
if (ccCommandAddDTO == null) {
return null;
}
CcCommandDO ccCommandDO = new CcCommandDO();
BeanUtils.copyProperties(ccCommandAddDTO, ccCommandDO);
return ccCommandDO;
}
}