feat: add event notes with pending state, 5-min TTL, cancel, and /note command

This commit is contained in:
2026-06-24 19:49:32 +03:30
parent 68c8518522
commit 4165839477
3 changed files with 134 additions and 1 deletions

View File

@@ -570,6 +570,12 @@ func (s *Store) EventsForDayByDate(userID int64, date string) ([]Event, error) {
return events, rows.Err()
}
// SetEventNote updates the note for an event.
func (s *Store) SetEventNote(eventID int64, note string) error {
_, err := s.db.Exec("UPDATE events SET note=? WHERE id=?", note, eventID)
return err
}
// EventsForDayByDayID returns all events for a day record, ordered by occurrence.
func (s *Store) EventsForDayByDayID(dayID int64) ([]Event, error) {
rows, err := s.db.Query(`