added image and icon fields to Room
This commit is contained in:
parent
a3128b7cb7
commit
3c0c09c375
1 changed files with 12 additions and 0 deletions
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue