package org.springblade.modules.project.pojo.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Objects;

/**
 * @Param
 * @Author wangwl
 * @Date 2024/4/12 10:11
 **/
@Data
@Schema(description = "当作key,所有的撤销记录，按照项目id，异常类型，年份，季度 分组")
public class RepealRecordVO {
    @Schema(description = "项目id")
    private Long projectId;

    @Schema(description = "计划年份")
    private Integer planYear;

    @Schema(description = "计划季度")
    private Integer planQuarter;

    @Schema(description = "类型1投资2计划")
    private Integer planType;

    public RepealRecordVO() {
    }

    public RepealRecordVO(Long projectId, Integer planYear, Integer planQuarter, Integer planType) {
        this.projectId = projectId;
        this.planYear = planYear;
        this.planQuarter = planQuarter;
        this.planType = planType;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        RepealRecordVO that = (RepealRecordVO) o;
        return Objects.equals(projectId, that.projectId) && Objects.equals(planYear, that.planYear) && Objects.equals(planQuarter, that.planQuarter) && Objects.equals(planType, that.planType);
    }

    @Override
    public int hashCode() {
        return Objects.hash(projectId, planYear, planQuarter, planType);
    }
}
