k.e.book.ddh.entity.CcAlbumDO 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_album")
@ApiModel(value="CcAlbumDO", description="CcAlbum")
public class CcAlbumDO extends Model {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 创作者编号
*/
@TableField("author_id")
private Integer authorId;
/**
* 分类编号
*/
@TableField("category_ids")
private String categoryIds;
/**
* 专辑名称
*/
@TableField("name")
private String name;
/**
* 背景图片
*/
@TableField("image")
private String image;
/**
* 发行时间
*/
@TableField("publishtime")
private Integer publishtime;
/**
* 状态:0=隐藏,1=正常
*/
@TableField("status")
private Integer status;
/**
* 创建时间
*/
@TableField("createtime")
private Integer createtime;
/**
* 更新时间
*/
@TableField("updatetime")
private Integer updatetime;
public static CcAlbumVO toVO(CcAlbumDO ccAlbumDO) {
if(ccAlbumDO == null){
return null;
}
CcAlbumVO ccAlbumVO = new CcAlbumVO();
BeanUtils.copyProperties(ccAlbumDO, ccAlbumVO);
return ccAlbumVO;
}
public static CcAlbumDO toDO(CcAlbumAddDTO ccAlbumAddDTO) {
if (ccAlbumAddDTO == null) {
return null;
}
CcAlbumDO ccAlbumDO = new CcAlbumDO();
BeanUtils.copyProperties(ccAlbumAddDTO, ccAlbumDO);
return ccAlbumDO;
}
}