Last change
on this file was fdfbdde, checked in by Stojilkova Sara <sara.stojilkova.students.finki.ukim.mk>, 9 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
1017 bytes
|
Rev | Line | |
---|
[fdfbdde] | 1 | package com.example.task.entity.reminder;
|
---|
| 2 |
|
---|
| 3 | import com.example.task.entity.event.CalendarEvent;
|
---|
| 4 | import jakarta.persistence.*;
|
---|
| 5 | import lombok.AllArgsConstructor;
|
---|
| 6 | import lombok.Getter;
|
---|
| 7 | import lombok.NoArgsConstructor;
|
---|
| 8 | import lombok.Setter;
|
---|
| 9 |
|
---|
| 10 | @Entity
|
---|
| 11 | @Table(name = "reminder", schema = "project")
|
---|
| 12 | @NoArgsConstructor
|
---|
| 13 | @AllArgsConstructor
|
---|
| 14 | @Getter
|
---|
| 15 | @Setter
|
---|
| 16 | public class ReminderEntity {
|
---|
| 17 |
|
---|
| 18 | @ManyToOne
|
---|
| 19 | @JoinColumn(name = "calendar_event_id", referencedColumnName = "calendar_event_id")
|
---|
| 20 | private CalendarEvent calendarEvent;
|
---|
| 21 |
|
---|
| 22 | @Id
|
---|
| 23 | @GeneratedValue(strategy = GenerationType.IDENTITY)
|
---|
| 24 | @Column(name = "r_id")
|
---|
| 25 | private Integer id;
|
---|
| 26 |
|
---|
| 27 | @Column(name = "minutes_before_event")
|
---|
| 28 | private Integer minutesBeforeEvent;
|
---|
| 29 |
|
---|
| 30 | @Column(name = "r_flag")
|
---|
| 31 | private boolean repeat;
|
---|
| 32 |
|
---|
| 33 | public ReminderEntity(CalendarEvent calendarEvent, Integer minutesBeforeEvent, boolean repeat) {
|
---|
| 34 | this.calendarEvent = calendarEvent;
|
---|
| 35 | this.minutesBeforeEvent = minutesBeforeEvent;
|
---|
| 36 | this.repeat = repeat;
|
---|
| 37 | }
|
---|
| 38 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.