k.e.book.ddh.entity.CcSnapshotConfigDO 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_snapshot_config")
@ApiModel(value="CcSnapshotConfigDO", description="CcSnapshotConfig")
public class CcSnapshotConfigDO extends Model {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 标题
*/
@TableField("title")
private String title;
/**
* 类型:1=藏品,2=盲盒
*/
@TableField("type")
private Integer type;
/**
* 藏品编号
*/
@TableField("product_ids")
private String productIds;
/**
* 盲盒编号
*/
@TableField("box_ids")
private String boxIds;
/**
* 快照时间
*/
@TableField("starttime")
private Integer starttime;
/**
* 创建时间
*/
@TableField("createtime")
private Integer createtime;
/**
* 状态:0=未处理,1=已处理
*/
@TableField("status")
private Boolean status;
public static CcSnapshotConfigVO toVO(CcSnapshotConfigDO ccSnapshotConfigDO) {
if(ccSnapshotConfigDO == null){
return null;
}
CcSnapshotConfigVO ccSnapshotConfigVO = new CcSnapshotConfigVO();
BeanUtils.copyProperties(ccSnapshotConfigDO, ccSnapshotConfigVO);
return ccSnapshotConfigVO;
}
public static CcSnapshotConfigDO toDO(CcSnapshotConfigAddDTO ccSnapshotConfigAddDTO) {
if (ccSnapshotConfigAddDTO == null) {
return null;
}
CcSnapshotConfigDO ccSnapshotConfigDO = new CcSnapshotConfigDO();
BeanUtils.copyProperties(ccSnapshotConfigAddDTO, ccSnapshotConfigDO);
return ccSnapshotConfigDO;
}
}