package com.microservices.pms.project.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 PmsProjectTestcaseModuleInputVo {
    /**
     * 测试用例模块名
     */
    @ApiModelProperty(value = "测试用例模块名")
    @NotBlank
    @Size(max = 30, message = "长度需要小于30")
    private String moduleName;

    /**
     * 关联项目ID
     */
    @ApiModelProperty(value = "关联项目ID")
    @NotNull
    private Long pmsProjectId;

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

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