dendrite.nvim/core/models/note.go

45 lines
672 B
Go

package models
type Note struct {
id int
path string
title string
slug string
createdAt string
updatedAt string
}
func NewNote(id int, path, title, slug, createdAt, updatedAt string) *Note {
return &Note{
id: id,
path: path,
title: title,
slug: slug,
createdAt: createdAt,
updatedAt: updatedAt,
}
}
func (n *Note) ID() int {
return n.id
}
func (n *Note) Path() string {
return n.path
}
func (n *Note) Title() string {
return n.title
}
func (n *Note) Slug() string {
return n.slug
}
func (n *Note) CreatedAt() string {
return n.createdAt
}
func (n *Note) UpdatedAt() string {
return n.updatedAt
}