gogmagog/models/action.go
2020-12-29 16:08:31 -06:00

28 lines
562 B
Go

package models
import (
"time"
)
// Action represents a single action item.
type Action struct {
ActionID int64
ActionDescription string
EstimatedChunks int
CompletedChunks int
CompletedOn time.Time
PlanID int
CreatedAt time.Time
UpdatedAt time.Time
}
// Actions returns all actions from the model.
func (m *Model) Actions() ([]*Action, error) {
return m.SelectActions()
}
// Action returns a single action from its ID
func (m *Model) Action(id int) (*Action, error) {
return m.SelectActionByID(id)
}