|
|
|
|
@ -0,0 +1,105 @@
|
|
|
|
|
package com.ssm.di.setter;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 花卉商品实体类(花卉管理模块,关联类目)
|
|
|
|
|
*/
|
|
|
|
|
public class Flower {
|
|
|
|
|
// 花卉ID
|
|
|
|
|
private Integer flowerId;
|
|
|
|
|
// 花卉名称
|
|
|
|
|
private String flowerName;
|
|
|
|
|
// 花卉价格
|
|
|
|
|
private Double price;
|
|
|
|
|
// 库存
|
|
|
|
|
private Integer stock;
|
|
|
|
|
// 关联的类目对象
|
|
|
|
|
private Category category;
|
|
|
|
|
// 花卉图片路径
|
|
|
|
|
private String imgUrl;
|
|
|
|
|
// 花卉描述
|
|
|
|
|
private String description;
|
|
|
|
|
|
|
|
|
|
public Flower() {}
|
|
|
|
|
|
|
|
|
|
// Getter & Setter
|
|
|
|
|
public Integer getFlowerId() {
|
|
|
|
|
return flowerId;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setFlowerId(Integer flowerId) {
|
|
|
|
|
this.flowerId = flowerId;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getFlowerName() {
|
|
|
|
|
return flowerName;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setFlowerName(String flowerName) {
|
|
|
|
|
this.flowerName = flowerName;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Double getPrice() {
|
|
|
|
|
return price;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setPrice(Double price) {
|
|
|
|
|
this.price = price;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Integer getStock() {
|
|
|
|
|
return stock;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setStock(Integer stock) {
|
|
|
|
|
this.stock = stock;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Category getCategory() {
|
|
|
|
|
return category;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setCategory(Category category) {
|
|
|
|
|
this.category = category;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getImgUrl() {
|
|
|
|
|
return imgUrl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setImgUrl(String imgUrl) {
|
|
|
|
|
this.imgUrl = imgUrl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getDescription() {
|
|
|
|
|
return description;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setDescription(String description) {
|
|
|
|
|
this.description = description;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void printInfo() {
|
|
|
|
|
System.out.println("===== 花卉信息 =====");
|
|
|
|
|
System.out.println("花卉ID:" + flowerId);
|
|
|
|
|
System.out.println("花卉名称:" + flowerName);
|
|
|
|
|
System.out.println("价格:" + price + "元");
|
|
|
|
|
System.out.println("库存:" + stock);
|
|
|
|
|
System.out.println("所属类目:" + category.getCategoryName());
|
|
|
|
|
System.out.println("图片路径:" + imgUrl);
|
|
|
|
|
System.out.println("描述:" + description);
|
|
|
|
|
System.out.println("-------------------");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public String toString() {
|
|
|
|
|
return "Flower{" +
|
|
|
|
|
"flowerId=" + flowerId +
|
|
|
|
|
", flowerName='" + flowerName + '\'' +
|
|
|
|
|
", price=" + price +
|
|
|
|
|
", stock=" + stock +
|
|
|
|
|
", category=" + category +
|
|
|
|
|
", imgUrl='" + imgUrl + '\'' +
|
|
|
|
|
", description='" + description + '\'' +
|
|
|
|
|
'}';
|
|
|
|
|
}
|
|
|
|
|
}
|