package com.augurit.xmjg.approveInterface.bean;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
@Data
public class DayDiffConfig implements Serializable {
private Integer type;
private ConfigType1 configType1;
private ConfigType2 configType2;
@Data
public static class ConfigType1 implements Serializable{
private Integer startDay;
private Integer diff;
private Integer rowNum;
@Override
public boolean equals(Object o) {
if (this == o){ return true;}
if (o == null || getClass() != o.getClass()){ return false;}
ConfigType1 that = (ConfigType1) o;
if(startDay==null){
if(that.startDay!=null){
return false;
}
}else{
if(!startDay.equals(that.startDay)){
return false;
}
}
if(diff==null){
if(that.diff!=null){
return false;
}
}else{
if(!diff.equals(that.diff)){
return false;
}
}
if(rowNum==null){
if(that.rowNum!=null){
return false;
}
}else{
if(!rowNum.equals(that.rowNum)){
return false;
}
}
return true;
}
}
@Data
public static class ConfigType2 implements Serializable{
private Integer startDay;
private List diffList = new ArrayList<>();
@Override
public boolean equals(Object o) {
if (this == o) {return true;}
if (o == null || getClass() != o.getClass()){ return false;}
ConfigType2 that = (ConfigType2) o;
if(startDay==null){
if(that.startDay!=null){
return false;
}
}else{
if(!startDay.equals(that.startDay)){
return false;
}
}
if(!diffList.equals(that.diffList)){
return false;
}
return true;
}
}
@Override
public boolean equals(Object o) {
if (this == o){ return true;}
if (o == null || getClass() != o.getClass()){ return false;}
DayDiffConfig that = (DayDiffConfig) o;
if(type==null){
if(that.getType()!=null){
return false;
}
}else{
if(!type.equals(that.type)){
return false;
}
}
if(configType1==null){
if(that.configType1!=null){
return false;
}
}else{
if(!configType1.equals(that.configType1)){
return false;
}
}
if(configType2==null){
if(that.configType2!=null){
return false;
}
}else {
if(!configType2.equals(that.configType2)){
return false;
}
}
return true;
}
}