blob: 459c3b7cccd0549ba880c73fc14eeed4b15c7e9a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
package dev.submelon.pantry;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@Entity
@Getter
@Setter
@NoArgsConstructor
public class PantryItem {
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
private Integer id;
@Column(nullable=false)
private String name;
private String description;
@Column(nullable=false)
private double quantity;
@Column(nullable=false)
private String quantityUnitType;
public PantryItem(String name, String description, double quantity, String quantityUnitType) {
this.name = name;
this.description = description;
this.quantity = quantity;
this.quantityUnitType = quantityUnitType;
}
}
|