Last active
May 16, 2019 14:20
-
-
Save sohangp/af43572781d569891b549a054393fc7c to your computer and use it in GitHub Desktop.
JPA entity for Customer
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") | |
public class CustomerEntity { | |
@Id | |
@Column(name = "ID") | |
private Integer id; | |
@Column(name = "FIRST_NAME") | |
private String firstName; | |
@Column(name = "LAST_NAME") | |
private String lastName; | |
@Column(name = "CITY") | |
private String city; | |
@Column(name = "COUNTRY") | |
private String country; | |
@OneToOne(mappedBy="customer") | |
private OrderEntity order; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment