Last change
on this file since dbd4834 was dfd5d87, checked in by Marko <Marko@…>, 23 months ago |
Registration logic with confirmation token implemented
|
-
Property mode
set to
100644
|
File size:
759 bytes
|
Line | |
---|
1 | package finki.it.phoneluxbackend.entities;
|
---|
2 |
|
---|
3 | import com.fasterxml.jackson.annotation.JsonIgnore;
|
---|
4 | import lombok.*;
|
---|
5 |
|
---|
6 | import javax.persistence.*;
|
---|
7 | import java.util.List;
|
---|
8 |
|
---|
9 | @AllArgsConstructor
|
---|
10 | @NoArgsConstructor
|
---|
11 | @Getter
|
---|
12 | @Setter
|
---|
13 | @ToString
|
---|
14 | @Entity(name = "Phone")
|
---|
15 | @Table(name = "phones")
|
---|
16 | public class Phone {
|
---|
17 | @Id
|
---|
18 | @Column(name = "id")
|
---|
19 | private Long id;
|
---|
20 |
|
---|
21 | @Column(name = "brand")
|
---|
22 | private String brand;
|
---|
23 |
|
---|
24 | @Column(name = "model")
|
---|
25 | private String model;
|
---|
26 |
|
---|
27 | @Column(name = "image_url")
|
---|
28 | private String image_url;
|
---|
29 |
|
---|
30 | @OneToMany(fetch = FetchType.LAZY, mappedBy = "phone")
|
---|
31 | @JsonIgnore
|
---|
32 | private List<PhoneOffer> phoneOffers;
|
---|
33 |
|
---|
34 | public Phone(String brand, String model) {
|
---|
35 | this.brand = brand;
|
---|
36 | this.model = model;
|
---|
37 | }
|
---|
38 |
|
---|
39 |
|
---|
40 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.