All Downloads are FREE. Search and download functionalities are using the official Maven repository.

k.e.book.ddh.entity.CcItemDO 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_item")
@ApiModel(value="CcItemDO", description="CcItem")
public class CcItemDO extends Model  {
    private static final long serialVersionUID = 1L;


    @TableId(value = "id", type = IdType.AUTO)
    private Long id;


    /**
     * 项目序号
     */
    @TableField("sn")
    private String sn;
    /**
     * 编号
     */
    @TableField("number")
    private Integer number;
    /**
     * 创作者编号
     */
    @TableField("author_id")
    private Integer authorId;
    /**
     * 产品编号
     */
    @TableField("product_id")
    private Long productId;
    /**
     * NFT编号
     */
    @TableField("token_id")
    private Integer tokenId;
    /**
     * 副标题
     */
    @TableField("subject")
    private String subject;
    /**
     * 封面
     */
    @TableField("image")
    private String image;
    /**
     * 金额数量
     */
    @TableField("amount")
    private Long amount;
    /**
     * 币种
     */
    @TableField("priceunit")
    private String priceunit;
    /**
     * 创建时间
     */
    @TableField("createtime")
    private Integer createtime;
    /**
     * 更新时间
     */
    @TableField("updatetime")
    private Integer updatetime;
    /**
     * 删除时间
     */
    @TableField("deletetime")
    private Integer deletetime;
    /**
     * 状态:0=隐藏,1=开放购买,2=已售罄,3=销毁中,4=已销毁,5=锁定中
     */
    @TableField("status")
    private Integer status;
    /**
     * createdAt
     */
    @TableField("created_at")
    private Date createdAt;
    /**
     * updatedAt
     */
    @TableField("updated_at")
    private Date updatedAt;
    /**
     * deletedAt
     */
    @TableField("deleted_at")
    private Date deletedAt;

    public static CcItemVO toVO(CcItemDO ccItemDO) {
        if(ccItemDO == null){
            return null;
        }
        CcItemVO ccItemVO = new CcItemVO();
        BeanUtils.copyProperties(ccItemDO, ccItemVO);
        return ccItemVO;
    }

    public static CcItemDO toDO(CcItemAddDTO ccItemAddDTO) {
        if (ccItemAddDTO == null) {
            return null;
        }
        CcItemDO ccItemDO = new CcItemDO();
        BeanUtils.copyProperties(ccItemAddDTO, ccItemDO);
        return ccItemDO;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy