Changeset e85a562


Ignore:
Timestamp:
01/16/24 16:27:46 (5 months ago)
Author:
darsov2 <62809499+darsov2@…>
Branches:
master
Children:
e6c2521
Parents:
ac19a0c
Message:

images upload/download impl, other fixes

Files:
196 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/com/tourMate/entities/HotelRoom.java

    rac19a0c re85a562  
    55
    66import javax.validation.constraints.NotNull;
     7import java.util.List;
    78
    89@Entity
     
    2021    private Boolean airConditioning;
    2122    private Boolean balcony;
     23    private List<HotelRoomImages> images;
    2224
    2325    public HotelRoom(long hotelRoomId, Hotels hotel, String hotelRoomDescription, String hotelRoomName, double price, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, int numOfBeds) {
     
    147149        this.numOfBeds = numOfBeds;
    148150    }
     151
     152    @OneToMany(mappedBy = "room")
     153    public List<HotelRoomImages> getImages() {
     154        return images;
     155    }
     156
     157    public void setImages(List<HotelRoomImages> images) {
     158        this.images = images;
     159    }
    149160}
  • src/main/java/com/tourMate/entities/HotelRoomImages.java

    rac19a0c re85a562  
    11package com.tourMate.entities;
    22
     3import com.fasterxml.jackson.annotation.JsonIgnore;
    34import jakarta.persistence.*;
    45import org.jetbrains.annotations.NotNull;
     
    89public class HotelRoomImages {
    910    private long imageID;
     11    @JsonIgnore
    1012    private HotelRoom room;
    1113    private String url;
     14
     15    public HotelRoomImages(HotelRoom room, String url) {
     16        this.room = room;
     17        this.url = url;
     18    }
     19
     20    public HotelRoomImages() {
     21
     22    }
    1223
    1324    @Id
Note: See TracChangeset for help on using the changeset viewer.