package space.anyi.entity.vo; import java.math.BigDecimal; public class OrderItemVO { private Integer id; private Integer orderId; private Integer cakeId; private String cakeName; private String specName; private BigDecimal price; private Integer quantity; private String customJson; private String imageUrl; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Integer getOrderId() { return orderId; } public void setOrderId(Integer orderId) { this.orderId = orderId; } public Integer getCakeId() { return cakeId; } public void setCakeId(Integer cakeId) { this.cakeId = cakeId; } public String getCakeName() { return cakeName; } public void setCakeName(String cakeName) { this.cakeName = cakeName; } public String getSpecName() { return specName; } public void setSpecName(String specName) { this.specName = specName; } public BigDecimal getPrice() { return price; } public void setPrice(BigDecimal price) { this.price = price; } public Integer getQuantity() { return quantity; } public void setQuantity(Integer quantity) { this.quantity = quantity; } public String getCustomJson() { return customJson; } public void setCustomJson(String customJson) { this.customJson = customJson; } public String getImageUrl() { return imageUrl; } public void setImageUrl(String imageUrl) { this.imageUrl = imageUrl; } public BigDecimal getTotalPrice() { if (price != null && quantity != null) { return price.multiply(BigDecimal.valueOf(quantity)); } return BigDecimal.ZERO; } }