Created
April 24, 2019 13:07
-
-
Save vjrngn/4afb760ed6daf88eff6465b169d44d41 to your computer and use it in GitHub Desktop.
Order line items
This file contains hidden or 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
package com.example.demo; | |
import javax.persistence.*; | |
@Entity | |
@Table(name = "order_line_items") | |
public class OrderLineItem { | |
@Id | |
int id; | |
@Column(name = "book_id") | |
int bookId; | |
@ManyToOne | |
@JoinColumn(name = "order_id") | |
Order order; | |
Double price; | |
Double quantity; | |
public OrderLineItem() { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment