mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-03-24 05:39:44 +00:00
[AB-96] adding ability to edit/delete modmail messages via editing/deleting the original message causing the message,
adding featuremode to modmail to define whether or not there is a separate message posted to the mod mail thread, to see it easier, renaming modmail related tables to singular, adding some necessary methods (caching) to all entities
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
package dev.sheldan.abstracto.templating.model.database;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.*;
|
||||
import org.hibernate.annotations.CacheConcurrencyStrategy;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
@@ -13,6 +11,9 @@ import javax.persistence.*;
|
||||
@AllArgsConstructor
|
||||
@Table(name = "auto_load_macro")
|
||||
@Getter
|
||||
@EqualsAndHashCode
|
||||
@Cacheable
|
||||
@org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
|
||||
public class AutoLoadMacro {
|
||||
|
||||
@Id
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
package dev.sheldan.abstracto.templating.model.database;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.*;
|
||||
import org.hibernate.annotations.CacheConcurrencyStrategy;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import java.time.Instant;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* Represents the template stored in the database.
|
||||
@@ -18,9 +15,10 @@ import java.util.Objects;
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Table(name = "template")
|
||||
@EqualsAndHashCode
|
||||
@Cacheable
|
||||
@org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
|
||||
public class Template {
|
||||
public class Template implements Serializable {
|
||||
|
||||
/**
|
||||
* The globally unique key of the template
|
||||
@@ -64,19 +62,4 @@ public class Template {
|
||||
this.updated = Instant.now();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
Template template = (Template) o;
|
||||
return Objects.equals(key, template.key) &&
|
||||
Objects.equals(content, template.content) &&
|
||||
Objects.equals(section, template.section) &&
|
||||
Objects.equals(lastModified, template.lastModified);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(key, content, section, lastModified);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user