Last change
on this file was 8a947b9, checked in by ste08 <sjovanoska@…>, 3 months ago |
Notifications + triggers!
|
-
Property mode
set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | package com.example.skychasemk.model;
|
---|
2 |
|
---|
3 | import jakarta.persistence.*;
|
---|
4 | import lombok.Getter;
|
---|
5 |
|
---|
6 | import java.time.LocalDate;
|
---|
7 |
|
---|
8 | @Getter
|
---|
9 | @Entity
|
---|
10 | @Table(name="notification")
|
---|
11 | public class Notification {
|
---|
12 |
|
---|
13 | @Id
|
---|
14 | @GeneratedValue(strategy = GenerationType.IDENTITY)
|
---|
15 | @Column(name = "notificationid")
|
---|
16 |
|
---|
17 | private Integer notificationID;
|
---|
18 | @Column(name = "userid")
|
---|
19 |
|
---|
20 | private Integer userId;
|
---|
21 | @Column(name = "message")
|
---|
22 |
|
---|
23 | private String message;
|
---|
24 | @Column(name = "type")
|
---|
25 |
|
---|
26 | @Enumerated(EnumType.STRING)
|
---|
27 | private Type type;
|
---|
28 | @Column(name = "date_sent")
|
---|
29 |
|
---|
30 | private LocalDate dateSent;
|
---|
31 |
|
---|
32 | public enum Type {
|
---|
33 | BOOKING_CONFIRMATION,
|
---|
34 | FLIGHT_DELAY,
|
---|
35 | GENERAL_UPDATE
|
---|
36 | }
|
---|
37 |
|
---|
38 | public void setNotificationID(Integer notificationID) {
|
---|
39 | this.notificationID = notificationID;
|
---|
40 | }
|
---|
41 |
|
---|
42 | public void setUserId(Integer userId) {
|
---|
43 | this.userId = userId;
|
---|
44 | }
|
---|
45 |
|
---|
46 | public void setMessage(String message) {
|
---|
47 | this.message = message;
|
---|
48 | }
|
---|
49 |
|
---|
50 | public void setType(Type type) {
|
---|
51 | this.type = type;
|
---|
52 | }
|
---|
53 |
|
---|
54 | public void setDateSent(LocalDate dateSent) {
|
---|
55 | this.dateSent = dateSent;
|
---|
56 | }
|
---|
57 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.