models

package
v0.0.0-...-25378f3 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2020 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 Timespent

type Timespent struct {
	Duration int64     `json:"timespent,omitempty" bson:"timespent,omitempty"`
	Date     time.Time `json:"timecreated,omitempty" bson:"timecreated,omitempty"`
	Desc     string    `json:"desc,omitempty" bson:"desc,omitempty"`
}

Timespent struct for each todo obj Duration: Is int64 of the minutes spent Data: The date of the update Desc: The description of the update

func (Timespent) FormatAsDate

func (t Timespent) FormatAsDate() string

FormatAsDate to foramat the Date obj of Timespent

type Todo

type Todo struct {
	ID          primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	Title       string             `json:"title,omitempty" bson:"title,omitempty"`
	Desc        string             `json:"desc,omitempty" bson:"desc,omitempty"`
	TimeCreated time.Time          `json:"timecreated,omitempty" bson:"timecreated,omitempty"`
	// Deadline       time.Time          `json:"deadline,omitempty" bson:"deadline,omitempty"`
	Estimate       int64       `json:"estimate,omitempty" bson:"estimate,omitempty"`
	TotalTimeSpent int64       `json:"totaltimespent,omitempty" bson:"totaltimespent,omitempty"`
	TimeSpent      []Timespent `json:"timespent,omitempty" bson:"timespent,omitempty"`
}

Todo struct to hold values for each Todo ID: unique ID for all Todo's Title: Title of Todo as string Desc: Description on the Todo as a string TimeCreated: The time the Todo was created time.Time Deadline: The deadline of the Todo as time.Time Estimate: Minutes as int64 TotalTimeSpent: Minuets as int64 TimeSpent: List of TimeSpent structs

Jump to

Keyboard shortcuts

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