Skip to content

Commit

Permalink
Criação de atributo categoria na classe ProdutosModel
Browse files Browse the repository at this point in the history
  • Loading branch information
Muriloabreu committed May 1, 2023
1 parent d6242f7 commit 085b3a9
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;

@Entity
Expand All @@ -29,6 +31,9 @@ public class ProdutosModel {
private Integer estoqueAtual;
@Column(nullable = false)
private LocalDateTime dataRegistro;
@ManyToOne
@JoinColumn(name = "id_categoria", referencedColumnName = "id")
private CategoriaModel categoria;

/* Construtor */

Expand Down

0 comments on commit 085b3a9

Please sign in to comment.