Add NoteDao, used by NoteActionHandler to delete note when read

This commit is contained in:
P0nk
2022-12-26 15:55:28 +01:00
parent 188eb74a70
commit 605f2e212e
6 changed files with 147 additions and 26 deletions

View File

@@ -11,11 +11,11 @@ public record Note(int id, String message, String from, String to, long timestam
Objects.requireNonNull(to);
}
public Note createNormal(String message, String from, String to, long timestamp) {
public static Note createNormal(String message, String from, String to, long timestamp) {
return new Note(PLACEHOLDER_ID, message, from, to, timestamp, 0);
}
public Note createGift(String message, String from, String to, long timestamp) {
public static Note createGift(String message, String from, String to, long timestamp) {
return new Note(PLACEHOLDER_ID, message, from, to, timestamp, 1);
}
}