main
Last change
on this file since 55c0119 was ada7108, checked in by Filip Chorbeski <86695898+FilipChorbeski@…>, 19 months ago |
change ids from int to Integer
Co-Authored-By: SazdovaEkaterina <74919977+SazdovaEkaterina@…>
|
-
Property mode
set to
100644
|
File size:
999 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 | import java.util.Date;
|
---|
| 8 |
|
---|
| 9 | @Data
|
---|
| 10 | @Entity
|
---|
| 11 | @Table(name = "post")
|
---|
| 12 | public class Post {
|
---|
| 13 |
|
---|
| 14 | @Id
|
---|
[038c9f7] | 15 | @GeneratedValue(strategy = GenerationType.IDENTITY)
|
---|
[d427a07] | 16 | @Column(name = "id_post")
|
---|
[ada7108] | 17 | private Integer id;
|
---|
[d427a07] | 18 |
|
---|
| 19 | @Column(name="date_post", nullable = false)
|
---|
[fdfc6fa] | 20 | private LocalDate dateCreated;
|
---|
[d427a07] | 21 |
|
---|
| 22 | @Column(name="url_thumbanail", length = 200)
|
---|
| 23 | private String thumbnailUrl;
|
---|
| 24 |
|
---|
| 25 | @Column(name="id_pet", nullable = false)
|
---|
| 26 | private int petId;
|
---|
| 27 |
|
---|
| 28 | @Column(name="id_surendee")
|
---|
| 29 | private int surendeeId;
|
---|
| 30 |
|
---|
| 31 | @Column(name="id_employee")
|
---|
| 32 | private int employeeId;
|
---|
| 33 |
|
---|
[fdfc6fa] | 34 | public Post(LocalDate dateCreated, String thumbnailUrl, int petId, int surendeeId, int employeeId) {
|
---|
[d427a07] | 35 | this.dateCreated = dateCreated;
|
---|
| 36 | this.thumbnailUrl = thumbnailUrl;
|
---|
| 37 | this.petId = petId;
|
---|
| 38 | this.surendeeId = surendeeId;
|
---|
| 39 | this.employeeId = employeeId;
|
---|
| 40 | }
|
---|
| 41 |
|
---|
| 42 | public Post() {
|
---|
| 43 | }
|
---|
| 44 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.