Support start/stop timer, manual durations, grouped reports, and per-ticket edit/delete of time entries with undo. Co-authored-by: Cursor <cursoragent@cursor.com>
17 lines
447 B
Go
17 lines
447 B
Go
package ticket
|
|
|
|
import "time"
|
|
|
|
// TimeStore persists time entries and the optional active timer.
|
|
type TimeStore interface {
|
|
List() ([]TimeEntry, error)
|
|
ListByTicket(ticketID string) ([]TimeEntry, error)
|
|
Create(e TimeEntry) (TimeEntry, error)
|
|
Update(e TimeEntry) error
|
|
Delete(id string) error
|
|
SumByTicket(ticketID string) (time.Duration, error)
|
|
|
|
LoadActiveTimer() (*ActiveTimer, error)
|
|
SaveActiveTimer(t *ActiveTimer) error // nil clears
|
|
}
|