Skip to content

Instantly share code, notes, and snippets.

@c3l3si4n
Last active March 9, 2020 01:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save c3l3si4n/e1ef9e2136c0a3b0ea583b1aa790c86f to your computer and use it in GitHub Desktop.
Save c3l3si4n/e1ef9e2136c0a3b0ea583b1aa790c86f to your computer and use it in GitHub Desktop.
@Entity
public class Products {
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
private Long id;
private String name;
@Unique
private String nickname;
private BigDecimal price;
private Number stock;
private Number minStock;
protected Products() {}
public Products(String name, String nickname, BigDecimal price, Number stock, Number minStock) {
this.name = name;
this.nickname = nickname;
this.price = price;
this.stock = stock;
this.minStock = minStock;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment