Skip to content

Commit b5ccb1e

Browse files
committed
feat: include a new mobule to room
Signed-off-by: Otavio Santana <otaviopolianasantana@gmail.com>
1 parent 180ccb3 commit b5ccb1e

3 files changed

Lines changed: 46 additions & 0 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package org.soujava.demos.mongodb.document;
2+
3+
public enum CleanStatus {
4+
CLEAN,
5+
DIRTY,
6+
INSPECTION_NEEDED
7+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package org.soujava.demos.mongodb.document;
2+
3+
import jakarta.nosql.Column;
4+
import jakarta.nosql.Entity;
5+
import jakarta.nosql.Id;
6+
7+
@Entity
8+
public class Room {
9+
10+
@Id
11+
private String id;
12+
13+
@Column
14+
private int roomNumber;
15+
16+
@Column
17+
private RoomType type;
18+
19+
@Column
20+
private RoomStatus status;
21+
22+
@Column
23+
private CleanStatus cleanStatus;
24+
25+
@Column
26+
private boolean smokingAllowed;
27+
28+
@Column
29+
private boolean underMaintenance;
30+
31+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package org.soujava.demos.mongodb.document;
2+
3+
public enum RoomType {
4+
STANDARD,
5+
DELUXE,
6+
SUITE,
7+
VIP_SUITE
8+
}

0 commit comments

Comments
 (0)