mirror of
https://github.com/plexusorg/Plex.git
synced 2025-07-05 09:06:41 +00:00
Move Plex to API-driven plugin and fix NoClassDefFoundError on startup
This commit is contained in:
26
server/src/main/java/dev/plex/punishment/extra/Note.java
Normal file
26
server/src/main/java/dev/plex/punishment/extra/Note.java
Normal file
@ -0,0 +1,26 @@
|
||||
package dev.plex.punishment.extra;
|
||||
|
||||
import com.google.gson.GsonBuilder;
|
||||
import dev.morphia.annotations.Entity;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.util.UUID;
|
||||
|
||||
import dev.plex.util.adapter.ZonedDateTimeSerializer;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@Entity
|
||||
public class Note
|
||||
{
|
||||
private final UUID uuid;
|
||||
private final String note;
|
||||
private final UUID writtenBy;
|
||||
private final ZonedDateTime timestamp;
|
||||
|
||||
private int id; // This will be automatically set from addNote
|
||||
|
||||
public String toJSON()
|
||||
{
|
||||
return new GsonBuilder().registerTypeAdapter(ZonedDateTime.class, new ZonedDateTimeSerializer()).create().toJson(this);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user