model

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: MIT Imports: 3 Imported by: 0

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
	Title    string
	Priority float64

	// defalut value is create time
	SortKey     time.Time
	CreateTime  time.Time
	UpdateTime  time.Time
	DeletedTime *time.Time
}

TODO: add validation

func NewTask

func NewTask(title string, priority float64) (*Task, error)

func (*Task) UpdateAsDeleted

func (t *Task) UpdateAsDeleted(baseTime time.Time)

Jump to

Keyboard shortcuts

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