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

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


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


    /**
     * 系列ID
     */
    @TableField("merge_id")
    private Integer mergeId;
    /**
     * 规则ID
     */
    @TableField("rule_id")
    private Integer ruleId;
    /**
     * 产品ID
     */
    @TableField("product_id")
    private String productId;
    /**
     * 所需材料数量
     */
    @TableField("quantity")
    private Integer quantity;
    /**
     * 销毁等级(越大越先)
     */
    @TableField("losegrade")
    private Integer losegrade;
    /**
     * 逻辑关系:1=或者,2=并且
     */
    @TableField("logic")
    private Integer logic;
    /**
     * 创建时间
     */
    @TableField("createtime")
    private Integer createtime;

    public static CcMergeMaterialVO toVO(CcMergeMaterialDO ccMergeMaterialDO) {
        if(ccMergeMaterialDO == null){
            return null;
        }
        CcMergeMaterialVO ccMergeMaterialVO = new CcMergeMaterialVO();
        BeanUtils.copyProperties(ccMergeMaterialDO, ccMergeMaterialVO);
        return ccMergeMaterialVO;
    }

    public static CcMergeMaterialDO toDO(CcMergeMaterialAddDTO ccMergeMaterialAddDTO) {
        if (ccMergeMaterialAddDTO == null) {
            return null;
        }
        CcMergeMaterialDO ccMergeMaterialDO = new CcMergeMaterialDO();
        BeanUtils.copyProperties(ccMergeMaterialAddDTO, ccMergeMaterialDO);
        return ccMergeMaterialDO;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy