Ignore:
File:
1 edited

Legend:

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

    rfdd7961 rda44aef  
    33import jakarta.persistence.*;
    44import lombok.Data;
    5 import lombok.RequiredArgsConstructor;
    65
    76@Data
    87@Entity
    9 @RequiredArgsConstructor
    108@Table(name = "shelter")
    119public class Shelter {
     
    2220    private String telephone;
    2321
    24     @ManyToOne
    25     @JoinColumn(name = "id_organisation")
    26     private Organisation organisation;
     22    @Column(name = "id_organisation")
     23    private Integer organisationId;
    2724
    2825    @Column(name = "name_shelter", nullable = false, length = 100)
     
    3229    private String email;
    3330
    34     public Shelter(String address, String telephone, Organisation organisation,
    35                    String name, String email) {
     31    public Shelter(String address, String telephone, Integer organisationId, String name, String email) {
    3632        this.address = address;
    3733        this.telephone = telephone;
    38         this.organisation = organisation;
     34        this.organisationId = organisationId;
    3935        this.name = name;
    4036        this.email = email;
    4137    }
     38
     39    public Shelter() {
     40    }
    4241}
Note: See TracChangeset for help on using the changeset viewer.