k.e.book.ddh.entity.CcAdszoneZoneDO 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;
/**
* @author kk
* @date 2023-05-21 11:01
*/
@EqualsAndHashCode(callSuper = false)
@Data
@TableName("cc_adszone_zone")
@ApiModel(value="CcAdszoneZoneDO", description="CcAdszoneZone")
public class CcAdszoneZoneDO extends Model {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 广告位名称
*/
@TableField("name")
private String name;
/**
* 广告位标记
*/
@TableField("mark")
private String mark;
/**
* 广告位类型:1=图片广告,2=多图&幻灯广告,3=代码广告
*/
@TableField("type")
private String type;
/**
* 广告宽度
*/
@TableField("width")
private Integer width;
/**
* 广告高度
*/
@TableField("height")
private Integer height;
/**
* 创建时间
*/
@TableField("createtime")
private Integer createtime;
/**
* 更新时间
*/
@TableField("updatetime")
private Integer updatetime;
/**
* 广告代码
*/
@TableField("templates/code")
private String code;
public static CcAdszoneZoneVO toVO(CcAdszoneZoneDO ccAdszoneZoneDO) {
if(ccAdszoneZoneDO == null){
return null;
}
CcAdszoneZoneVO ccAdszoneZoneVO = new CcAdszoneZoneVO();
BeanUtils.copyProperties(ccAdszoneZoneDO, ccAdszoneZoneVO);
return ccAdszoneZoneVO;
}
public static CcAdszoneZoneDO toDO(CcAdszoneZoneAddDTO ccAdszoneZoneAddDTO) {
if (ccAdszoneZoneAddDTO == null) {
return null;
}
CcAdszoneZoneDO ccAdszoneZoneDO = new CcAdszoneZoneDO();
BeanUtils.copyProperties(ccAdszoneZoneAddDTO, ccAdszoneZoneDO);
return ccAdszoneZoneDO;
}
}