k.e.book.ddh.entity.CcDrawConfigDO 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_draw_config")
@ApiModel(value="CcDrawConfigDO", description="CcDrawConfig")
public class CcDrawConfigDO extends Model {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 名称
*/
@TableField("name")
private String name;
/**
* 类型:1=藏品,2=盲盒
*/
@TableField("type")
private Integer type;
/**
* 藏品ID
*/
@TableField("relation_product_id")
private Integer relationProductId;
/**
* 盲盒ID
*/
@TableField("relation_box_id")
private Integer relationBoxId;
/**
* 资格藏品ID
*/
@TableField("relation_zg_id")
private String relationZgId;
/**
* 状态:0=禁用,1=启用
*/
@TableField("status")
private Integer status;
/**
* 状态:0=未处理,1=已开签,2=已推送
*/
@TableField("open_status")
private Integer openStatus;
/**
* 最大抽签次数
*/
@TableField("max_draw_num")
private Integer maxDrawNum;
/**
* 中签人数
*/
@TableField("winner_num")
private Integer winnerNum;
/**
* 开始时间
*/
@TableField("start_time")
private Integer startTime;
/**
* 结束时间
*/
@TableField("end_time")
private Integer endTime;
/**
* 中签公布时间
*/
@TableField("open_time")
private Integer openTime;
/**
* 创建时间
*/
@TableField("createtime")
private Integer createtime;
/**
* 更新时间
*/
@TableField("updatetime")
private Integer updatetime;
/**
* 删除时间
*/
@TableField("deletetime")
private Integer deletetime;
/**
* createdAt
*/
@TableField("created_at")
private Date createdAt;
/**
* updatedAt
*/
@TableField("updated_at")
private Date updatedAt;
/**
* deletedAt
*/
@TableField("deleted_at")
private Date deletedAt;
public static CcDrawConfigVO toVO(CcDrawConfigDO ccDrawConfigDO) {
if(ccDrawConfigDO == null){
return null;
}
CcDrawConfigVO ccDrawConfigVO = new CcDrawConfigVO();
BeanUtils.copyProperties(ccDrawConfigDO, ccDrawConfigVO);
return ccDrawConfigVO;
}
public static CcDrawConfigDO toDO(CcDrawConfigAddDTO ccDrawConfigAddDTO) {
if (ccDrawConfigAddDTO == null) {
return null;
}
CcDrawConfigDO ccDrawConfigDO = new CcDrawConfigDO();
BeanUtils.copyProperties(ccDrawConfigAddDTO, ccDrawConfigDO);
return ccDrawConfigDO;
}
}