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

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

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * 产品模块输入对象
 *
 * @author otto
 * @date 2023-10-10
 */
@Data
@ApiModel("产品模块输入对象")
public class PmsProductModuleInputVo
{
    /** 产品模块名 */
    @ApiModelProperty(value = "产品模块名")
    @NotBlank
    @Size(max = 30, message = "长度需要小于30")
    private String moduleName;

    /** 关联产品标识 */
    @ApiModelProperty(value = "关联产品标识", required = true)
    @NotNull
    private String pmsProductIdentifier;

    /** 父模块ID */
    @ApiModelProperty(value = "父模块ID")
    private Long parentId;

    public PmsProductModule toPmsProductModule(){
        PmsProductModule target = new PmsProductModule();
        BeanUtils.copyProperties(this, target);
        return target;
    }
}
