Add ticket time tracking with reports and entry management.
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>
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user