package domain import "errors" var ( ErrNotFound = errors.New("resource not found") ErrLastList = errors.New("the last remaining list cannot be deleted") ) // ValidationError represents a user-correctable domain validation failure. type ValidationError struct{ Message string } func (e ValidationError) Error() string { return e.Message } type List struct { ID int64 `json:"id"` Name string `json:"name"` Position float64 `json:"position"` CardCount int `json:"card_count,omitempty"` } type Card struct { ID int64 `json:"id"` ListID int64 `json:"list_id"` Title string `json:"title"` Description string `json:"description"` Position float64 `json:"position"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` } type ListWithCards struct { ID int64 `json:"id"` Name string `json:"name"` Position float64 `json:"position"` Cards []Card `json:"cards"` } type Snapshot struct { Lists []ListWithCards `json:"lists"` }