pelican/internal/board/card.go
Dan Anglin 723e9d9d1e
All checks were successful
/ test (pull_request) Successful in 29s
/ lint (pull_request) Successful in 36s
feat: add timestamp for card creation
Add the timestamp for a created card in the format YYYY-MM-DD.
This is in preparation for the UI rework.
2023-12-12 14:42:45 +00:00

29 lines
496 B
Go

package board
import "fmt"
type CardNotExistError struct {
ID int
}
func (e CardNotExistError) Error() string {
return fmt.Sprintf("card ID '%d' does not exist in the database", e.ID)
}
// Card represents a card on a Kanban board.
type Card struct {
ID int
Title string
Content string
Created string
}
// UpdateId updates the ID of the Card value.
func (c *Card) UpdateId(id int) {
c.ID = id
}
// Id returns the ID of the Card value.
func (c *Card) Id() int {
return c.ID
}