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

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

import javax.validation.constraints.NotNull;

/**
 * 测试用例管理对象 pms_project_testcase
 *
 * @author otto
 * @date 2023-11-22
 */
@Data
@ApiModel("测试用例输入对象")
public class PmsProjectTestcaseSearchVo {

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

    /**
     * 用例维护人Gitlink ID
     */
    @ApiModelProperty(value = "用例维护人Gitlink ID")
    private Long assigneeGitlinkId;

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

    /**
     * 用例类型ID
     */
    @ApiModelProperty(value = "用例类型ID")
    private Long typeId;

    /**
     * 关联模块ID
     */
    @ApiModelProperty(value = "关联模块ID")
    private Long pmsModuleId;

    /**
     * 标记Id
     */
    @ApiModelProperty(value = "标记Id")
    private String tagId;

    public PmsProjectTestcase toPmsProjectTestcase() {
        PmsProjectTestcase target = new PmsProjectTestcase();
        BeanUtils.copyProperties(this, target);
        return target;
    }
}
