dendrite.nvim/core/dtos/note_dto.go

19 lines
374 B
Go

package dtos
import "github.com/KristianJBorgwarth/dendrite.daemon/core/models"
type NoteDto struct {
ID string `json:"id"`
Path string `json:"path"`
Title string `json:"title"`
Slug string `json:"slug"`
}
func NewNoteDto(note *models.Note) *NoteDto {
return &NoteDto{
ID: note.ID(),
Path: note.Path(),
Title: note.Title(),
Slug: note.Slug(),
}
}