forked from mtusi2026/mtusi2026lab7
30 lines
827 B
Java
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);
|
|
}
|
|
} |