source:
Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Post.java@
a762b3a
Last change on this file since a762b3a was 468b7b6, checked in by , 17 months ago | |
---|---|
|
|
File size: 1000 bytes |
Rev | Line | |
---|---|---|
[3d3e59d] | 1 | package finki.paw5.model.entities; |
[d427a07] | 2 | |
[038c9f7] | 3 | import jakarta.persistence.*; |
[d427a07] | 4 | import lombok.Data; |
5 | ||
[fdfc6fa] | 6 | import java.time.LocalDate; |
[d427a07] | 7 | |
8 | @Data | |
9 | @Entity | |
10 | @Table(name = "post") | |
11 | public class Post { | |
12 | ||
13 | @Id | |
[038c9f7] | 14 | @GeneratedValue(strategy = GenerationType.IDENTITY) |
[d427a07] | 15 | @Column(name = "id_post") |
[ada7108] | 16 | private Integer id; |
[d427a07] | 17 | |
18 | @Column(name="date_post", nullable = false) | |
[fdfc6fa] | 19 | private LocalDate dateCreated; |
[d427a07] | 20 | |
21 | @Column(name="url_thumbanail", length = 200) | |
22 | private String thumbnailUrl; | |
23 | ||
24 | @Column(name="id_pet", nullable = false) | |
[468b7b6] | 25 | private Integer petId; |
[d427a07] | 26 | |
27 | @Column(name="id_surendee") | |
[468b7b6] | 28 | private Integer surendeeId; |
[d427a07] | 29 | |
30 | @Column(name="id_employee") | |
[468b7b6] | 31 | private Integer employeeId; |
[d427a07] | 32 | |
[468b7b6] | 33 | public Post(LocalDate dateCreated, String thumbnailUrl, Integer petId, Integer surendeeId, Integer employeeId) { |
[d427a07] | 34 | this.dateCreated = dateCreated; |
35 | this.thumbnailUrl = thumbnailUrl; | |
36 | this.petId = petId; | |
37 | this.surendeeId = surendeeId; | |
38 | this.employeeId = employeeId; | |
39 | } | |
40 | ||
41 | public Post() { | |
42 | } | |
43 | } |
Note:
See TracBrowser
for help on using the repository browser.