package com.microservices.pms.project.domain;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.microservices.common.core.utils.bean.BeanUtils;
import com.microservices.common.core.web.domain.BaseEntity;
import com.microservices.pms.project.domain.vo.PmsProjectTestcaseDataVo;
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 PmsProjectTestcase extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 用例ID
     */
    private Long id;

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

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

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

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

    /**
     * 标记Id列表
     */
    @ApiModelProperty(value = "标记Id列表")
    private String tagIds;

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

    /**
     * 标记名称，使用逗号分割的字符
     */
    @ApiModelProperty(value = "标记名称，使用逗号分割的字符")
    private String tags;

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

    /**
     * 关联项目ID
     */
    @ApiModelProperty(value = "关联项目ID")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Long> childrenModuleIdList;

    /**
     * ID集合查询
     */
    @ApiModelProperty(value = "ID集合查询")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Long> idsList;

    /**
     * 附件标识列表
     */
    @ApiModelProperty(value = "附件标识列表")
    private String fileIdentifiers;

    /**
     * 前置条件
     */
    @ApiModelProperty(value = "前置条件")
    private String preconditions;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    private String delFlag;

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

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;

    /**
     * 测试步骤列表
     */
    @ApiModelProperty(value = "测试步骤列表")
    private List<PmsProjectTestcaseStep> testcaseStepList;

    /**
     * 预留字段1
     */
    @JsonIgnore
    private String reservedField1;

    /**
     * 预留字段2
     */
    @JsonIgnore
    private String reservedField2;

    /**
     * 预留字段3
     */
    @JsonIgnore
    private String reservedField3;

    /**
     * 预留字段4
     */
    @JsonIgnore
    private String reservedField4;

    /**
     * 预留字段5
     */
    @JsonIgnore
    private String reservedField5;

    public PmsProjectTestcaseDataVo toPmsProjectTestcaseDataVo() {
        PmsProjectTestcaseDataVo target = new PmsProjectTestcaseDataVo();
        BeanUtils.copyProperties(this, target);
        return target;
    }
}
