model

package
v0.0.0-...-10f03cb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2018 License: Apache-2.0 Imports: 2 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Task

type Task struct {
	ID           string       `json:"id,omitempty" bson:"id"`
	Title        string       `json:"title" bson:"title"`
	Description  string       `json:"description" bson:"description"`
	Status       TaskStatus   `json:"status" bson:"status"`
	Priority     TaskPriority `json:"priority" bson:"priority"`
	CreationDate time.Time    `json:"creationDate" bson:"creationDate"`
	DueDate      time.Time    `json:"dueDate" bson:"dueDate"`
}

Task is the structure to define a task to be done

func NewTask

func NewTask() *Task

NewTask sets a new ID of the Task as a string

func (Task) Equal

func (t Task) Equal(task Task) bool

Equal compares a Task to another and returns true if they are equal false otherwise

type TaskPriority

type TaskPriority int

TaskPriority is the priority of a task

const (
	// PriorityMinor is used for task with a lower priority
	PriorityMinor TaskPriority = iota
	// PriorityMedium is used for task with medium priority
	PriorityMedium
	// PriorityHigh is used for task with high priority
	PriorityHigh
)

type TaskStatus

type TaskStatus int

TaskStatus is the current processing status of a task

const (
	// StatusTodo is used for incomplete tasks
	StatusTodo TaskStatus = iota
	// StatusInProgress is used for tasks in progress
	StatusInProgress
	// StatusDone is used for completed tasks
	StatusDone
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL