48 lines
917 B
Java
48 lines
917 B
Java
package me.bvn13.test.spring.data.processing.model;
|
|
|
|
import javax.persistence.Column;
|
|
import javax.persistence.Entity;
|
|
import javax.persistence.GeneratedValue;
|
|
import javax.persistence.GenerationType;
|
|
import javax.persistence.Id;
|
|
import javax.persistence.Table;
|
|
|
|
@Entity
|
|
@Table(name = "product")
|
|
public class Product {
|
|
|
|
@Id
|
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
@Column(name = "id")
|
|
private Integer id;
|
|
|
|
@Column(name = "name")
|
|
private String name;
|
|
|
|
public Product() {
|
|
}
|
|
|
|
public Product(Integer id, String name) {
|
|
this.id = id;
|
|
this.name = name;
|
|
}
|
|
|
|
public Integer getId() {
|
|
return id;
|
|
}
|
|
|
|
public Product setId(Integer id) {
|
|
this.id = id;
|
|
return this;
|
|
}
|
|
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
|
|
public Product setName(String name) {
|
|
this.name = name;
|
|
return this;
|
|
}
|
|
}
|