source: Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Post.java@ 468b7b6

main
Last change on this file since 468b7b6 was 468b7b6, checked in by Filip Chorbeski <86695898+FilipChorbeski@…>, 17 months ago

create post form (initial version)

successfully communicates with database and adds pet and post (will be worked upon more)

  • Property mode set to 100644
File size: 1000 bytes
Line 
1package finki.paw5.model.entities;
2
3import jakarta.persistence.*;
4import lombok.Data;
5
6import java.time.LocalDate;
7
8@Data
9@Entity
10@Table(name = "post")
11public class Post {
12
13 @Id
14 @GeneratedValue(strategy = GenerationType.IDENTITY)
15 @Column(name = "id_post")
16 private Integer id;
17
18 @Column(name="date_post", nullable = false)
19 private LocalDate dateCreated;
20
21 @Column(name="url_thumbanail", length = 200)
22 private String thumbnailUrl;
23
24 @Column(name="id_pet", nullable = false)
25 private Integer petId;
26
27 @Column(name="id_surendee")
28 private Integer surendeeId;
29
30 @Column(name="id_employee")
31 private Integer employeeId;
32
33 public Post(LocalDate dateCreated, String thumbnailUrl, Integer petId, Integer surendeeId, Integer employeeId) {
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.