2021-05-27 13:01:16 +10:00
|
|
|
"use strict";
|
2021-05-27 12:46:22 +10:00
|
|
|
var Product = function (id, name, price, stock) {
|
|
|
|
"use strict";
|
2021-05-27 13:01:16 +10:00
|
|
|
var _id = ko.observable(id),
|
|
|
|
_name = ko.observable(name),
|
|
|
|
_price = ko.observable(price),
|
|
|
|
_stock = ko.observable(stock);
|
2021-05-27 12:46:22 +10:00
|
|
|
return {
|
|
|
|
id: _id,
|
|
|
|
name: _name,
|
|
|
|
price: _price,
|
|
|
|
stock: _stock,
|
|
|
|
};
|
|
|
|
};
|