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

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


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


    /**
     * 作者编号
     */
    @TableField("author_id")
    private Integer authorId;
    /**
     * 产品编号
     */
    @TableField("product_id")
    private Integer productId;
    /**
     * 数量
     */
    @TableField("quantity")
    private Integer quantity;
    /**
     * 已售数量
     */
    @TableField("soldQty")
    private Integer soldQty;
    /**
     * 盲盒编号
     */
    @TableField("box_id")
    private Integer boxId;
    /**
     * 金额数量
     */
    @TableField("amount")
    private Long amount;
    /**
     * 币种
     */
    @TableField("priceunit")
    private String priceunit;
    /**
     * 标签
     */
    @TableField("tag")
    private String tag;
    /**
     * 权重
     */
    @TableField("weigh")
    private Integer weigh;
    /**
     * 概率
     */
    @TableField("probability")
    private Integer probability;
    /**
     * 创建时间
     */
    @TableField("createtime")
    private Integer createtime;

    public static CcBoxProductVO toVO(CcBoxProductDO ccBoxProductDO) {
        if(ccBoxProductDO == null){
            return null;
        }
        CcBoxProductVO ccBoxProductVO = new CcBoxProductVO();
        BeanUtils.copyProperties(ccBoxProductDO, ccBoxProductVO);
        return ccBoxProductVO;
    }

    public static CcBoxProductDO toDO(CcBoxProductAddDTO ccBoxProductAddDTO) {
        if (ccBoxProductAddDTO == null) {
            return null;
        }
        CcBoxProductDO ccBoxProductDO = new CcBoxProductDO();
        BeanUtils.copyProperties(ccBoxProductAddDTO, ccBoxProductDO);
        return ccBoxProductDO;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy