Commit e925419d by Bright Sukumpanumet

Add Boolean canBuyNow, shippingCost, quantity

parent 4eec918d
......@@ -24,6 +24,9 @@ public class Item
private Long categoryId;
private double currentPrice;
private double buyNowPrice;
private Long quantity;
private Double shippingCost;
private Boolean canBuyNow;
private Date startTime; //Start the auction when the current time matches the start time defined by the user
private Date endTime; //Allowing auction window to be set by the bidder, and begin countdown to the end of the bidding window once auction begins
......@@ -43,7 +46,8 @@ public class Item
{
}
public Item(String title, String description, Long categoryId, double currentPrice, double buyNowPrice, String photoUrl, Long userId)
public Item(String title, String description, Long categoryId, double currentPrice,
double buyNowPrice, String photoUrl, Long userId, Boolean canBuyNow)
{
this.title = title;
this.description = description;
......@@ -52,6 +56,7 @@ public class Item
this.buyNowPrice = buyNowPrice;
this.photoUrl = photoUrl;
this.userId = userId;
this.canBuyNow = canBuyNow;
}
public Long getItemId()
......@@ -157,4 +162,54 @@ public class Item
{
this.status = status;
}
public Long getQuantity()
{
return quantity;
}
public void setQuantity(Long quantity)
{
this.quantity = quantity;
}
public Double getShippingCost()
{
return shippingCost;
}
public void setShippingCost(Double shippingCost)
{
this.shippingCost = shippingCost;
}
public Boolean getCanBuyNow()
{
return canBuyNow;
}
public void setCanBuyNow(Boolean canBuyNow)
{
this.canBuyNow = canBuyNow;
}
public Date getStartTime()
{
return startTime;
}
public void setStartTime(Date startTime)
{
this.startTime = startTime;
}
public Date getEndTime()
{
return endTime;
}
public void setEndTime(Date endTime)
{
this.endTime = endTime;
}
}
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 sign in to comment