Last change
on this file was 43c9090, checked in by macagaso <gasoskamarija@…>, 5 weeks ago |
Updated version
|
-
Property mode
set to
100644
|
File size:
868 bytes
|
Line | |
---|
1 | package finki.it.terapijamkbackend.spring.entities;
|
---|
2 |
|
---|
3 | import lombok.*;
|
---|
4 | import jakarta.persistence.*;
|
---|
5 |
|
---|
6 |
|
---|
7 | @Getter
|
---|
8 | @Setter
|
---|
9 | @EqualsAndHashCode
|
---|
10 | @NoArgsConstructor
|
---|
11 | @Entity(name="Event")
|
---|
12 | @Table(name="events")
|
---|
13 | public class Event {
|
---|
14 | @SequenceGenerator(
|
---|
15 | name="event_sequence",
|
---|
16 | sequenceName = "event_sequence",
|
---|
17 | allocationSize = 1
|
---|
18 | )
|
---|
19 | @Id
|
---|
20 | @GeneratedValue(
|
---|
21 | strategy=GenerationType.SEQUENCE,
|
---|
22 | generator = "event_sequence"
|
---|
23 | )
|
---|
24 | private Long id;
|
---|
25 |
|
---|
26 | private String title;
|
---|
27 | @Lob
|
---|
28 | @Column(name = "text", columnDefinition = "TEXT")
|
---|
29 | private String text;
|
---|
30 | @Lob
|
---|
31 | @Column(name = "img_src", columnDefinition = "TEXT")
|
---|
32 | private String imgSrc;
|
---|
33 |
|
---|
34 |
|
---|
35 | public Event(String title, String text, String imgSrc) {
|
---|
36 | this.title = title;
|
---|
37 | this.text = text;
|
---|
38 | this.imgSrc = imgSrc;
|
---|
39 | }
|
---|
40 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.