models

package
v0.0.0-...-61485b7 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package models defines the Models required in the project

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResultantTask

type ResultantTask struct {
	TimeCreatedModified string `json:"timeCreated" bson:"timeCreated"`
	TaskTitle           string `json:"taskTitle" bson:"taskTitle"`
	DueDate             string `json:"dueDate" bson:"dueDate"`
	TaskDone            bool   `json:"taskDone" bson:"taskDone"`
}

ResultantTask represents and defines a Task-List Item to be sent

func ConvertToResultantTask

func ConvertToResultantTask(t Task) ResultantTask

ConvertToResultantTask is responsible for converting system understandable JSON Task-list item into a more user friendly Task-list item JSON

type Task

type Task struct {
	TimeCreatedModified int64  `json:"timeCreated" bson:"timeCreated"`
	TaskTitle           string `json:"taskTitle" bson:"taskTitle"`
	DueDate             int64  `json:"dueDate" bson:"dueDate"`
	TaskDone            bool   `json:"taskDone" bson:"taskDone"`
}

Task represents and defines a Task-List Item

func NewTask

func NewTask(taskTitle string, dueDate int64, taskDone bool) *Task

NewTask is responsible for creating a new instance of Task type

Jump to

Keyboard shortcuts

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