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

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

import javax.validation.constraints.NotNull;

/**
 * 产品需求对象 pms_product_requirement
 * 
 * @author otto
 * @date 2023-10-10
 */
@Data
@ApiModel("产品需求搜索对象")
public class PmsProductRequirementSearchVo
{
    /** 标题 */
    @ApiModelProperty(value = "标题")
    private String title;

    /** 关联产品模块ID */
    @ApiModelProperty(value = "关联产品模块ID（传0查询不属于任何模块的需求）")
    private Long pmsProductModuleId;

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

    /** 关联产品模块标识 */
    @ApiModelProperty(value = "关联产品标识", required = true)
    @NotNull
    private String pmsProductIdentifier;

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

    @ApiModelProperty(value = "产品需求状态")
    private String status;

    /** 创建者 */
    @ApiModelProperty(value = "发布者用户名")
    private String createBy;

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

    public PmsProductRequirement toPmsProductRequirement(){
        PmsProductRequirement target = new PmsProductRequirement();
        BeanUtils.copyProperties(this, target);
        return target;
    }
}
