Last change
on this file since de83113 was 3d60932, checked in by ste08 <sjovanoska@…>, 4 months ago |
Fix commiT
|
-
Property mode
set to
100644
|
File size:
1.4 KB
|
Line | |
---|
1 | package com.example.skychasemk.model;
|
---|
2 |
|
---|
3 | import jakarta.persistence.*;
|
---|
4 | import java.time.LocalDate;
|
---|
5 |
|
---|
6 | @Entity
|
---|
7 | @Table(name="notification")
|
---|
8 | public class Notification {
|
---|
9 |
|
---|
10 | @Id
|
---|
11 | @GeneratedValue(strategy = GenerationType.IDENTITY)
|
---|
12 | @Column(name = "notificationid")
|
---|
13 |
|
---|
14 | private Integer notificationID;
|
---|
15 | @Column(name = "userid")
|
---|
16 |
|
---|
17 | private Integer userID;
|
---|
18 | @Column(name = "message")
|
---|
19 |
|
---|
20 | private String message;
|
---|
21 | @Column(name = "type")
|
---|
22 |
|
---|
23 | @Enumerated(EnumType.STRING)
|
---|
24 | private Type type;
|
---|
25 | @Column(name = "date_sent")
|
---|
26 |
|
---|
27 | private LocalDate dateSent;
|
---|
28 |
|
---|
29 | public enum Type {
|
---|
30 | BOOKING_CONFIRMATION,
|
---|
31 | FLIGHT_DELAY,
|
---|
32 | GENERAL_UPDATE
|
---|
33 | }
|
---|
34 |
|
---|
35 | // Getters and Setters
|
---|
36 | public Integer getNotificationID() {
|
---|
37 | return notificationID;
|
---|
38 | }
|
---|
39 |
|
---|
40 | public void setNotificationID(Integer notificationID) {
|
---|
41 | this.notificationID = notificationID;
|
---|
42 | }
|
---|
43 |
|
---|
44 | public Integer getUserID() {
|
---|
45 | return userID;
|
---|
46 | }
|
---|
47 |
|
---|
48 | public void setUserID(Integer userID) {
|
---|
49 | this.userID = userID;
|
---|
50 | }
|
---|
51 |
|
---|
52 | public String getMessage() {
|
---|
53 | return message;
|
---|
54 | }
|
---|
55 |
|
---|
56 | public void setMessage(String message) {
|
---|
57 | this.message = message;
|
---|
58 | }
|
---|
59 |
|
---|
60 | public Type getType() {
|
---|
61 | return type;
|
---|
62 | }
|
---|
63 |
|
---|
64 | public void setType(Type type) {
|
---|
65 | this.type = type;
|
---|
66 | }
|
---|
67 |
|
---|
68 | public LocalDate getDateSent() {
|
---|
69 | return dateSent;
|
---|
70 | }
|
---|
71 |
|
---|
72 | public void setDateSent(LocalDate dateSent) {
|
---|
73 | this.dateSent = dateSent;
|
---|
74 | }
|
---|
75 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.