-
Notifications
You must be signed in to change notification settings - Fork 794
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fa9009e
commit cb1012a
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
src/main/java/guru/springframework/msscbeerservice/domain/Beer.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package guru.springframework.msscbeerservice.domain; | ||
|
||
import lombok.*; | ||
import org.hibernate.annotations.CreationTimestamp; | ||
import org.hibernate.annotations.GenericGenerator; | ||
import org.hibernate.annotations.UpdateTimestamp; | ||
|
||
import javax.persistence.*; | ||
import java.math.BigDecimal; | ||
import java.sql.Timestamp; | ||
import java.util.UUID; | ||
|
||
/** | ||
* Created by jt on 2019-05-17. | ||
*/ | ||
@Getter | ||
@Setter | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
@Entity | ||
public class Beer { | ||
|
||
@Id | ||
@GeneratedValue(generator = "UUID") | ||
@GenericGenerator(name = "UUID", strategy = "org.hibernate.id.UUIDGenerator") | ||
@Column(length = 36, columnDefinition = "varchar", updatable = false, nullable = false) | ||
private UUID id; | ||
|
||
@Version | ||
private Long version; | ||
|
||
@CreationTimestamp | ||
@Column(updatable = false) | ||
private Timestamp createdDate; | ||
|
||
@UpdateTimestamp | ||
private Timestamp lastModifiedDate; | ||
|
||
private String beerName; | ||
private String beerStyle; | ||
|
||
@Column(unique = true) | ||
private Long upc; | ||
|
||
private BigDecimal price; | ||
|
||
private Integer minOnHand; | ||
private Integer quantityToBrew; | ||
|
||
|
||
} |