package ru.mtusi.messenger.entity; import java.io.Serializable; import java.util.Objects; import java.util.UUID; public class AttachmentVariantId implements Serializable { private UUID attachmentId; private String name; public AttachmentVariantId() {} public AttachmentVariantId(UUID attachmentId, String name) { this.attachmentId = attachmentId; this.name = name; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; AttachmentVariantId that = (AttachmentVariantId) o; return Objects.equals(attachmentId, that.attachmentId) && Objects.equals(name, that.name); } @Override public int hashCode() { return Objects.hash(attachmentId, name); } }