Ignore:
File:
1 edited

Legend:

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

    rda44aef rfdd7961  
    33import jakarta.persistence.*;
    44import lombok.Data;
     5import lombok.RequiredArgsConstructor;
    56
    67@Data
    78@Entity
     9@RequiredArgsConstructor
    810@Table(name = "shelter")
    911public class Shelter {
     
    2022    private String telephone;
    2123
    22     @Column(name = "id_organisation")
    23     private Integer organisationId;
     24    @ManyToOne
     25    @JoinColumn(name = "id_organisation")
     26    private Organisation organisation;
    2427
    2528    @Column(name = "name_shelter", nullable = false, length = 100)
     
    2932    private String email;
    3033
    31     public Shelter(String address, String telephone, Integer organisationId, String name, String email) {
     34    public Shelter(String address, String telephone, Organisation organisation,
     35                   String name, String email) {
    3236        this.address = address;
    3337        this.telephone = telephone;
    34         this.organisationId = organisationId;
     38        this.organisation = organisation;
    3539        this.name = name;
    3640        this.email = email;
    3741    }
    38 
    39     public Shelter() {
    40     }
    4142}
Note: See TracChangeset for help on using the changeset viewer.