Last active
March 9, 2020 01:08
-
-
Save c3l3si4n/e1ef9e2136c0a3b0ea583b1aa790c86f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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