Open yantene opened 1 year ago
classDiagram
class NotesController {
+index()
+show()
}
NotesController ..> NotesUseCase
class NotesUseCase {
+findNotesByCreatedAt()
+findNotesByModifiedAt()
+findNote()
}
NotesUseCase ..> NotesRepositoryInterface
NotesUseCase ..> NotesService
NotesUseCase ..> Note
class NotesService {
}
NotesService ..> Note
NotesService ..> NotesRepositoryInterface
class NotesRepositoryInterface {
+findByCreatedAt()*
+findByModifiedAt()*
+findOne()*
+findMany()*
+create()*
+update()*
+destroy()*
+findLinkedNotes()*
+findBacklinkedNotes()*
}
<<interface>> NotesRepositoryInterface
Note <.. NotesRepositoryInterface
class Note {
+id
+title
+path
+createdAt
+modifiedAt
+body
+attachments
+linkingNoteIds
+toJSON()
+toString()
+equals()
}
class NoteId {
+value
+toJSON()
+toString()
+equals()
}
Note *-- NoteId
class NoteTitle {
+value
+toJSON()
+toString()
+equals()
}
Note *-- NoteTitle
class NotePath {
+value
+toJSON()
+toString()
+equals()
}
Note *-- NotePath
class NoteBody {
+value
+toJSON()
+toString()
+equals()
}
Note *-- NoteBody
class NoteFile {
+id
+remoteFile
+localFile
+toJSON()
+toString()
+equals()
}
Note o-- NoteFile
class NoteFileId {
+value
+toJSON()
+toString()
+equals()
}
NoteFile *-- NoteFileId
class RemoteFile {
+uri
+sha1
+uploadedAt
+toJSON()
+toString()
+equals()
}
NoteFile *-- RemoteFile
class RemoteFileUri {
+value
+toJSON()
+toString()
+equals()
}
RemoteFile *-- RemoteFileUri
class LocalFile {
+path
+sha1
+toJSON()
+toString()
+equals()
}
NoteFile *-- LocalFile
class Sha1 {
+value
+toJSON()
+toString()
+equals()
}
RemoteFile *-- Sha1
LocalFile *-- Sha1
class NotesRepository {
#prisma
#noteFilesRepository
+findByCreatedAt()
+findByModifiedAt()
+findOne()
+findMany()
+create()
+update()
+destroy()
+findLinkedNotes()
+findBacklinkedNotes()
toNoteEntity()$
}
NotesRepositoryInterface <|-- NotesRepository : implements
class NoteFilesRepository {
#prisma
#s3
+findOne()
+findMany()
+createMissingOne()
+createMissingMany()
-createMany()
+cleanUp()
+uploadLocalFile()
toNoteFileEntity()$
}
NoteFilesRepository <.. NotesRepository
TODO
Backend
Controllers
NotesController
index()
show()
Use Cases
NotesUseCase
findNotesByCreatedAt()
findNotesByModifiedAt()
findNote()
Repositories
NotesRepository
findByCreatedAt()
findByModifiedAt()
findOne()
findMany()
create()
update()
destroy()
findLinkedNotes()
findBacklinkedNotes()
toNoteEntity()
NoteFilesRepository
findOne()
findMany()
createMissingOne()
cleanUp()
uploadLocalFile()
toNoteFileEntity()
Domain Models
Note
NoteId
NoteTitle
NotePath
NoteBody
NoteFile
RemoteFile
RemoteFileUri
LocalFile
Sha1
Domain Services
Frontend
TBD
Infra
TBD