package com.microservices.pms.product.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
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.product.domain.vo.PmsProductRequirementDataVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * 产品需求对象 pms_product_requirement
 * 
 * @author otto
 * @date 2023-10-10
 */
@Data
@ApiModel("产品需求对象")
public class PmsProductRequirement extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 需求ID */
    private Long id;

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

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

    /** 关联状态ID */
    @ApiModelProperty(value = "关联状态ID")
    private Long statusId;

    /** 关联优先级ID */
    @ApiModelProperty(value = "关联优先级ID")
    private Long priorityId;

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

    /** 关联产品计划ID */
    @ApiModelProperty(value = "关联产品计划ID")
    private Long pmsProductPlanId;

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

    /** 正文 */
    @ApiModelProperty(value = "正文")
    private String content;

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

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

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

    /** 开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "开始时间")
    private Date startTime;

    /** 结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "结束时间")
    private Date endTime;

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

    /** 排序 */
    @ApiModelProperty(value = "排序")
    private Integer sort;

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

    /**
     * 需求负责人Gitlink ID列表（逗号分隔）
     */
    @ApiModelProperty(value = "需求负责人Gitlink ID列表（逗号分隔）")
    private String requirementAssigneeGitlinkIds;

    /**
     * 需求负责人Gitlink ID
     */
    @ApiModelProperty(value = "需求负责人Gitlink ID")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private String requirementAssigneeGitlinkId;

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

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


    @ApiModelProperty(value = "产品标识集合查询")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<String> productIdentifierList;

    public PmsProductRequirementDataVo toPmsProductRequirementDataVo(){
        PmsProductRequirementDataVo target = new PmsProductRequirementDataVo();
        BeanUtils.copyProperties(this, target);
        return target;
    }
}
