2023-05-06 12:49:40 +01:00
|
|
|
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 {
|
2024-01-14 13:46:42 +00:00
|
|
|
ID int
|
|
|
|
Title string
|
2024-01-10 12:12:54 +00:00
|
|
|
Description string
|
2024-01-14 13:46:42 +00:00
|
|
|
Created string
|
2023-05-06 12:49:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// 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
|
|
|
|
}
|