2023-08-22 14:05:26 +00:00
|
|
|
module data.note;
|
|
|
|
|
|
|
|
public import data.model : Note;
|
|
|
|
|
|
|
|
interface NoteDataSource {
|
|
|
|
Note createNote(string username, ulong noteListId, string content);
|
|
|
|
Note updateNote(string username, ulong id, Note newData);
|
|
|
|
void deleteNote(string username, ulong id);
|
2023-08-24 19:37:25 +00:00
|
|
|
ulong countNotes(string username);
|
|
|
|
ulong countNotes(string username, ulong noteListId);
|
2023-08-22 14:05:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static NoteDataSource noteDataSource;
|
|
|
|
static this() {
|
|
|
|
import data.impl.note;
|
|
|
|
noteDataSource = new SqliteNoteDataSource();
|
|
|
|
}
|