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

import com.microservices.common.core.utils.bean.BeanUtils;
import com.microservices.pms.product.domain.PmsProductModule;
import com.microservices.pms.product.domain.PmsProductRequirement;
import com.microservices.pms.product.domain.PmsProductRequirementTag;
import com.microservices.pms.project.domain.PmsProject;
import com.microservices.pms.project.domain.PmsProjectTestcaseType;
import com.microservices.system.api.domain.SimpleSysUser;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * 测试用例管理对象 pms_project_testcase
 *
 * @author otto
 * @date 2023-11-22
 */
@Data
@ApiModel("测试用例数据对象")
public class PmsProjectTestcaseDataVo extends BaseEntityVo {

    /**
     * 用例ID
     */
    @ApiModelProperty(value = "用例ID")
    private Long id;

    /**
     * 用例标题
     */
    @ApiModelProperty(value = "用例标题")
    private String title;

    /**
     * 用例维护人
     */
    @ApiModelProperty(value = "用例维护人")
    private SimpleSysUser assigneeUser;

    /**
     * 关联项目
     */
    @ApiModelProperty(value = "关联项目")
    private PmsProject pmsProject;

    /**
     * 用例类型
     */
    @ApiModelProperty(value = "用例类型")
    private PmsProjectTestcaseType type;

    /**
     * 标记列表
     */
    @ApiModelProperty(value = "标记列表")
    private List<PmsProductRequirementTag> tagList;

    /**
     * 关联模块
     */
    @ApiModelProperty(value = "关联模块")
    private PmsProductModule pmsModule;

    /**
     * 关联模块
     */
    @ApiModelProperty(value = "关联产品需求规格")
    private PmsProductRequirement productReqSpecs;

    /**
     * 用例索引
     */
    @ApiModelProperty(value = "用例索引")
    private Long index;


    public PmsProjectTestcaseDetailVo toPmsProjectTestcaseDetailVo() {
        PmsProjectTestcaseDetailVo target = new PmsProjectTestcaseDetailVo();
        BeanUtils.copyProperties(this, target);
        return target;
    }
}
