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

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import java.util.Date;
import java.util.List;

/**
 * 产品需求对象 pms_product_requirement
 * 
 * @author otto
 * @date 2023-10-10
 */
@Data
@ApiModel("产品需求批量更新对象")
public class PmsProductRequirementBatchUpdateVo
{
    /** 需求Id列表 */
    @ApiModelProperty(value = "需求Id列表")
    @NotEmpty
    private List<Long> idList;

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

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

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

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

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

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

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

    /**
     * 更新者
     */
    @ApiModelProperty(value = "更新者")
    private String updateBy;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    public Boolean thisIsChange() {
        return priorityIdIsChange
                || statusIdIsChange
                || pmsProductModuleIdIsChange
                || pmsProductPlanIdIsChange
                || tagIdsIsChange
                || requirementAssigneeGitlinkIdsIsChange
                || pmsProjectIdIsChange;
    }
}
