Last change
on this file was 743de55, checked in by macagaso <gasoskamarija@…>, 6 weeks ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
760 bytes
|
Line | |
---|
1 | package finki.it.terapijamkbackend.spring.entities;
|
---|
2 | import jakarta.persistence.*;
|
---|
3 | import lombok.*;
|
---|
4 |
|
---|
5 | @Getter
|
---|
6 | @Setter
|
---|
7 | @EqualsAndHashCode
|
---|
8 | @NoArgsConstructor
|
---|
9 | @Entity(name="Coupon")
|
---|
10 | @Table(name="coupons")
|
---|
11 | public class Coupon {
|
---|
12 | @SequenceGenerator(
|
---|
13 | name="coupon_sequence",
|
---|
14 | sequenceName = "coupon_sequence",
|
---|
15 | allocationSize = 1
|
---|
16 | )
|
---|
17 | @Id
|
---|
18 | @GeneratedValue(
|
---|
19 | strategy=GenerationType.SEQUENCE,
|
---|
20 | generator = "coupon_sequence"
|
---|
21 | )
|
---|
22 | private Long id;
|
---|
23 | private String code;
|
---|
24 | private String title;
|
---|
25 | private String description;
|
---|
26 |
|
---|
27 | public Coupon(String title,String code,String description) {
|
---|
28 | this.title = title;
|
---|
29 | this.code = code;
|
---|
30 | this.description = description;
|
---|
31 | }
|
---|
32 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.