Newer
Older
Sarthak Shrivastava
committed
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
package com.example.accessingdatamysql.item;
import jakarta.persistence.*;
@Entity
@Table(name = "ITEM")
public class Item {
private String name;
private String description;
private String owner_email;
private Integer quantity;
public enum Category
{
STATIONERY,
MARKETING,
ELECTRONICS,
SUPPLIES,
PERISHABLES,
MERCHANDISE,
TOOLS,
CHEMICALS,
FLAMMABLE,
OTHER,
UNIQUE,
BOOKS,
}
@Enumerated(EnumType.STRING)
private Category category;
public enum Status
{
AVAILABLE,
BORROWED
}
@Enumerated(EnumType.STRING)
private Status status;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer locationId;
private Integer organizationId;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getOwner_email() {
return owner_email;
}
public void setOwner_email(String owner_email) {
this.owner_email = owner_email;
}
public Integer getQuantity() {
return quantity;
}
public void setQuantity(Integer quantity) {
this.quantity = quantity;
}
public Category getCategory() {
return category;
}
public void setCategory(Category category) {
this.category = category;
}
public Status getStatus() {
return status;
}
public void setStatus(Status status) {
this.status = status;
}
public Integer getLocationId() {
return locationId;
}
public void setLocationId(Integer locationId) {
this.locationId = locationId;
}
public Integer getOrganizationId() {
return organizationId;
}
public void setOrganizationId(Integer organizationId) {
this.organizationId = organizationId;
}
}