Skip to content

The task Module #2

@guash24

Description

@guash24

The Task Module

build the module fot tasks, connect to the MySql database

The category and task interfaces

Category interface:

  • id: string (uuid)
  • name: string

Task interface:

  1. id: string (uuid)
  2. title: string
  3. description: Date
  4. category: Category
  5. createDate: Date - the date that the task was added to the db.
  6. taskDate: Date - the data that the task has to be done
  7. done: boolean
  8. doneDate: Date - the date that the task was done

build the following functions:

insert:

insert a new task to the database. The function gets a task, and adds an id and the createDate

updateCategory

the function updates the category of an existing task

done:

the function updates an existing task as done

getTasks

the function gets a list of tasks, the function can get an option object to filter the requested data.
The option object has the following properties (all are optional)

  • done: boolean, to filter the data by done tasks or not
  • category: Category, to filter the tasks by category
  • startDate: Date, to filter the tasks from certain date
  • endDate: Date, to filter the tasks till a data
  • day: Date, to get all tasks for a certain date
  • count: number.the max number for the tasks to get

Tasks

  • create a new branch from dev
  • build the interfaces
  • build the functions
  • test to the functions with coverage
  • commit the changes
  • push the branch
  • create a PR from the new branch to dev
  • connect the PR to the issue and the issue to the PR
  • assign @guash24 as reviewer

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions