gourmetj-springboot/src/main/java/com/mousetech/gourmetj/persistence/model/Pantry.java

67 lines
1.1 KiB
Java
Raw Normal View History

2021-12-28 18:30:53 +00:00
package com.mousetech.gourmetj.persistence.model;
import java.io.Serializable;
import jakarta.persistence.*;
2021-12-28 18:30:53 +00:00
/**
* The persistent class for the "pantry" database table.
*
*/
@Entity
2022-01-16 13:52:04 +00:00
@Table(name = "pantry")
2021-12-28 18:30:53 +00:00
public class Pantry implements Serializable {
private static final long serialVersionUID = 1L;
@Id
2022-01-16 22:33:20 +00:00
@GeneratedValue(strategy = GenerationType.IDENTITY)
2022-01-16 13:52:04 +00:00
@Column(name = "id")
private Long id;
2021-12-28 18:30:53 +00:00
2022-01-16 22:33:20 +00:00
@Column(name = "ingkey", nullable = false)
2022-01-16 13:52:04 +00:00
private String ingkey;
2021-12-28 18:30:53 +00:00
2022-01-16 13:52:04 +00:00
@Column(name = "pantry")
private Boolean pantry;
2021-12-28 18:30:53 +00:00
2022-01-16 13:52:04 +00:00
/**
* Default Constructor.
*/
2021-12-28 18:30:53 +00:00
public Pantry() {
}
2022-01-16 22:33:20 +00:00
public Pantry(String ingKey, boolean checked) {
this.ingkey = ingKey;
this.pantry = checked;
}
2022-01-16 13:52:04 +00:00
public Long getId() {
2021-12-28 18:30:53 +00:00
return this.id;
}
2022-01-16 13:52:04 +00:00
public void setId(Long id) {
2021-12-28 18:30:53 +00:00
this.id = id;
}
2022-01-16 13:52:04 +00:00
public String getIngkey() {
2021-12-28 18:30:53 +00:00
return this.ingkey;
}
2022-01-16 13:52:04 +00:00
public void setIngkey(String ingkey) {
2021-12-28 18:30:53 +00:00
this.ingkey = ingkey;
}
2022-01-16 13:52:04 +00:00
public Boolean getPantry() {
2021-12-28 18:30:53 +00:00
return this.pantry;
}
2022-01-16 13:52:04 +00:00
public void setPantry(Boolean pantry) {
2021-12-28 18:30:53 +00:00
this.pantry = pantry;
}
2022-01-16 13:52:04 +00:00
@Override
public String toString() {
return ("Pantry " + getId() + " " + ingkey + " "
+ getPantry());
}
}