[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:
Sheldan
2020-10-19 23:55:51 +02:00
parent 1b98436736
commit dca98c2953
75 changed files with 952 additions and 592 deletions

View File

@@ -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

View File

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