40 lines
586 B
Go
40 lines
586 B
Go
package tablos
|
|
|
|
import (
|
|
"errors"
|
|
"time"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
var ErrNotFound = errors.New("tablo not found")
|
|
|
|
type Status string
|
|
|
|
const (
|
|
StatusTodo Status = "todo"
|
|
StatusInProgress Status = "in_progress"
|
|
StatusDone Status = "done"
|
|
)
|
|
|
|
type Record struct {
|
|
ID uuid.UUID
|
|
OwnerID uuid.UUID
|
|
Name string
|
|
Status Status
|
|
CreatedAt time.Time
|
|
UpdatedAt time.Time
|
|
DeletedAt *time.Time
|
|
}
|
|
|
|
type CreateInput struct {
|
|
OwnerID uuid.UUID
|
|
Name string
|
|
Status Status
|
|
}
|
|
|
|
type ListInput struct {
|
|
OwnerID uuid.UUID
|
|
Query string
|
|
Status *Status
|
|
}
|