#70 add hashCode for deadline

This commit is contained in:
Nightblade73 2019-05-02 14:51:22 +04:00
parent 6820c617f3
commit 6350e1c0d6

View File

@ -9,6 +9,7 @@ import javax.persistence.Entity;
import javax.persistence.Temporal; import javax.persistence.Temporal;
import javax.persistence.TemporalType; import javax.persistence.TemporalType;
import java.util.Date; import java.util.Date;
import java.util.Objects;
@Entity @Entity
public class Deadline extends BaseEntity { public class Deadline extends BaseEntity {
@ -68,4 +69,9 @@ public class Deadline extends BaseEntity {
description.equals(deadline.description) && description.equals(deadline.description) &&
date.equals(deadline.date); date.equals(deadline.date);
} }
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), description, date);
}
} }