package com.microservices.pms.product.domain.vo;

import com.microservices.common.core.utils.bean.BeanUtils;
import com.microservices.pms.product.domain.PmsProductPriority;
import com.microservices.pms.product.domain.PmsProductStatus;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * 产品对象 pms_product
 * 
 * @author otto
 * @date 2023-10-10
 */
@Data
@ApiModel("产品类型对象")
public class PmsTypeSearchVo
{
    /** 类型 */
    @ApiModelProperty(value = "类型（1=产品计划，2=产品需求）")
    @NotNull
    private Integer type;

    public PmsProductStatus toPmsProductStatus(){
        PmsProductStatus target = new PmsProductStatus();
        BeanUtils.copyProperties(this, target);
        return target;
    }

    public PmsProductPriority toPmsProductPriority(){
        PmsProductPriority target = new PmsProductPriority();
        BeanUtils.copyProperties(this, target);
        return target;
    }
}
