Did the required changes

This commit is contained in:
Baber-Jan
2020-07-26 19:12:51 +04:00
parent d53380616e
commit eeb04e1615
4 changed files with 66 additions and 21 deletions

View File

@@ -8,6 +8,43 @@ class Product {
this.cost = cost;
this.image = image;
}
/**
*
* @param {Number} id
*/
setId(id){
return this.id = id;
}
/**
*
* @param {String} name
*/
setName(name){
return this.name = name;
}
/**
*
* @param {String} description
*/
setDesc(description){
return this.desc = description;
}
/**
*
* @param {Number} cost
*/
setCost(cost){
return this.cost = cost;
}
/**
*
* @param {String} image
*/
setImage(image){
return this.image = image;
}
}
module.exports.Product = Product;

View File

@@ -37,6 +37,14 @@ class Website {
return this.products.getData(productId);
}
/**
*
* @returns {[]}
*/
getAllProduct(){
return this.products.getAllData().values();
}
/**
*
* @param {string} productId