diff --git a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/Room.java b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/Room.java index ec732b1..6f36557 100644 --- a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/Room.java +++ b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/Room.java @@ -12,6 +12,18 @@ public class Room { @Column(name = "id", updatable = false, nullable = false) private Long id; + /** + * Icon and image are to be given as byte[]. In order to get an encoded string from it, the + * Base64.getEncoder().encodeToString(byte[] content) should be used. For further information: + * https://www.baeldung.com/java-base64-image-string + * https://docs.oracle.com/javase/8/docs/api/java/util/Base64.html + */ + @Column(name = "icon", updatable = true, nullable = false) + private byte[] icon; + + @Column(name = "image", updatable = true, nullable = false) + private byte[] image; + /** User that owns the house this room is in */ @ManyToOne @JoinColumn(name = "user_id")