Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given the class and data below; Using javascript and mongoose, Implement CRUD actions in your transactionmanager that perform the actions in the database. class Transaction

Given the class and data below;

Using javascript and mongoose, Implement CRUD actions in your transactionmanager that perform the actions in the database.

class Transaction {

constructor(id, date, description, category, amount){

this.id = id; this.date = date;

this.description = description;

this.category = category;

this.amount = amount; }

}

const getTransactions = () => {

const transactions = [];

transactions.push( new Transaction(1, "01/15/23", "jewelry sales", "credit", 350 ));

transactions.push( new Transaction(2, "01/17/23", "old antique sales", "credit", 2000 ));

transactions.push( new Transaction(3, "01/18/23", "product sales", "credit", 4550 ));

transactions.push( new Transaction(4, "01/20/23", "gift", "credit", 170 ));

return transactions; };

module.exports = {

getTransactions

};

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2014 Administration

Authors: Adam Jorgensen, Bradley Ball

1st Edition

111885926X, 9781118859261

More Books

Students also viewed these Databases questions

Question

What is IUPAC system? Name organic compounds using IUPAC system.

Answered: 1 week ago

Question

What happens when carbonate and hydrogen react with carbonate?

Answered: 1 week ago

Question

2. How can competencies be used in employee development?

Answered: 1 week ago