45 lines
713 B
Java
45 lines
713 B
Java
package com.chantha.springdemo.model;
|
|
|
|
import javax.persistence.Entity;
|
|
import javax.persistence.Id;
|
|
import javax.persistence.Table;
|
|
|
|
@Entity
|
|
@Table(name="tbfood")
|
|
public class Food {
|
|
|
|
@Id
|
|
private long id;
|
|
public Food() {
|
|
super();
|
|
}
|
|
|
|
public Food(long id, String name, double price) {
|
|
super();
|
|
this.id = id;
|
|
this.name = name;
|
|
this.price = price;
|
|
}
|
|
|
|
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;
|
|
}
|
|
private String name;
|
|
private double price;
|
|
public double getPrice() {
|
|
return price;
|
|
}
|
|
public void setPrice(double price) {
|
|
this.price = price;
|
|
}
|
|
}
|