Files
mtusi2026lab7/src/main/java/ru/mtusi/messenger/entity/AttachmentVariantId.java
T
2026-11-24 19:50:03 +03:00

30 lines
827 B
Java

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);
}
}