15 lines
286 B
Go
15 lines
286 B
Go
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")
|
|
}
|