package com.ecep.contract.model;

import java.util.Objects;

public interface IdentityEntity {
    Integer getId();

    void setId(Integer id);

    default boolean equals(IdentityEntity that) {
        if (this == that) return true;
        if (that == null) return false;
        return getId() != null && Objects.equals(getId(), that.getId());
    }
}
