source: src/main/java/com/example/task/entity/reminder/ReminderEntity.java@ fdfbdde

Last change on this file since fdfbdde 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
Line 
1package com.example.task.entity.reminder;
2
3import com.example.task.entity.event.CalendarEvent;
4import jakarta.persistence.*;
5import lombok.AllArgsConstructor;
6import lombok.Getter;
7import lombok.NoArgsConstructor;
8import lombok.Setter;
9
10@Entity
11@Table(name = "reminder", schema = "project")
12@NoArgsConstructor
13@AllArgsConstructor
14@Getter
15@Setter
16public 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.