forked from mtusi2026/mtusi2026lab7
ЛР7
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user