source:
src/main/java/com/example/skychasemk/model/Notification.java
Last change on this file was 8a947b9, checked in by , 3 months ago | |
---|---|
|
|
File size: 1.1 KB |
Rev | Line | |
---|---|---|
[57e58a3] | 1 | package com.example.skychasemk.model; |
2 | ||
3 | import jakarta.persistence.*; | |
[8a947b9] | 4 | import lombok.Getter; |
5 | ||
[57e58a3] | 6 | import java.time.LocalDate; |
7 | ||
[8a947b9] | 8 | @Getter |
[57e58a3] | 9 | @Entity |
[3d60932] | 10 | @Table(name="notification") |
[57e58a3] | 11 | public class Notification { |
12 | ||
13 | @Id | |
14 | @GeneratedValue(strategy = GenerationType.IDENTITY) | |
[3d60932] | 15 | @Column(name = "notificationid") |
[57e58a3] | 16 | |
17 | private Integer notificationID; | |
[3d60932] | 18 | @Column(name = "userid") |
[57e58a3] | 19 | |
[8a947b9] | 20 | private Integer userId; |
[3d60932] | 21 | @Column(name = "message") |
[57e58a3] | 22 | |
23 | private String message; | |
[3d60932] | 24 | @Column(name = "type") |
[57e58a3] | 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 | ||
[8a947b9] | 42 | public void setUserId(Integer userId) { |
43 | this.userId = userId; | |
[57e58a3] | 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.