-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathImagem.java
46 lines (36 loc) · 933 Bytes
/
Imagem.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package com.example.demo.model;
import com.fasterxml.jackson.annotation.JsonIgnore;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;
@Entity
public class Imagem {
private Long id;
private String patch;
private Produto produto;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
@JsonIgnore
public String getPatch() {
return patch;
}
public void setPatch(String patch) {
this.patch = patch;
}
@OneToOne()
@JsonIgnore
public Produto getProduto() {
return produto;
}
public void setProduto(Produto produto) {
this.produto = produto;
}
}