k.e.book.ddh.entity.CcCreatorDO 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_creator")
@ApiModel(value="CcCreatorDO", description="CcCreator")
public class CcCreatorDO extends Model {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 会员编号
*/
@TableField("user_id")
private Integer userId;
/**
* 头像
*/
@TableField("avatar")
private String avatar;
/**
* 创作者姓名
*/
@TableField("name")
private String name;
/**
* 创作者介绍
*/
@TableField("intro")
private String intro;
/**
* 标签
*/
@TableField("flag")
private String flag;
/**
* 智能合约地址
*/
@TableField("contract")
private String contract;
/**
* contractAbi
*/
@TableField("contract_abi")
private String contractAbi;
/**
* 创建时间
*/
@TableField("createtime")
private Integer createtime;
/**
* 更新时间
*/
@TableField("updatetime")
private Integer updatetime;
/**
* 删除时间
*/
@TableField("deletetime")
private Integer deletetime;
/**
* 产品限购数量
*/
@TableField("purchaselimit")
private Integer purchaselimit;
/**
* 状态:0=隐藏,1=正常,2=推荐
*/
@TableField("status")
private String status;
/**
* 审核状态:0=待审核,1=审核中,2=已审核
*/
@TableField("checkstatus")
private Integer checkstatus;
/**
* 分类编号
*/
@TableField("category_ids")
private String categoryIds;
/**
* 类型:1=原始类型,2=铸造类型
*/
@TableField("type")
private Integer type;
/**
* createdAt
*/
@TableField("created_at")
private Date createdAt;
/**
* updatedAt
*/
@TableField("updated_at")
private Date updatedAt;
/**
* deletedAt
*/
@TableField("deleted_at")
private Date deletedAt;
public static CcCreatorVO toVO(CcCreatorDO ccCreatorDO) {
if(ccCreatorDO == null){
return null;
}
CcCreatorVO ccCreatorVO = new CcCreatorVO();
BeanUtils.copyProperties(ccCreatorDO, ccCreatorVO);
return ccCreatorVO;
}
public static CcCreatorDO toDO(CcCreatorAddDTO ccCreatorAddDTO) {
if (ccCreatorAddDTO == null) {
return null;
}
CcCreatorDO ccCreatorDO = new CcCreatorDO();
BeanUtils.copyProperties(ccCreatorAddDTO, ccCreatorDO);
return ccCreatorDO;
}
}