Initial implementation
This commit is contained in:
14
internal/models/diary.go
Normal file
14
internal/models/diary.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
// DiaryEntry represents a journal entry for a specific day.
|
||||
type DiaryEntry struct {
|
||||
Date time.Time
|
||||
Text string
|
||||
}
|
||||
|
||||
// DateString returns the date formatted as YYYY-MM-DD.
|
||||
func (d *DiaryEntry) DateString() string {
|
||||
return d.Date.Format("2006-01-02")
|
||||
}
|
||||
Reference in New Issue
Block a user