Commit 5632daf3 authored by Khai Yuan ​Liew's avatar Khai Yuan ​Liew

Update product model and dto

parent 1270fc1d
...@@ -9,10 +9,10 @@ import model.Product; ...@@ -9,10 +9,10 @@ import model.Product;
public class ProductDto { public class ProductDto {
private String sku; private String sku;
private String upc; private String upc;
private String prodName; private String productName;
private String prodDesc; private String productDescription;
private float price; private float price;
private String prodImgUrl; private String productImageUrl;
private String brand; private String brand;
private String category; private String category;
private int stock; private int stock;
...@@ -23,7 +23,7 @@ public class ProductDto { ...@@ -23,7 +23,7 @@ public class ProductDto {
// TODO: Fetch the product's promotion from the Promotions service // TODO: Fetch the product's promotion from the Promotions service
PromotionDto promotion = new PromotionDto(); PromotionDto promotion = new PromotionDto();
return new ProductDto(product.getSku(), product.getUpc(), product.getProdName(), product.getProdDesc(), product.getPrice(), product.getProdImgUrl(), product.getBrand(), product.getCategory(), product.getAvailableStock(), promotion); return new ProductDto(product.getSku(), product.getUpc(), product.getProductName(), product.getProductDescription(), product.getPrice(), product.getProductImageUrl(), product.getBrand(), product.getCategory(), product.getAvailableStock(), promotion);
} }
} }
...@@ -15,25 +15,25 @@ public class Product { ...@@ -15,25 +15,25 @@ public class Product {
@Indexed(unique=true) @Indexed(unique=true)
private String sku; private String sku;
private String upc; private String upc;
private String prodName; private String productName;
private String prodDesc; private String productDescription;
private float price; private float price;
private int availableStock; private int availableStock;
private int blockedStock; private int blockedStock;
private String prodImgUrl; private String productImageUrl;
private String brand; private String brand;
private String category; private String category;
public Product(String sku, String upc, String prodName, String prodDesc, float price, int availableStock, public Product(String sku, String upc, String productName, String productDescription, float price, int availableStock,
String prodImgUrl, String brand, String category) { String productImageUrl, String brand, String category) {
this.sku = sku; this.sku = sku;
this.upc = upc; this.upc = upc;
this.prodName = prodName; this.productName = productName;
this.prodDesc = prodDesc; this.productDescription = productDescription;
this.price = price; this.price = price;
this.availableStock = availableStock; this.availableStock = availableStock;
this.blockedStock = 0; this.blockedStock = 0;
this.prodImgUrl = prodImgUrl; this.productImageUrl = productImageUrl;
this.brand = brand; this.brand = brand;
this.category = category; this.category = category;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment