Ignore:
Timestamp:
03/10/23 21:43:30 (16 months ago)
Author:
SazdovaEkaterina <sazdovaekaterina@…>
Branches:
main
Children:
104185f
Parents:
b46d1f2 (diff), c3278ac (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

resolve merge conflicts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Post.java

    rb46d1f2 r0078d84  
    33import jakarta.persistence.*;
    44import lombok.Data;
     5import lombok.RequiredArgsConstructor;
    56
    67import java.time.LocalDate;
    7 import java.util.Date;
    88
    99@Data
    1010@Entity
     11@RequiredArgsConstructor
    1112@Table(name = "post")
    1213public class Post {
     
    2324    private String thumbnailUrl;
    2425
    25     @Column(name="id_pet", nullable = false)
    26     private int petId;
     26    @OneToOne
     27    @JoinColumn(name="id_pet", nullable = false)
     28    private Pet pet;
    2729
    28     @Column(name="id_surendee")
    29     private int surendeeId;
     30    @ManyToOne
     31    @JoinColumn(name="id_surendee")
     32    private Surendee surendeePoster;
    3033
    31     @Column(name="id_employee")
    32     private int employeeId;
     34    @ManyToOne
     35    @JoinColumn(name="id_employee")
     36    private Employee employeePoster;
    3337
    34     public Post(LocalDate dateCreated, String thumbnailUrl, int petId, int surendeeId, int employeeId) {
     38    public Post(LocalDate dateCreated, String thumbnailUrl,
     39                Pet pet, Surendee surendeePoster, Employee employeePoster) {
    3540        this.dateCreated = dateCreated;
    3641        this.thumbnailUrl = thumbnailUrl;
    37         this.petId = petId;
    38         this.surendeeId = surendeeId;
    39         this.employeeId = employeeId;
    40     }
    41 
    42     public Post() {
     42        this.pet = pet;
     43        this.surendeePoster = surendeePoster;
     44        this.employeePoster = employeePoster;
    4345    }
    4446}
Note: See TracChangeset for help on using the changeset viewer.