Last active
May 16, 2019 14:20
-
-
Save sohangp/21862bdacfc720140b6bace1d7c139f5 to your computer and use it in GitHub Desktop.
JPA Entities for Customer Order
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
@Data | |
@Entity | |
@Table(name = "CUSTOMER_ORDER") | |
public class OrderEntity { | |
@Id | |
@Column(name = "ID") | |
private Integer id; | |
@Column(name = "ORDER_NUMBER") | |
private String orderNumber; | |
@Column(name = "TOTAL_AMOUNT") | |
private String totalAmount; | |
@OneToOne | |
@JoinColumn(name="CUSTOMER_ID", nullable=false) | |
private CustomerEntity customer; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment