77 lines
1.3 KiB
Java
77 lines
1.3 KiB
Java
package com.chantha.springdemo.model;
|
|
|
|
import javax.persistence.*;
|
|
|
|
@Entity
|
|
@Table(name="tbProduct")
|
|
public class Product {
|
|
|
|
@Id
|
|
@GeneratedValue(strategy= GenerationType.AUTO)
|
|
private Long id;
|
|
private String name;
|
|
private double price;
|
|
private String color;
|
|
private String img;
|
|
private String des;
|
|
|
|
public Product() {
|
|
}
|
|
|
|
public Product(String name, double price, String color, String img, String des) {
|
|
this.name = name;
|
|
this.price = price;
|
|
this.color = color;
|
|
this.img = img;
|
|
this.des = des;
|
|
}
|
|
|
|
public Long getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(Long id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
|
|
public void setName(String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
public double getPrice() {
|
|
return price;
|
|
}
|
|
|
|
public void setPrice(double price) {
|
|
this.price = price;
|
|
}
|
|
|
|
public String getColor() {
|
|
return color;
|
|
}
|
|
|
|
public void setColor(String color) {
|
|
this.color = color;
|
|
}
|
|
|
|
public String getImg() {
|
|
return img;
|
|
}
|
|
|
|
public void setImg(String img) {
|
|
this.img = img;
|
|
}
|
|
|
|
public String getDes() {
|
|
return des;
|
|
}
|
|
|
|
public void setDes(String des) {
|
|
this.des = des;
|
|
}
|
|
}
|